[Pkg-gtkpod-devel] r341 - in libgpod/trunk: . bindings bindings/python bindings/python/examples bindings/python/tests debian docs docs/reference docs/reference/html docs/reference/tmpl docs/reference/xml m4 po src tests tools

djpig at alioth.debian.org djpig at alioth.debian.org
Sat Jan 24 12:10:01 UTC 2009


Author: djpig
Date: 2009-01-24 12:10:00 +0000 (Sat, 24 Jan 2009)
New Revision: 341

Added:
   libgpod/trunk/bindings/python/examples/fix_empty_artist_field.py
   libgpod/trunk/docs/reference/html/libgpod-Chapter-Data.html
   libgpod/trunk/docs/reference/tmpl/chapterdata.sgml
   libgpod/trunk/docs/reference/xml/chapterdata.xml
   libgpod/trunk/po/zh_CN.po
   libgpod/trunk/src/gchecksum.c
   libgpod/trunk/src/gchecksum.h
   libgpod/trunk/src/itdb_chapterdata.c
   libgpod/trunk/src/itdb_plist.c
   libgpod/trunk/src/itdb_plist.h
   libgpod/trunk/src/itdb_sysinfo_extended_parser.c
   libgpod/trunk/src/itdb_sysinfo_extended_parser.h
   libgpod/trunk/src/itdb_thumb.c
   libgpod/trunk/src/itdb_thumb.h
   libgpod/trunk/tests/test-sysinfo-extended-parsing.c
Removed:
   libgpod/trunk/src/itdb_sysinfo.c
Modified:
   libgpod/trunk/ChangeLog
   libgpod/trunk/Makefile.am
   libgpod/trunk/Makefile.in
   libgpod/trunk/NEWS
   libgpod/trunk/README
   libgpod/trunk/README.SysInfo
   libgpod/trunk/TROUBLESHOOTING
   libgpod/trunk/aclocal.m4
   libgpod/trunk/bindings/Makefile.in
   libgpod/trunk/bindings/python/Makefile.am
   libgpod/trunk/bindings/python/Makefile.in
   libgpod/trunk/bindings/python/README
   libgpod/trunk/bindings/python/examples/Makefile.am
   libgpod/trunk/bindings/python/examples/Makefile.in
   libgpod/trunk/bindings/python/examples/save_photos.py
   libgpod/trunk/bindings/python/gpod.i.in
   libgpod/trunk/bindings/python/gtkpod.py
   libgpod/trunk/bindings/python/ipod.py
   libgpod/trunk/bindings/python/tests/Makefile.in
   libgpod/trunk/bindings/python/tests/tests.py
   libgpod/trunk/config.guess
   libgpod/trunk/config.h.in
   libgpod/trunk/config.sub
   libgpod/trunk/configure
   libgpod/trunk/configure.ac
   libgpod/trunk/debian/changelog
   libgpod/trunk/depcomp
   libgpod/trunk/docs/Makefile.in
   libgpod/trunk/docs/reference/Makefile.am
   libgpod/trunk/docs/reference/Makefile.in
   libgpod/trunk/docs/reference/html/ch01.html
   libgpod/trunk/docs/reference/html/index.html
   libgpod/trunk/docs/reference/html/index.sgml
   libgpod/trunk/docs/reference/html/itunesdb.html
   libgpod/trunk/docs/reference/html/libgpod-Artwork.html
   libgpod/trunk/docs/reference/html/libgpod-Device.html
   libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html
   libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html
   libgpod/trunk/docs/reference/html/libgpod-Photo-database.html
   libgpod/trunk/docs/reference/html/libgpod-Playlists.html
   libgpod/trunk/docs/reference/html/libgpod-Smart-Playlists.html
   libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html
   libgpod/trunk/docs/reference/html/libgpod-Time-handling.html
   libgpod/trunk/docs/reference/html/libgpod-Tracks.html
   libgpod/trunk/docs/reference/html/libgpod.devhelp
   libgpod/trunk/docs/reference/html/libgpod.devhelp2
   libgpod/trunk/docs/reference/html/photodb.html
   libgpod/trunk/docs/reference/html/style.css
   libgpod/trunk/docs/reference/libgpod-docs.xml
   libgpod/trunk/docs/reference/libgpod-sections.txt
   libgpod/trunk/docs/reference/tmpl/artwork.sgml
   libgpod/trunk/docs/reference/tmpl/device.sgml
   libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml
   libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml
   libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml
   libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml
   libgpod/trunk/docs/reference/tmpl/libgpod-unused.sgml
   libgpod/trunk/docs/reference/tmpl/photodb.sgml
   libgpod/trunk/docs/reference/tmpl/track.sgml
   libgpod/trunk/docs/reference/xml/Internal.xml
   libgpod/trunk/docs/reference/xml/artwork.xml
   libgpod/trunk/docs/reference/xml/device.xml
   libgpod/trunk/docs/reference/xml/itunesdb-copying.xml
   libgpod/trunk/docs/reference/xml/itunesdb-db.xml
   libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml
   libgpod/trunk/docs/reference/xml/itunesdb-time.xml
   libgpod/trunk/docs/reference/xml/photodb.xml
   libgpod/trunk/docs/reference/xml/playlists.xml
   libgpod/trunk/docs/reference/xml/smart-playlists.xml
   libgpod/trunk/docs/reference/xml/track.xml
   libgpod/trunk/gtk-doc.make
   libgpod/trunk/install-sh
   libgpod/trunk/intltool-extract.in
   libgpod/trunk/intltool-merge.in
   libgpod/trunk/intltool-update.in
   libgpod/trunk/libgpod-1.0.pc.in
   libgpod/trunk/ltmain.sh
   libgpod/trunk/m4/Makefile.in
   libgpod/trunk/m4/gtk-doc.m4
   libgpod/trunk/m4/intltool.m4
   libgpod/trunk/m4/python.m4
   libgpod/trunk/missing
   libgpod/trunk/mkinstalldirs
   libgpod/trunk/po/Makefile.in.in
   libgpod/trunk/po/POTFILES.in
   libgpod/trunk/po/de.po
   libgpod/trunk/po/es.po
   libgpod/trunk/po/fr.po
   libgpod/trunk/po/he.po
   libgpod/trunk/po/it.po
   libgpod/trunk/po/ja.po
   libgpod/trunk/po/ro.po
   libgpod/trunk/po/sv.po
   libgpod/trunk/src/Makefile.am
   libgpod/trunk/src/Makefile.in
   libgpod/trunk/src/db-artwork-debug.c
   libgpod/trunk/src/db-artwork-debug.h
   libgpod/trunk/src/db-artwork-parser.c
   libgpod/trunk/src/db-artwork-parser.h
   libgpod/trunk/src/db-artwork-writer.c
   libgpod/trunk/src/db-image-parser.c
   libgpod/trunk/src/db-image-parser.h
   libgpod/trunk/src/db-itunes-parser.h
   libgpod/trunk/src/db-parse-context.c
   libgpod/trunk/src/db-parse-context.h
   libgpod/trunk/src/itdb.h
   libgpod/trunk/src/itdb_artwork.c
   libgpod/trunk/src/itdb_device.c
   libgpod/trunk/src/itdb_device.h
   libgpod/trunk/src/itdb_itunesdb.c
   libgpod/trunk/src/itdb_photoalbum.c
   libgpod/trunk/src/itdb_playlist.c
   libgpod/trunk/src/itdb_private.h
   libgpod/trunk/src/itdb_track.c
   libgpod/trunk/src/ithumb-writer.c
   libgpod/trunk/tests/Makefile.am
   libgpod/trunk/tests/Makefile.in
   libgpod/trunk/tests/get-timezone.c
   libgpod/trunk/tests/itdb_main.c
   libgpod/trunk/tests/test-covers.c
   libgpod/trunk/tests/test-fw-id.c
   libgpod/trunk/tests/test-init-ipod.c
   libgpod/trunk/tests/test-ls.c
   libgpod/trunk/tests/test-photos.c
   libgpod/trunk/tests/test-rebuild-db.cc
   libgpod/trunk/tools/Makefile.in
   libgpod/trunk/tools/hal-callout.c
   libgpod/trunk/tools/ipod-scsi-inquiry.c
Log:
Merge 0.7.0 to trunk


Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/ChangeLog	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,5 +1,1115 @@
-====== libgpod 0.6.0 ======
+2009-01-18  Todd Zullinger  <tmzullinger at users.sourceforge.net>
 
+	* configure.ac: Bump version for 0.7.0 final
+
+	* src/db-artwork-parser.c: Quiet artwork mhii_link warning
+
+2009-01-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: Silver iPod Classic 160GB is B145, not B155
+	(noticed thanks to a Banshee bug report, verified on ebay sales of
+	such iPods)
+
+2009-01-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/ro.po: updated Romanian translation. Thanks to Alex
+          Eftimie.
+
+2009-01-13  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* README.SysInfo, TROUBLESHOOTING: Add some notes on the hal
+	callout
+
+	* TROUBLESHOOTING: Minor grammatical fixes
+
+2009-01-13  Christophe Fergeau  <teuf at gnome.org>
+
+	* itdb_sysinfo_extended_parser.c: use a gint instead of a gchar as a
+	loop index since we are comparing against >= 0
+
+2009-01-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (itdb_rename_files): remove the
+	  "iTunesStats" file used by Shuffles instead of the "Play Counts"
+	  file after writing the iTunesSD -- otherwise the playcounts are
+	  never reset. Thanks to Peter Maydell for pointing this
+	  out. Fixes tracker item #2481322.
+
+2009-01-06  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/zh_CN.po: Add simple Chinese translation (Tan Zhixin)
+
+2009-01-05  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/de.po: Update German translation (Jonas Cleve)
+
+2009-01-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Bump version for 0.7.0rc2
+
+	* docs/reference/tmpl/track.sgml, src/itdb.h:
+	Document Itdb_Track->album_id
+
+	* bindings/python/ipod.py:
+	Make Track.get_coverart() return None if artwork is absent
+
+2009-01-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* NEWS: more news, hope the packagers will notice the new
+	libxml2-devel dependency...
+
+2009-01-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/Makefile.am: we need to link with -lm since ithumb-writer.c
+	uses round and ceil
+
+2009-01-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* NEWS: update NEWS file, I probably forgot some things, feel free
+	to update it :)
+
+2009-01-01  Christophe Fergeau  <teuf at gnome.org>
+	
+	* src/itdb_device.c: fix static artwork formats for the nano4g, C&P
+	is really a bad thing ;)
+
+2009-01-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb.h: add album_id field to Itdb_Track. It's unused yet but
+	will be used later and adding it now will avoid ABI breakage later
+	;)
+
+2008-12-29  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for silver and pink
+	16GB nano 4g, the last missing ones :)
+
+2008-12-28  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/gtkpod.py:
+	Python: fix sha DeprecationWarning with python-2.6 (thanks to
+	Alex Ghitza)
+
+2008-12-26  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/es.po: Update Spanish translation (Alejandro Lamas Daviña)
+
+2008-12-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: I didn't mean to commit that hunk
+	from Neil's patch, adding a model name here with no
+	matching entry in the model enum would break building
+	a user visible list of known ipod models
+
+2008-12-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add ipod shuffle info from Neil Campbell
+
+2008-12-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for yellow and green
+	16GB nano 4g.
+
+2008-12-18  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for purple 16GB nano 4g,
+	thanks to Ronald for providing the information
+
+2008-12-16  Daniele Forsi <dforsi at users.sourceforge.net>
+
+        * po/it.po: updated Italian translation
+
+2008-12-15  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_plist.c: substitute g_base64_decode() between version
+	  2.8 and 2.11 of glib.
+
+	* src/itdb_device.c: handle timezone correctly on CYGWIN
+
+	  Patches courtesy of Éric Lassauge.
+
+2008-12-13  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/fr.po: Update French translation (Éric Lassauge)
+
+2008-12-12  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add hardcoded table for nano4g artwork
+	formats. I haven't tested I got everything perfectly right so there
+	might be issues with them. Thanks to Tijs van Roon for pinpointing
+	these missing tables
+
+2008-12-12  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for 16GB Orange Nano 4g,
+	thanks to Tijs van Roon for providing the data
+
+2008-12-10  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/he.po: Update Hebrew translation (Assaf Gillat)
+
+	* po/sv.po: Update Swedish translation (Stefan Asserhäll)
+
+2008-12-08  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Bump version and soname for 0.7.0rc1
+
+	* po/de.po
+	  po/es.po
+	  po/fr.po
+	  po/he.po
+	  po/it.po
+	  po/ja.po
+	  po/libgpod.pot
+	  po/ro.po
+	  po/sv.po: Update po files
+
+2008-12-07  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/libgpod-docs.xml
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/artwork.sgml
+	  docs/reference/tmpl/chapterdata.sgml
+	  docs/reference/tmpl/device.sgml
+	  docs/reference/tmpl/itunesdb-copying.sgml
+	  docs/reference/tmpl/itunesdb-db.sgml
+	  docs/reference/tmpl/itunesdb-lowlevel.sgml
+	  docs/reference/tmpl/itunesdb-time.sgml
+	  docs/reference/tmpl/libgpod-unused.sgml
+	  docs/reference/tmpl/photodb.sgml
+	  docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_artwork.c
+	  src/itdb_chapterdata.c
+	  src/itdb_device.c
+	  src/itdb_device.h
+	  src/itdb_itunesdb.c
+	  src/itdb_photoalbum.c
+	  src/itdb_playlist.c
+	  src/itdb_plist.c
+	  src/itdb_sysinfo_extended_parser.c
+	  src/itdb_thumb.c
+	  src/itdb_thumb.h
+	  src/itdb_track.c
+	  src/ithumb-writer.c:
+	  Update API documentation
+
+	  Add new functions and missing enums, macros, and structs to the proper
+	  places in the documentation, remove old/unused functions, and clean up
+	  various minor issues.
+
+2008-12-07  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (jump_table_letter): don't terminate when
+	  an invalid utf8 string is encountered (replaced g_assert() with
+	  g_return_val_if_fail()).
+
+2008-11-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: don't add "-Wall" to CFLAGS
+	  unconditionally. I believe this line was overlooked when this
+	  issue was fixed earlier. Thanks to Tim Mooney.
+
+2008-11-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-parse-context.h: remove unneeded G_GNUC_INTERNAL at the
+	  end of a declaration as this can cause problems with some
+	  compilers (and doesn't seem to make sense in the first
+	  place). Thanks to Tim Mooney.
+
+2008-11-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ithumb-writer.c: rework the way we calculate that thumbnails
+	must be resized to when being transferred to the ipod. The old way
+	had rounding errors which led to display bugs on the nano4g (in the
+	album list)
+
+2008-11-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ithumb-writer.c: stricter sanity check 
+
+2008-11-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ithumb-writer.c: add checks for int overflows on malloc args
+
+2008-11-14  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/tmpl/track.sgml
+	  src/itdb.h:
+	  Remove chapterdata_raw and chapterdata_raw_length from
+	  Itdb_Track
+
+	  These are no longer needed now that proper Chapter Data
+	  support is available (since svn revision 1936/1937).
+
+2008-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: SN YX6 corresponds to a Shuffle model B225
+	according to a report on #gtkpod
+
+2008-10-21  Christophe Fergeau  <teuf at gnome.org>
+	
+	* src/itdb_device.c: use information from SysInfoExtended to tell
+	if an ipod supports photos or not instead of only using the
+	hard-coded tables in libgpod
+
+2008-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for 16GB blue ipod nano,
+	thanks to Thomas Pani for providing that SN.
+
+2008-10-13  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for 16GB black ipod nano,
+	thanks to Doug Larrick for providing that SN :)
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.c: use %z modifier to print size_t values
+	and G_GINT64_MODIFIER to print 64 bit values, fix compilation
+	on 64 bit systems when artwork debugging is enabled
+
+2008-10-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.h: switch members in Itdb_ArtworkFormat from
+	guint16 to gint since the SysInfoExtended parser will assume 
+	they are gint value and will try to write to them through a 
+	gint* pointer (ie it will overwrite whatever is around the 
+	guint16 value if we don't change it)
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: fix itdb_device_supports_artwork to properly
+	take into account data from SysInfoExtended if available
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sysinfoextended_parser.c: artwork is stored in <array>
+	nodes (which are parsed to a GValueArray), reflect that in the
+	SysInfoExtended parsing code.
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_plist.c: fix handling on blank nodes (ie nodes
+	containing only white spaces), fixes parsing of SysInfoExtended files
+	as well ;)
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_plist.c: add support for <array> tags to the plist
+	parser, this is needed to support SysInfoExtended files as found on
+	on the 4g nanos
+
+2008-10-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for the 8GB Silver Nano 4g
+	and model number for the 4GB Blue Nano 4g
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: a few more fixes in device model
+	numbers/serials
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add missing name for the yellow ipod nano
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: and add SN for the 8GB Red Nano
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add SN for 16GB Red Nano
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb.h: add enum entries for the new ipod classic and the new
+	nanos
+	* src/itdb_device.c: add entries for the new nanos and the new ipod
+	classic, add some serial numbers for older ipod models
+
+2008-09-11  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add missing string description for the red ipod
+	shuffle that was added some time ago, without it gtkpod was badly
+	broken wrt ipod model selection :-/
+
+2008-08-23  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/ipod.py
+	  bindings/python/tests/tests.py:
+	  Add a quiet parameter to Database.remove() and use it in
+	  tests
+
+	* bindings/python/ipod.py:
+	  Be more consistent with other python container objects and
+	  classes
+
+	  This enables testing whether a key exists in an object (e.g.
+	  "'title' in track") as well as iterating over a Track or
+	  Photo object's keys, values, or items.  The items() and
+	  pairs() methods were renamed to values() and items(),
+	  respectively, in the Track and Photo classes.
+
+	* bindings/python/tests/tests.py:
+	  Whitespace cleanup
+
+	* bindings/python/ipod.py:
+	  Set the mediatype field for Track objects
+
+2008-08-20  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/examples/save_photos.py
+	  bindings/python/gpod.i.in
+	  bindings/python/ipod.py
+	  bindings/python/tests/tests.py:
+	  Update python bindings to work with the new thumbnail API.
+
+	  This removes sw_get_artwork_thumbnails() and the Thumbnail
+	  class from the python bindings.  The get_pixbuf() function
+	  is now in the Photo class.
+
+2008-08-09  Paul Richardson  <phantom_sf at users.sourceforge.net>
+
+	* Added eclipse project related files to svn:ignore
+	* src/db-artwork-parser.c
+	  src/itdb.h
+	  src/itdb_photoalbum.c:
+	  Added to Itdb_PhotoAlbum, a reference to its parent Photo DB.
+	  When albums are constructed upon loading of the Photo DB, the
+	  reference is added as part of initialisation.
+
+2008-08-09  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_playlist.c
+	  tests/test-ls.c: Remove uses of deprecated itdb_time_* functions
+
+2008-08-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/ithumb-writer (ithumb_writer_handle_pixbuf_transform):
+	  handle rotation correctly: don't interchange width and height
+	  for the thumbnail on the iPod.
+
+2008-08-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_track.c: Fix typo in itdb_track_get_thumbnail() doc
+	  comment
+
+2008-07-31  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: s/test -a/test -e/ since this is what I really
+	meant, thanks tmz
+
+2008-07-31  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: instead of looking for .svn or {arch}, look for
+	autogen.sh to decide if we are compiling a version checked out from
+	svn or a release tarball.
+
+2008-07-31  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.h:
+	* src/itdb_plist.h: move itdb_device_error_quark from itdb_plist.h
+	to itdb_device.h 
+
+2008-07-30  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_itunesdb.c: Rename unk146 to explicit_flag in
+	  Itdb_Track now that it's purpose is known
+
+2008-07-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_plist.c: add gtk-doc documentation
+
+2008-07-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sysinfo_extended_parser.c: 
+	* src/itdb_sysinfo_extended_parser.h: add a GError argument to
+	SysInfoExtended parsing functions
+	* src/itdb_device.c: pass NULL GError argument to call to
+	SysInfoExtended functions
+	* tests/test-sysinfo-extended.c: add a GError argument when calling
+	SysInfoExtended parsing functions
+
+2008-07-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add itdb_device_error_quark()
+	* src/itdb_plist.h:
+	* src/itdb_plist.c: add error handling to XML parsing (using
+	GError)
+	* src/itdb_sysinfo_extended_parser.c: pass a NULL GError to call to
+	plist parsing function
+
+2008-07-26  Christophe Fergeau  <teuf at gnome.org>
+
+	* tests/test-fw-id.c: (main): add missing call to g_type_init
+
+2008-07-20  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c (pack_RGB_565), (pack_RGB_555)
+          (pack_RGB_888): handle horizontal padding correctly
+          (affected pictures in portrait format).
+
+	* src/itdb_device.c: added some comments.
+
+2008-07-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c (itdb_device_set_timezone_info): avoid g_stat
+	  on NULL filename. Thanks to Andrea.
+
+2008-07-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c: assume the following generations do not
+	  support sparse artwork:
+            ITDB_IPOD_GENERATION_NANO_1:
+            ITDB_IPOD_GENERATION_NANO_2:
+            ITDB_IPOD_GENERATION_VIDEO_1:
+            ITDB_IPOD_GENERATION_VIDEO_2:
+
+2008-07-17  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* README
+	  bindings/python/gpod.i.in
+	  bindings/python/ipod.py
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/artwork.sgml
+	  docs/reference/tmpl/itunesdb-db.sgml
+	  src/itdb.h: Remove references to itdb_thumb_get_gdk_pixbuf()
+
+2008-07-10  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: if we fail to write ithmb files for some
+	reason, don't go on trying to write the ArtworkDB/PhotoDB as well
+
+2008-07-09  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/POTFILES.in: add src/itdb_thumb.c
+
+2008-07-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: properly detect newer libsgutils (the so name was
+	changed)
+	* tools/ipod-scsi-inquiry.c: add missing include
+	Based on a patch from Dan Horák (dan at danny.cz)
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: fix model number information grabbed from
+	podsleuth
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: add a mapping from serial numbers to model
+	numbers to make it easy to go from a serial number read from
+	SysInfoExtended to an Itdb_IpodInfo
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h: add missing red ipod shuffles as well as 2GB
+	shuffles to the list of known ipod models
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h: add itdb_device_get_storage_info method
+	* src/itdb_itunesdb.c: use that method instead of directly using
+	statvfs, makes it easier to port things over to MSVC8
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/db-itunes-parser.h: remove unused constant
+	* src/db-parse-context.c:
+	* src/db-parse-context.h: use GMappedFile instead of directly using
+	mmap, it's needed for MSVC8 portability
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/itdb_itunesdb.c
+	* src/itdb_track.c: get rid of inner functions since it is a gcc
+	specific extension and MSVC8 doesn't like that
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/db-artwork-parser.c
+	* src/db-parse-context.c
+	* src/db-parse-context.h: get rid of unused argument to
+	db_parse_context_destroy (it was always set to TRUE)
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/ithumb-writer.c: fix bug in the function scaling and cropping
+	thumbnails, in the non-cropping case, the returned pixbuf size
+	didn't reflect the size of the scaled pixbuf
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: fix small memory leak
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	* src/ithumb-writer.c: fix typo in thumbnail rearranging code, we
+	were wrongly appending Itdb_Thumb_Ipod instances to lists of
+	Itdb_Thumb_Ipod_Item
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: properly set padding to 0 in mhods type 3
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/ithumb-writer.c: don't leak the list of image formats we get
+	from the ItdbDevice
+
+2008-06-29  Daniele Forsi <dforsi at users.sourceforge.net>
+
+        * src/itdb_itunesdb.c src/itdb_thumb.c src/itdb_device.c 
+	  src/itdb_photoalbum.c: fix typos in comments
+
+2008-06-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c (itdb_write_ithumb_files): fix bug when
+	  writing photos (loop variable "it" re-used inside loop).
+	  Rename loop variable to "itw" also in case of writing artwork.
+
+	* src/itdb_thumb.c (itdb_thumb_to_pixbuf_at_size):
+
+	  If requesting a thumb from the iPod smaller than available, none
+	  would be returned. Fixed. Thumbs from the iPod would not be
+	  scaled even if requested. Fixed.
+
+	  If requesting a thumb from a file or existing pixbuf, scaling
+	  was done even if none was requested (width/height =
+	  0/-1). Fixed.
+
+	  Introduced selection of smallest available thumbnail
+	  (width/height = 0) besides largest available thumbnail
+	  (width/height = -1).
+
+	  TODO: consider aspect ratio of requested picture (currently it
+	  is very likely that some of the square thumbs are returned...)
+	
+	  src/itdb_artwork.c (itdb_artwork_get_thumbnail):
+	  Introduced selection of smallest available thumbnail
+	  (width/height = 0) besides largest available thumbnail
+	  (width/height = -1). (Only necessary documentation.)
+
+2008-06-28  Christophe Fergeau  <teuf at gnome.org>
+
+	patch by: Mike Heffner <mikeh at fesnel.com>
+
+	* src/Makefile.am:
+	* src/db-artwork-writer.c: fix compilation with older glib (without
+	GChecksum)
+
+2008-06-24  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: rework timezone handling: handle timezones as
+	stored on 5g ipods (hopefully) and fallback to using the computer
+	timezone if we can't figure out the ipod timezone
+	* tests/get-timezone.c: use functions from libgpod to get the
+	timezone instead of duplicating some itdb_device code
+
+2008-06-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: oops, forgot a ','
+
+2008-06-14  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: fix some entries in the ipod_model_table by
+	using libipoddevice and podsleuth as a reference
+
+2008-06-14  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_track.c: remove bogus function to check if the ipod
+	supports video: it didn't take into account the new ipods released
+	after the 1st ipod video
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.h:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/ithumb-writer.c: use background color and alignement
+	information from SysInfoExtended if available
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c:
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_sysinfo_extended_parser.h: implements
+	itdb_device_supports_sparse_artwork (instead of the old stub always
+	returning TRUE). Use data from SysInfoExtended if it's available,
+	use hardcoded table from libgpod if not.
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_sysinfo_extended_parser.h: merge Itdb_ArtworkFormat and
+	SysInfoImageFormat, use artwork formats from SysInfoExtended when
+	it's available instead of using the hardcoded tables from libgpod
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c:
+	* src/db-image-parser.h:
+	* src/itdb.h:
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/ithumb-writer.c: get rid of ItdbThumbType, it's replaced by
+	pointers to the appropriate Itdb_ArtworkFormat for the thumbnail
+	type when it's needed
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: remove duplicated artwork/photo support
+	testing functions
+	* src/db-artwork-parser.h: ditto
+	* src/itdb_itunesdb.c: s/ipod_supports_XXX/itdb_device_supports_XXX
+	* src/itdb_photoalbum.c: ditto
+	* src/itdb.h: use a const Itdb_Device argument for
+	itdb_device_supports_*, add  ITDB_IPOD_GENERATION_IPHONE_1 to
+	Itdb_IpodGeneration, get rid of ITDB_IPOD_GENERATION_FIFTH and 
+	ITDB_IPOD_GENERATION_SIXTH
+	* src/itdb_device.c: split functions to get artwork format from the
+	ipod in 2 separate functions: instead of
+	itdb_device_get_artwork_formats we now have
+	itdb_device_get_photo_formats and itdb_device_get_cover_art_formats
+	* src/itdb_device.h:
+	* src/db-image-parser.c: use the separate
+	get_cover_art_formats/get_photos_formats functions
+	* src/db-artwork-writer.c: ditto
+	* src/ithumb-writer.c: ditto
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/gchecksum.c: fix compilation (it's only compiled on system with
+	older glib versions)
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c:
+	* src/itdb_artwork.c:
+	* src/itdb_thumb.c:
+	* src/itdb_thumb.h: fix compilation when gdk-pixbuf isn't present
+
+2008-06-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_track.c (itdb_track_remove_thumbnails): set mhii_link
+	  to 0.
+
+	* src/db-artwork-parser.c (mhfd_associate_itunesdb_artwork):
+	  remove thumbnails if mhii_link is invalid.
+
+2008-06-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/gchecksum.c
+	  src/gchecksum.h
+	  src/Makefile.am
+	  configure.ac: copied gchecksum from glib 2.16.3. It's used if we
+	  compile on a system that does not have glib 2.16 or
+	  higher. Testing is needed whether it's really pulled in in those
+	  cases -- I'm using 2.16.3 myself.
+
+	* src/itdb_itunesdb.c (mk_mhit): write mhii_link.
+
+	* src/db-artwork-writer.c: code to handle sparse artwork
+	  correctly. 
+	  
+	  (ipod_supports_sparse_artwork): currently hard-coded to
+	  TRUE. Will be changed in the future to reflect the information
+	  given in the SysInfoExtended. Change yourself if your iPod does
+	  not support Sparse Artwork (sharing of thumbnails between
+	  several tracks).
+
+2008-06-01  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_thumb.c
+	  remove some unnecessary checks for NULL pointer
+	  (itdb_thumb_duplicate): move g_list_reverse() outside the loop
+	  modifying the list.
+	
+2008-05-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_thumb.c
+	  src/itdb_thumb.h
+	  src/ithumb-writer.c
+	  src/itdb_photoalbum.c: fixed a number of compile-time warnings.
+
+2008-05-30  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch from Ian Stewart
+
+	* src/itdb_itunesdb.c: don't pass NULL sort_composer names down to
+	jump_table_letter, fixes a crash reported by Andy Busch
+
+2008-05-30  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/Makefile.am:
+	* src/db-artwork-parser.c:
+	* src/db-artwork-writer.c:
+	* src/db-image-parser.c:
+	* src/db-image-parser.h:
+	* src/itdb.h:
+	* src/itdb_artwork.c:
+	* src/itdb_device.h:
+	* src/itdb_photoalbum.c:
+	* src/itdb_track.c:
+	* src/ithumb-writer.c:
+	* tests/test-covers.c:
+	* tests/test-photos.c: rework Itdb_Thumb type. Now it's split into
+	different subtypes depending on what it represents (GdkPixbuf,
+	thumbnail read from the ipod, ...). Itdb_Artwork now contains only a
+	pointer to a single Itdb_Thumb (it used to contain a GList * of
+	Itdb_Thumb) since the only time when the list is useful is for thumbs
+	read from the ipod. Using a list for the other types of thumbnails
+	created some complications when trying to set art on an Itdb_Track that
+	wasn't attached to an Itdb_iTunesDB.
+
+2008-05-29  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itunesdb.c:
+	* src/ithumb-writer.c: add missing static to internal functions
+
+2008-05-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/db-artwork-parser.c (parse_mhii): removed artwork_fallback
+	  variable upon Christophe's suggestion and streamlined code.
+
+2008-05-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_track.c (itdb_track_set_thumbnails_internal): set
+	  artwork ID to 0 after removing thumbnails.
+
+	* src/db-artwork-parser.c (parse_mhii): move out dbid association
+	  to a separate function.
+
+	  (mhfd_associate_itunesdb_artwork): handle dbid and mhii_link
+	  association of artwork to track
+
+	  (parse_mhfd): loop over the number of mhsd hunks instead of
+	  hardcoding it. Call mhfd_associate_itunesdb_artwork().
+
+	* src/itdb_itunesdb.c (get_mhit): read the mhii_link field.
+
+	* src/db-artwork-writer.c (write_mhli): handle unset artwork
+	  correctly.
+
+	  (itdb_track_filter_thumbnails): remove thumbnails correctly.
+
+	* src/db-parse-context.c (db_parse_context_get_sub_context): copy
+	  newly introduced artwork field.
+
+	* tests/test-covers.c: print mhii_link.
+
+	* src/itdb.h: (Itdb_Track) added mhii_link. (Itdb_Artwork): added
+	  dbid.
+
+	* src/itdb.h, src/db-artwork-parser.c, src/db-artwork-writer.c,
+	  src/itdb_device.c, src/ithumb-writer.c, src/itdb_artwork.c:
+	  added ITDB_THUMB_CHAPTER_SMALL/LARGE.
+
+	* src/itdb_device.c: ipod_classic_1_artwork_info: correct
+	  ITDB_THUMB_COVER_SMALL/LARGE entries.
+	
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: libxml presence is mandatory unless
+	--disable-libxml is passed to configure
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: don't insert NULL firewire IDs in the SysInfo
+	hash table
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: rework libxml detection
+	* src/Makefile.am: remove LIBXML_CFLAGS/LIBXML_LIBS since they are
+	no longer used
+	* src/itdb_plist.c: add stub functions when libxml isn't available
+	* src/itdb_sysinfo_extended_parser.c: include config.h
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-debug.c:
+	* src/db-artwork-writer.c:
+	* src/db-image-parser.c:
+	* src/db-itunes-parser.h:
+	* src/itdb_device.h:
+	* src/ithumb-writer.c: rename correlation_id to format_id (this is
+	how that value is called in SysInfoExtended)
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: check libxml presence
+	* src/Makefile.am: add new files, remove obsolete ones
+	* src/itdb_plist.h: 
+	* src/itdb_plist.c: plist parser, this parses a plist XML file to a
+	GHashTable of GValue *. This parser should be generic, ie it
+	doesn't know it's parsing SysInfoExtended, it only cares about it
+	being a plist file
+	* src/itdb_sysinfo_extended_parser.h:
+	* src/itdb_sysinfo_extended_parser.c: convert the parsed plist data
+	to data structures usable by libgpod
+	* src/itdb_device.h:
+	* src/itdb_device.c: parses SysInfoExtended in addition to SysInfo
+	* src/itdb_sysinfo.c: this hacky parser is obsoleted by the new
+	(much more complete) SysInfoExtended parser, so it's removed
+	* tests/Makefile.am:
+	* tests/test-sysinfo-extended-parsing.c: small test program for the
+	new parser
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Ian Stewart <ian.stewart at ozemail.com.au>
+
+	* src/itdb_itunesdb.c: add jump letter support (mhod53)
+
+2008-05-24  Christophe Fergeau <teuf at gnome.org>
+
+	* src/ithumb-writer.c: factor some code out of
+	ithumb_writer_write_thumbnail into separate functions to make the
+	code more readable
+
+2008-05-24  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Jacob Hoffman-Andrews <jsha at newview.org>
+	
+	* src/itdb_device.h: add 'crop' field to Itdb_ArtworkFormat
+	* src/itdb_device.c: fill this 'crop' field for the iphone
+	* src/ithumb-writer.c: use that new 'crop' field to crop the
+	thumbnails when the Itdb_ArtworkFormat requires it.
+
+2008-05-24  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Jacob Hoffman-Andrews <jsha at newview.org>
+
+	* tools/hal-callout.c: add missing #include <unistd.h>
+
+2008-05-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-covers.c: print more info (marginally)
+
+2008-05-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_photoalbum.c
+	  src/itdb_private.h
+	  src/db-artwork-writer.c: renamed itdb_get_free_photo_id() to
+	  itdb_get_max_photo_id() and implemented Jacob Hoffman-Andrew's
+	  patch about the photo_ids and album_ids being shared.
+
+	* tests/test-covers.c: print more info (marginally)
+
+2008-05-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-covers.c: print more status messages.
+
+2008-05-01  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac:
+	  Bump version to 0.6.1SVN
+
+	* bindings/python/ipod.py: write shuffle data (thanks to Diogo
+	  Dutra)
+
+2008-04-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * bindings/python/examples/Makefile.am
+	  Added fix_empty_artist_field.py provided by Thomas Perl.
+
+2008-03-29  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/Makefile.am
+	  docs/reference/Makefile.am
+	  src/Makefile.am: cleanup more of our dirs with make uninstall
+
+	* tests/test-rebuild-db.cc: include string.h to fix builds
+	  with gcc 4.3 (fixes SF tracker #1928618)
+
+2008-03-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac
+	  m4/python.m4: shell portability fixes (courtesy of Klaus Heinz)
+
+2008-02-13  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/ipod.py: Track.set_thumbnail() was renamed
+	  to Track.set_coverart_from_file() a long time ago
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.c:
+	* src/db-artwork-debug.h: fix mhod type1 and mhod type3 dumping
+	when debugging is enabled
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.h: merge mhod type1 and mhod type3 dumping
+	functions
+	* src/db-artwork-writer.c: adjust to the change above
+	* src/db-artwork-parser.c: merge mhod type1 and mhod type3 parsing
+	* src/db-itunes-parser.h: remove obsolete comment
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: use enum name instead of hardcoded int
+	* src/db-artwork-writer.c: add comments about values that aren't
+	swapped because they are 8 bit values
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-itunes-parser.h: merge ArtworkDB_MhodHeaderArtworkType3
+	and MhodHeaderArtworkType1 into a single struct called
+	ArtworkDB_MhodHeaderString
+	* src/db-artwork-parser.c: 
+	* src/db-artwork-writer.c: adjust to the above change
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: add missing g_free that could cause
+	memory leaks
+
+2008-01-30  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch by Martin Aumueller 	
+
+	* tests/test-ls.c: make sure the various fields we are trying to
+	print aren't NULL, this fixes a crash that was observed with
+	iphones
+
+2007-11-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: don't use itdb_filename_ipod2fs to generate
+	the filename to put on the shuffle since on windows that would use
+	\ as a path separator instead of the correct /
+
+2007-11-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_private.h:
+	* src/itdb_itunesdb.c: add itdb_file_set_contents to workaround a
+	rename issue on sshfs (existing files on the FS can't be
+	atomatically erased during a rename). Use it in wcontents_write
+	* src/db-artwork-writer.c: use itdb_file_set_contents to write the
+	ArtworkDB
+
+2007-11-15  Christophe Fergeau  <teuf at gnome.org>
+	
+	* src/db-artwork-writer.c:
+	* src/db-parse-context.c:
+	* src/itdb_device.c:
+	* src/itdb_itunesdb.c:
+	* src/ithumb-writer.c: don't include unistd.h on systems which
+	don't have it
+
+2007-11-16  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: rework itdb_cp for MacOSX/Windows
+	portability
+
+2008-01-26  Michael Tiffany <tiffman at users.sourceforge.net>
+
+        * src/itdb_chapterdata.c: file missed being added in
+	previous checkin
+
+2008-01-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_track.c
+	* src/itdb_itunesdb.c
+	* src/itdb_chapterdata
+	* src/itdb.h
+	* src/Makefile.am: applied chapterdata patch by Michael Tiffany.
+
+2008-01-02  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: fix ITDB_THUMB_PHOTO_FULL_SCREEN format on
+	ipod classic and nano video, thanks to Tomas Carnecky for pointing
+	that out
+
+2007-12-13  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* Makefile.am: add ACLOCAL_AMFLAGS to fix some autoreconf
+	  issues (thanks to Frank Lichtenheld at Debian)
+
+2007-11-26  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac
+	  libgpod-1.0.pc.in:
+	  conditionally add gdk-pixbuf to pkg-config Requires.
+	  exit with an error if gdk-pixbuf or pygobject are explicitly
+	  requested and not found.
+	  add AM_PROG_CC_C_O to make automake happy about per-target
+	  flags in tests/Makefile.am
+
+2007-11-25  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* autogen.sh: pass any user-specified options to configure
+
+2007-11-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_playlist.c (itdb_splr_eval): track length in rules for
+	  smart playlists was treated as seconds, but the iPod treats them
+	  as milliseconds. If you told libgpod to create a smart playlist
+	  with tracks less than 100 secs in length, but the life update of
+	  the iPod would interpret that rule as "tracks less than 100 msec
+	  in length", giving a vastly different result. Tested with iPod
+	  Nano 1G and iPod nano Video (3G).
+
+	  Requires corresponding fix in GUIs using this function.
+
+2007-11-16  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: fix typoes in iPod Touch model lists
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: use libgpod as the prefix of music files to
+	be copied to the ipod instead of gtkpod
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: get rid of local g_mkdir_with_parents copy
+	since we now depend on glib 2.8 which have it. Replace mkdir with
+	g_mkdir
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: ignore invalid UTF-8 paths which might have
+	been added to the iPod by the user
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_photoalbum.c: use g_list_remove all instead of an
+	inefficient combination of g_list_find + g_list_remove
+
+2007-11-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_photoalbum.c (itdb_photodb_photoalbum_remove): make
+	  sure same photo isn't freed multiple times if it was added in an
+	  album multiple times.
+
+2007-11-13  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_photoalbum.c: fix bug in itdb_photodb_photoalbum_remove,
+	when removing all the photos from the photodatabase, we were
+	erasing elements and iterating over the list at the same time,
+	which resulted in the function not working properly
+
 2007-11-10  Christophe Fergeau <teuf at gnome.org>
 
 	* Makefile.am: add README.SysInfo to EXTRADIST

Modified: libgpod/trunk/Makefile.am
===================================================================
--- libgpod/trunk/Makefile.am	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/Makefile.am	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,6 +3,8 @@
 # build documentation when doing a distcheck.
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
 
+ACLOCAL_AMFLAGS = -I m4
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libgpod-1.0.pc
 

Modified: libgpod/trunk/Makefile.in
===================================================================
--- libgpod/trunk/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -14,15 +14,11 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,12 +32,12 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
 	$(srcdir)/libgpod-1.0.pc.in $(top_srcdir)/configure AUTHORS \
 	COPYING ChangeLog INSTALL NEWS compile config.guess config.sub \
 	depcomp install-sh ltmain.sh missing mkinstalldirs py-compile
-subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
 	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
@@ -49,7 +45,7 @@
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = libgpod-1.0.pc
@@ -57,10 +53,11 @@
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -70,6 +67,8 @@
 am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
 pkgconfigDATA_INSTALL = $(INSTALL_DATA)
 DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -85,10 +84,8 @@
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
-ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ACLOCAL_AMFLAGS = -I m4
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -115,35 +112,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -184,15 +170,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -228,13 +216,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -246,6 +234,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -277,8 +266,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = src tools tests po m4 docs bindings 
 
 # build documentation when doing a distcheck.
@@ -339,7 +331,7 @@
 config.h: stamp-h1
 	@if test ! -f $@; then \
 	  rm -f stamp-h1; \
-	  $(MAKE) stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
 	else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@ -363,10 +355,9 @@
 
 distclean-libtool:
 	-rm -f libtool
-uninstall-info-am:
 install-pkgconfigDATA: $(pkgconfig_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
 	@list='$(pkgconfig_DATA)'; for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  f=$(am__strip_dir) \
@@ -413,8 +404,7 @@
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
 	@failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -458,8 +448,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -484,8 +474,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -495,13 +485,12 @@
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -516,24 +505,22 @@
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
-	mkdir $(distdir)
-	$(mkdir_p) $(distdir)/. $(distdir)/bindings/python $(distdir)/docs/reference $(distdir)/m4 $(distdir)/po
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	test -d $(distdir) || mkdir $(distdir)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -547,7 +534,7 @@
 	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    distdir=`$(am__cd) $(distdir) && pwd`; \
 	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -555,6 +542,8 @@
 	      $(MAKE) $(AM_MAKEFLAGS) \
 	        top_distdir="$$top_distdir" \
 	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -562,7 +551,7 @@
 	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r $(distdir)
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -572,6 +561,10 @@
 	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
 	$(am__remove_distdir)
 
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__remove_distdir)
@@ -598,6 +591,8 @@
 	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
@@ -637,7 +632,7 @@
 	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
 	@cd $(distuninstallcheck_dir) \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -662,7 +657,7 @@
 installdirs: installdirs-recursive
 installdirs-am:
 	for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -711,12 +706,20 @@
 
 install-data-am: install-pkgconfigDATA
 
+install-dvi: install-dvi-recursive
+
 install-exec-am:
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -737,25 +740,26 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
+uninstall-am: uninstall-pkgconfigDATA
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-	check-am clean clean-generic clean-libtool clean-recursive \
-	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-	dist-shar dist-tarZ dist-zip distcheck distclean \
-	distclean-generic distclean-hdr distclean-libtool \
-	distclean-recursive distclean-tags distcleancheck distdir \
-	distuninstallcheck dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
-	install-pkgconfigDATA install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+	dist-gzip dist-lzma dist-shar dist-tarZ 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-recursive uninstall uninstall-am \
 	uninstall-pkgconfigDATA
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.

Modified: libgpod/trunk/NEWS
===================================================================
--- libgpod/trunk/NEWS	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/NEWS	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,3 +1,80 @@
+Overview of changes in libgpod 0.7.0
+====================================
+
+* support for iPod Nano 4th generation
+
+This includes support for cover art.
+Please note that this release DOES NOT support iPhones and iPod Touch
+with firmware 2.x
+
+* support for "sparse artwork" writing
+
+This lets us write more compact artwork files to the iPod, which in turn makes
+the UI more responsive (and saves disk space on the iPod).
+
+* jump table support
+
+These are the big letters that show up in the album/artist list when someone
+quickly scrolls through them. Thanks a lot to Ian Stewart for implementing it.
+
+* chapter data support
+
+Chapter data allows large files (movies, audio books, podcasts) to be divided
+into smaller sections.  Thanks to Michael Tiffany for this feature.
+
+* improved timezone handling
+
+This should now work up to 5G iPods, for newer iPods, libgpod will assume 
+timestamps are in UTC.
+
+* translation updates
+
+Thanks to all of our translators :)
+
+* much more complete API doc
+
+All of the public API is now documented with gtk-doc.
+
+* simplification of the cover art handling API
+
+The API for artwork for developers using libgpod should be more
+straightforward, if things are missing, don't hesitate to get in touch
+with us ;)
+
+* extensive plist parser
+
+In libgpod 0.6.0, libgpod got a very basic parser for the SysInfoExtended file
+(which is a XML plist description). This parser was rewritten for this release
+to parse the whole file. This parser depends on libxml2 but its compilation
+will be disabled if libxml2 and its development headers can't be found.
+
+* add mapping from iPod serial numbers to iPod models
+
+The iPod serial number can be obtained programmatically, and its last 3 digits
+are characteristic of an iPod (type, generation, color, capacity). libgpod
+can now find out an iPod model using this serial number.
+
+* portability improvements to windows and macosx
+
+This is probably not perfect yet, but the goal is to improve it as much as
+possible so don't hesitate to send bug reports if some things are still not
+working. Thanks to the songbird project and Éric Lassauge.
+
+* reworked handling of artwork formats
+
+libgpod can now automatically use the artwork formats described in
+SysInfoExtended even if the iPod model is unknown, this should make it possible
+for libgpod to support artwork on newly released iPod models without the need
+to upgrade.
+
+* python bindings are more consistent with other python container objects
+
+This enables testing whether a key exists in an object (e.g. "'title' in track")
+as well as iterating over a Track or Photo object's keys, values, or items.
+
+* bug fixes and code cleanup all over the place
+
+
 Overview of changes in libgpod 0.6.0
 ====================================
 

Modified: libgpod/trunk/README
===================================================================
--- libgpod/trunk/README	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/README	2009-01-24 12:10:00 UTC (rev 341)
@@ -48,11 +48,9 @@
 are available. Please see itdb.h for details (itdb_playlist_*()).
 
 Each track can have a thumbnail associated with it. You can retrieve a
-GdkPixmap of the thumbnail using itdb_thumb_get_gdk_pixbuf() (tracks
-have thumbnails of the following types associated:
-ITDB_THUMB_COVER_SMALL and _LARGE). You can remove a thumbnail with
-itdb_track_remove_thumbnails(). And finally, you can set a new
-thumbnail using itdb_track_set_thumbnails().
+GdkPixmap of the thumbnail using itdb_artwork_get_pixbuf().  You can
+remove a thumbnail with itdb_track_remove_thumbnails(). And finally,
+you can set a new thumbnail using itdb_track_set_thumbnails().
 
 Please note that iTunes additionally stores the artwork as tags in the
 original music file. That's also from where the data is read when

Modified: libgpod/trunk/README.SysInfo
===================================================================
--- libgpod/trunk/README.SysInfo	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/README.SysInfo	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,21 +3,32 @@
 needs to know the so-called iPod "firewire id", otherwise the iPod won't 
 recognize what libgpod wrote to it and will behave as if it's empty.
 
-There are two ways to set up the iPod to make libgpod able to find its firewire
-id.
+There are several ways to set up an iPod so libgpod can find its firewire id.
 
-The 1st one is mostly automated. First, make sure you have libsgutils installed
-before running configure/autogen.sh. If you built libgpod without it, install 
-it and run configure/make/make install. You should now have an 
-ipod-read-sysinfo-extended tool available. Run it with the iPod device path 
-(eg /dev/sda) and the iPod mount point (eg /mnt/ipod) as arguments. This may 
-require root privileges. ipod-read-sysinfo-extended will read an XML
-file from the iPod and write it as 
-/mnt/ipod/iPod_Control/Device/SysInfoExtended. See 
-http://ipodlinux.org/Device_Information for more details about the method used.
-Having that file is enough for libgpod to figure out the iPod firewire id.
+The preferred method is automatic. Make sure you have hal and libsgutils
+installed before running configure/autogen.sh. If you built libgpod without
+them, run configure/make/make install after you install them.
 
-The 2nd method requires more manual intervention. First, you need to get your
+A hal callout and .fdi file will be built and installed. This will query an iPod
+when it is plugged in and save the SysInfoExtended file in the proper place.
+This should be entirely automatic. If you have trouble with this, see the
+TROUBLESHOOTING file for some hints.
+
+If you build with libsgutils but without hal, the next best method is mostly
+automatic. You should have an ipod-read-sysinfo-extended tool available. Run it
+with the iPod device path and the iPod mount point /mnt/ipod) as arguments. For
+example:
+
+    $ ipod-read-sysinfo-extended /dev/sda /mnt/ipod
+
+This may require root privileges. It reads an XML file from the iPod and writes
+it as /mnt/ipod/iPod_Control/Device/SysInfoExtended. More details on this method
+can be found at http://ipodlinux.org/Device_Information.
+
+Having the SysInfoExtended file created by ipod-read-sysinfo-extended or the hal
+callout is enough for libgpod to figure out the iPod firewire id.
+
+The last method requires more manual intervention. First, you need to get your
 firewire id manually. To do that, run "sudo lsusb -v | grep -i Serial" (without
 the "") with your iPod plugged in, this should print a 16 character long string
 like 00A1234567891231. For an iPod Touch, this number will be much longer than

Modified: libgpod/trunk/TROUBLESHOOTING
===================================================================
--- libgpod/trunk/TROUBLESHOOTING	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/TROUBLESHOOTING	2009-01-24 12:10:00 UTC (rev 341)
@@ -67,15 +67,15 @@
 
 * Compiling for 64bit systems
 
-The current automake/autobuild setup doesn't set the correct
+The current autoconf/automake setup doesn't set the correct
 installation path on 64bit systems. To work around this issue and to
 get the libraries installed in the correct locations you need to
-pecify a couple extra parameters to autoge .sh (or configure). If your
+specify a couple extra parameters to autogen.sh (or configure). If your
 installation prefix is '/opt/gnome' use the following:
 
-./autogen.sh --prefix=/opt/gnome --enable-libsuffix=64 --libdir=/opt/gnome/lib6
+./autogen.sh --prefix=/opt/gnome --enable-libsuffix=64 --libdir=/opt/gnome/lib64
 
-If you use a diferent prefix, replace '/opt/gnome' accordingly.
+If you use a different prefix, replace '/opt/gnome' accordingly.
 
 Added on 2007/1/15: Note that I don't have any problems on my Debian
 4.1.1-13 system and won't have to do any of this.
@@ -95,3 +95,21 @@
 
 ------------------------------------------------------------
 
+* The hal callout doesn't run automatically to setup SysInfoExtended
+
+If you have hal and libsgutils installed before running autogen.sh or configure,
+a hal callout and .fdi file will be built and installed. This will query an iPod
+when it is plugged in and save the SysInfoExtended file in the proper place.
+This should be completely automatic. However, for this to work, the callout must
+be installed in hal's callout path. $libdir/hal/scripts is the most portable
+location (hal's $libdir can be found using pkg-config). If you are building
+libgpod from source with the default $prefix (/usr/local), you need to take care
+to install the callout and .fdi file in the proper locations. The easiest way to
+do this at the moment is by passing the locations to the make command. For
+example:
+
+    $ ./configure && make
+    ...
+    $ make haldir="$(pkg-config --variable libdir hal)/hal/scripts" \
+           fdidir="$(pkg-config --variable prefix hal)/share/hal/fdi" \
+           install

Modified: libgpod/trunk/aclocal.m4
===================================================================
--- libgpod/trunk/aclocal.m4	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/aclocal.m4	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008  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.
@@ -11,6 +11,14 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+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'.])])
+
 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
 #
@@ -114,8 +122,7 @@
 #-----------------
 glib_DEFUN([GLIB_WITH_NLS],
   dnl NLS is obligatory
-  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
-    USE_NLS=yes
+  [USE_NLS=yes
     AC_SUBST(USE_NLS)
 
     gt_cv_have_gettext=no
@@ -447,7 +454,7 @@
 
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
-# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL
+# serial 51 AC_PROG_LIBTOOL
 
 
 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -999,6 +1006,7 @@
       esac
       ;;
     *64-bit*)
+      libsuff=64
       case $host in
         x86_64-*kfreebsd*-gnu)
           LD="${LD-ld} -m elf_x86_64_fbsd"
@@ -2057,11 +2065,13 @@
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -2073,18 +2083,6 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -2859,7 +2857,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu)
+netbsd*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -3893,7 +3891,7 @@
 	;;
     esac
     ;;
-  netbsd* | netbsdelf*-gnu)
+  netbsd*)
     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
       wlarc=
@@ -5574,7 +5572,7 @@
 	    ;;
 	esac
 	;;
-      netbsd* | netbsdelf*-gnu)
+      netbsd*)
 	;;
       osf3* | osf4* | osf5*)
 	case $cc_basename in
@@ -5949,9 +5947,6 @@
   cygwin* | mingw*)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
   ;;
-  linux* | k*bsd*-gnu)
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-  ;;
   *)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
@@ -6157,13 +6152,12 @@
   $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
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
       else
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -6595,7 +6589,7 @@
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -7094,16 +7088,14 @@
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-			 [pkg_failed=yes])
-    fi
-else
-	pkg_failed=untried
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG
 
@@ -7147,9 +7139,9 @@
 if test $pkg_failed = yes; then
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
         else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
@@ -7184,7 +7176,7 @@
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -7194,14 +7186,31 @@
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+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.10.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.9.6])])
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -7258,14 +7267,14 @@
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 # 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.
 
-# serial 7
+# serial 8
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -7274,8 +7283,10 @@
 [AC_PREREQ(2.52)dnl
  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -7289,15 +7300,14 @@
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 # 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.
 
-# serial 8
+# serial 9
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -7325,6 +7335,7 @@
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                    [depcc="$$1"   am_compiler_list=])
 
@@ -7390,6 +7401,7 @@
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -7442,7 +7454,8 @@
   AMDEPBACKSLASH='\'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@ -7467,8 +7480,9 @@
   # some people rename them; so instead we look at the file content.
   # Grep'ing the first line is not enough: some people post-process
   # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
     dirpart=`AS_DIRNAME("$mf")`
   else
     continue
@@ -7527,14 +7541,14 @@
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 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.
 
-# serial 12
+# serial 13
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -7551,16 +7565,20 @@
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.60])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
 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
 # test whether we have cygpath
@@ -7580,6 +7598,9 @@
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
@@ -7615,6 +7636,10 @@
                   [_AM_DEPENDENCIES(CXX)],
                   [define([AC_PROG_CXX],
                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
 ])
 
@@ -7628,16 +7653,17 @@
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
@@ -7650,7 +7676,7 @@
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -7755,16 +7781,50 @@
 rm -f confinc confmf
 ])
 
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+# 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.
+
+# serial 5
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_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
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 # 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.
 
-# serial 4
+# serial 5
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -7780,6 +7840,7 @@
 # If it does, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
@@ -7790,7 +7851,7 @@
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -7798,60 +7859,23 @@
 
 # AM_PROG_MKDIR_P
 # ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
@@ -8144,9 +8168,21 @@
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006  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.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.

Modified: libgpod/trunk/bindings/Makefile.in
===================================================================
--- libgpod/trunk/bindings/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -13,15 +13,11 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -50,10 +46,13 @@
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = python
@@ -61,8 +60,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -89,35 +86,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -158,15 +144,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -202,13 +190,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -220,6 +208,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -251,8 +240,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 @HAVE_PYTHON_TRUE at SUBDIRS = python
 all: all-recursive
 
@@ -293,10 +285,6 @@
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -328,8 +316,7 @@
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
 	@failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -373,8 +360,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -399,8 +386,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -410,13 +397,12 @@
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -430,22 +416,21 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -459,7 +444,7 @@
 	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    distdir=`$(am__cd) $(distdir) && pwd`; \
 	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -467,6 +452,8 @@
 	      $(MAKE) $(AM_MAKEFLAGS) \
 	        top_distdir="$$top_distdir" \
 	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -506,8 +493,7 @@
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -521,12 +507,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
 install-exec-am:
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -545,22 +539,24 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean 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-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
 
 # 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.

Modified: libgpod/trunk/bindings/python/Makefile.am
===================================================================
--- libgpod/trunk/bindings/python/Makefile.am	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/Makefile.am	2009-01-24 12:10:00 UTC (rev 341)
@@ -60,4 +60,7 @@
 
 test:
 	$(MAKE) -C tests test
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(gpoddir)
 endif

Modified: libgpod/trunk/bindings/python/Makefile.in
===================================================================
--- libgpod/trunk/bindings/python/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -14,15 +14,11 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -64,30 +60,37 @@
 @HAVE_PYTHON_TRUE@	$(top_builddir)/src/libgpod.la
 @HAVE_PYTHON_TRUE at nodist__gpod_la_OBJECTS = _gpod_la-gpod_wrap.lo
 _gpod_la_OBJECTS = $(nodist__gpod_la_OBJECTS)
+_gpod_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(_gpod_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
 @HAVE_PYTHON_TRUE at am__gpod_la_rpath = -rpath $(gpoddir)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(nodist__gpod_la_SOURCES)
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
 am__gpod_PYTHON_DIST = __init__.py gtkpod.py ipod.py
 gpodPYTHON_INSTALL = $(INSTALL_DATA)
 nodist_gpodPYTHON_INSTALL = $(INSTALL_DATA)
 py_compile = $(top_srcdir)/py-compile
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -95,8 +98,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -123,35 +124,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -192,15 +182,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -236,13 +228,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -254,6 +246,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -285,8 +278,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = examples tests
 EXTRA_DIST = \
         README.in           \
@@ -358,21 +354,21 @@
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 install-gpodLTLIBRARIES: $(gpod_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	test -z "$(gpoddir)" || $(mkdir_p) "$(DESTDIR)$(gpoddir)"
+	test -z "$(gpoddir)" || $(MKDIR_P) "$(DESTDIR)$(gpoddir)"
 	@list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
 	  if test -f $$p; then \
 	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) --mode=install $(gpodLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
-	    $(LIBTOOL) --mode=install $(gpodLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(gpodLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(gpodLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
 	  else :; fi; \
 	done
 
 uninstall-gpodLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@set -x; list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
+	@list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
 	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(gpoddir)/$$p'"; \
-	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(gpoddir)/$$p"; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gpoddir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gpoddir)/$$p"; \
 	done
 
 clean-gpodLTLIBRARIES:
@@ -384,7 +380,7 @@
 	  rm -f "$${dir}/so_locations"; \
 	done
 _gpod.la: $(_gpod_la_OBJECTS) $(_gpod_la_DEPENDENCIES) 
-	$(LINK) $(am__gpod_la_rpath) $(_gpod_la_LDFLAGS) $(_gpod_la_OBJECTS) $(_gpod_la_LIBADD) $(LIBS)
+	$(_gpod_la_LINK) $(am__gpod_la_rpath) $(_gpod_la_OBJECTS) $(_gpod_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -395,45 +391,41 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/_gpod_la-gpod_wrap.Plo at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 _gpod_la-gpod_wrap.lo: gpod_wrap.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_gpod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _gpod_la-gpod_wrap.lo -MD -MP -MF "$(DEPDIR)/_gpod_la-gpod_wrap.Tpo" -c -o _gpod_la-gpod_wrap.lo `test -f 'gpod_wrap.c' || echo '$(srcdir)/'`gpod_wrap.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/_gpod_la-gpod_wrap.Tpo" "$(DEPDIR)/_gpod_la-gpod_wrap.Plo"; else rm -f "$(DEPDIR)/_gpod_la-gpod_wrap.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_gpod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _gpod_la-gpod_wrap.lo -MD -MP -MF $(DEPDIR)/_gpod_la-gpod_wrap.Tpo -c -o _gpod_la-gpod_wrap.lo `test -f 'gpod_wrap.c' || echo '$(srcdir)/'`gpod_wrap.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/_gpod_la-gpod_wrap.Tpo $(DEPDIR)/_gpod_la-gpod_wrap.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gpod_wrap.c' object='_gpod_la-gpod_wrap.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_gpod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _gpod_la-gpod_wrap.lo `test -f 'gpod_wrap.c' || echo '$(srcdir)/'`gpod_wrap.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_gpod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _gpod_la-gpod_wrap.lo `test -f 'gpod_wrap.c' || echo '$(srcdir)/'`gpod_wrap.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 install-gpodPYTHON: $(gpod_PYTHON)
 	@$(NORMAL_INSTALL)
-	test -z "$(gpoddir)" || $(mkdir_p) "$(DESTDIR)$(gpoddir)"
+	test -z "$(gpoddir)" || $(MKDIR_P) "$(DESTDIR)$(gpoddir)"
 	@list='$(gpod_PYTHON)'; dlist=''; for p in $$list; do\
 	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
 	  if test -f $$b$$p; then \
@@ -461,7 +453,7 @@
 	done
 install-nodist_gpodPYTHON: $(nodist_gpod_PYTHON)
 	@$(NORMAL_INSTALL)
-	test -z "$(gpoddir)" || $(mkdir_p) "$(DESTDIR)$(gpoddir)"
+	test -z "$(gpoddir)" || $(MKDIR_P) "$(DESTDIR)$(gpoddir)"
 	@list='$(nodist_gpod_PYTHON)'; dlist=''; for p in $$list; do\
 	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
 	  if test -f $$b$$p; then \
@@ -519,8 +511,7 @@
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
 	@failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -564,8 +555,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -590,8 +581,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -601,13 +592,12 @@
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -621,22 +611,21 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -650,7 +639,7 @@
 	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    distdir=`$(am__cd) $(distdir) && pwd`; \
 	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -658,6 +647,8 @@
 	      $(MAKE) $(AM_MAKEFLAGS) \
 	        top_distdir="$$top_distdir" \
 	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -669,7 +660,7 @@
 installdirs: installdirs-recursive
 installdirs-am:
 	for dir in "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-recursive
@@ -699,6 +690,7 @@
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
 	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ at HAVE_PYTHON_FALSE@uninstall-hook:
 clean: clean-recursive
 
 clean-am: clean-generic clean-gpodLTLIBRARIES clean-libtool \
@@ -708,7 +700,7 @@
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-recursive
 
@@ -723,12 +715,20 @@
 install-data-am: install-gpodLTLIBRARIES install-gpodPYTHON \
 	install-nodist_gpodPYTHON
 
+install-dvi: install-dvi-recursive
+
 install-exec-am:
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -750,26 +750,30 @@
 ps-am:
 
 uninstall-am: uninstall-gpodLTLIBRARIES uninstall-gpodPYTHON \
-	uninstall-info-am uninstall-nodist_gpodPYTHON
+	uninstall-nodist_gpodPYTHON
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip uninstall-am
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-gpodLTLIBRARIES clean-libtool \
-	clean-recursive ctags ctags-recursive distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic \
+	clean-gpodLTLIBRARIES clean-libtool ctags ctags-recursive \
+	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-exec install-exec-am \
-	install-gpodLTLIBRARIES install-gpodPYTHON install-info \
-	install-info-am install-man install-nodist_gpodPYTHON \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-gpodLTLIBRARIES install-gpodPYTHON \
+	install-html install-html-am install-info install-info-am \
+	install-man install-nodist_gpodPYTHON install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
-	uninstall-gpodLTLIBRARIES uninstall-gpodPYTHON \
-	uninstall-info-am uninstall-nodist_gpodPYTHON
+	uninstall-gpodLTLIBRARIES uninstall-gpodPYTHON uninstall-hook \
+	uninstall-nodist_gpodPYTHON
 
 
 README: README.in gpod.i
@@ -796,6 +800,9 @@
 
 @HAVE_PYTHON_TRUE at test:
 @HAVE_PYTHON_TRUE@	$(MAKE) -C tests test
+
+ at HAVE_PYTHON_TRUE@uninstall-hook:
+ at HAVE_PYTHON_TRUE@	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(gpoddir)
 # 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:

Modified: libgpod/trunk/bindings/python/README
===================================================================
--- libgpod/trunk/bindings/python/README	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/README	2009-01-24 12:10:00 UTC (rev 341)
@@ -38,7 +38,6 @@
 
 The current helper functions are:
 
-sw_get_artwork_thumbnails
 sw_get_list_len
 sw_get_photo
 sw_get_photoalbum

Modified: libgpod/trunk/bindings/python/examples/Makefile.am
===================================================================
--- libgpod/trunk/bindings/python/examples/Makefile.am	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/examples/Makefile.am	2009-01-24 12:10:00 UTC (rev 341)
@@ -2,6 +2,7 @@
         add_song.py                     \
         coverart_fetch.py               \
         create_mp3_tags_from_itdb.py    \
+	fix_empty_artist_field.py	\
         play_with_ipod_api.py           \
         play_with_smart_playlists.py    \
         save_photos.py                  \

Modified: libgpod/trunk/bindings/python/examples/Makefile.in
===================================================================
--- libgpod/trunk/bindings/python/examples/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/examples/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -13,15 +13,11 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -52,8 +48,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -80,35 +74,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -149,15 +132,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -193,13 +178,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -211,6 +196,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -242,12 +228,16 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = \
         add_song.py                     \
         coverart_fetch.py               \
         create_mp3_tags_from_itdb.py    \
+	fix_empty_artist_field.py	\
         play_with_ipod_api.py           \
         play_with_smart_playlists.py    \
         save_photos.py                  \
@@ -292,10 +282,6 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -304,22 +290,21 @@
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -364,7 +349,7 @@
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -378,12 +363,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -402,17 +395,20 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
+.MAKE: install-am install-strip
+
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	distclean distclean-generic distclean-libtool distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
+	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-ps install-ps-am install-strip \
 	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-info-am
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
 
 # 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.

Copied: libgpod/trunk/bindings/python/examples/fix_empty_artist_field.py (from rev 340, libgpod/branches/upstream/current/bindings/python/examples/fix_empty_artist_field.py)
===================================================================
--- libgpod/trunk/bindings/python/examples/fix_empty_artist_field.py	                        (rev 0)
+++ libgpod/trunk/bindings/python/examples/fix_empty_artist_field.py	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+"""
+Fix iTunesDB tracks that have filename-like titles, but no artist
+-----------------------------------------------------------------
+
+Edit tracks that have no artist, but a title that looks like a 
+MP3 filename, by trying to split the title into Artist and Title 
+fields and then updating the fields in the iTunesDB.
+
+Author: Thomas Perl <thpinfo.com>, 2008-03-28
+"""
+
+import gpod
+import os.path
+import sys
+
+if len(sys.argv) == 1:
+    print 'Usage: python %s /path/to/ipod' % os.path.basename(sys.argv[0])
+    print __doc__
+    sys.exit(-1)
+else:
+    mount_point = sys.argv[-1]
+
+try:
+    db = gpod.Database(mount_point)
+except gpod.ipod.DatabaseException, dbe:
+    print 'Error opening your iPod database: %s' % dbe
+    sys.exit(-2)
+
+(updated, count) = (0, len(db))
+
+print 'Database opened: %d tracks to consider' % count
+for track in db:
+    # If the track has a ".mp3" title and no artist, try to fix it
+    if track['title'].lower().endswith('.mp3') and track['artist'] is None:
+        # Assume "Artist - Title.mp3" file names
+        items = os.path.splitext(track['title'])[0].split(' - ')
+        if len(items) == 2:
+            (artist, title) = items
+            print 'Correcting: %s' % track['title']
+            track['artist'] = artist
+            track['title'] = artist
+            updated += 1
+        else:
+            # Doesn't look like "Artist - Title.mp3", leave untouched
+            print 'Leaving untouched: %s' % repr(items)
+
+print 'Saving iPod database...'
+db.close()
+
+print 'Finished. %d tracks updated, %d tracks untouched' % (updated, count-updated)
+

Modified: libgpod/trunk/bindings/python/examples/save_photos.py
===================================================================
--- libgpod/trunk/bindings/python/examples/save_photos.py	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/examples/save_photos.py	2009-01-24 12:10:00 UTC (rev 341)
@@ -24,7 +24,7 @@
 
 import gpod
 
-if not hasattr(gpod.Thumbnail, 'get_pixbuf'):
+if not hasattr(gpod.Photo, 'get_pixbuf'):
     print 'Sorry, gpod was built without pixbuf support.'
     raise SystemExit
 
@@ -35,9 +35,7 @@
     print " ", album
     for photo in album:
         print "  ", photo
-        for thumbnail, n in zip(photo.thumbnails,
-                                range(0,len(photo.thumbnails))):
-            print "   ", thumbnail
-            thumbnail.get_pixbuf().save("/tmp/%d-%d.png" % (photo['id'],n),"png")
+        for w,h,s in ((0,0,'small'), (-1,-1,'large')):
+            photo.get_pixbuf(w,h).save("/tmp/%d-%s.png" % (photo['id'],s),"png")
 
 photodb.close()

Modified: libgpod/trunk/bindings/python/gpod.i.in
===================================================================
--- libgpod/trunk/bindings/python/gpod.i.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/gpod.i.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -21,7 +21,7 @@
  License along with this code; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
- $Id: gpod.i.in 1674 2007-08-08 07:14:36Z nicholas $
+ $Id: gpod.i.in 2108 2008-08-20 17:37:32Z tmzullinger $
 
 Please send any fixes, improvements or suggestions to
 <nick-gtkpod at nickpiper co uk>.
@@ -82,7 +82,6 @@
 PyObject* sw_get_photoalbum(GList *list, gint index);
 PyObject* sw_get_photos(Itdb_PhotoDB *db);
 PyObject* sw_get_photo(GList *list, gint index);
-PyObject* sw_get_artwork_thumbnails(Itdb_Artwork *artwork);
 PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album);
 PyObject* sw_ipod_device_to_dict(Itdb_Device *device);
 void sw__track_extra_destroy (PyObject *data);
@@ -208,18 +207,6 @@
   return list;
  }
 
- PyObject* sw_get_artwork_thumbnails(Itdb_Artwork *artwork) {
-  PyObject    *list;
-  gint        i;
-  GList       *l;
-  list = PyList_New(g_list_length(artwork->thumbnails));
-  for (l = artwork->thumbnails, i = 0; l; l = l->next, ++i) {
-    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Thumb, 0));
-  }
-  return list;
- }
-
-
 PyObject* sw_get_photoalbum(GList *list, gint index) {
   GList *position;
   if ( (index >= g_list_length(list)) || index < 0 ) {
@@ -487,9 +474,11 @@
 
 #ifdef HAVE_GDKPIXBUF
 #ifdef HAVE_PYGOBJECT
-%typemap(out) gpointer itdb_thumb_get_gdk_pixbuf {
+%typemap(out) gpointer itdb_artwork_get_pixbuf {
   $result = pygobject_new((GObject *)$1);
-  g_object_unref($1);
+  if ($1) {
+      g_object_unref($1);
+  }
 }
 
 %typemap(in) gpointer pixbuf {
@@ -515,7 +504,6 @@
 PyObject* sw_get_photos(Itdb_PhotoDB *db);
 PyObject* sw_get_photo(GList *list, gint index);
 PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album);
-PyObject* sw_get_artwork_thumbnails(Itdb_Artwork *artwork);
 PyObject* sw_ipod_device_to_dict(Itdb_Device *device);
 
 %include "@top_srcdir@/src/itdb.h"

Modified: libgpod/trunk/bindings/python/gtkpod.py
===================================================================
--- libgpod/trunk/bindings/python/gtkpod.py	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/gtkpod.py	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,9 +1,17 @@
 """Read and write Gtkpod extended info files."""
 
-import sha
 import os
 import types
 
+# The hashlib module is only available in python >= 2.5,
+# while the sha module is deprecated in 2.6.
+try:
+    import hashlib
+    sha1 = hashlib.sha1
+except ImportError:
+    import sha
+    sha1 = sha.sha
+
 # This file is originally stolen from pypod-0.5.0
 # http://superduper.net/index.py?page=pypod
 # and reworked significantly since then.
@@ -21,7 +29,7 @@
     import struct
     # only hash the first 16k
     hash_len = 4*4096
-    hash = sha.sha()
+    hash = sha1()
     size = os.path.getsize(filename)
     hash.update(struct.pack("<L", size))
     hash.update(open(filename).read(hash_len))

Modified: libgpod/trunk/bindings/python/ipod.py
===================================================================
--- libgpod/trunk/bindings/python/ipod.py	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/ipod.py	2009-01-24 12:10:00 UTC (rev 341)
@@ -111,6 +111,9 @@
 
         if not gpod.itdb_write_file(self._itdb, self._itdb_file, None):
             raise DatabaseException("Unable to save iTunes database %s" % self)
+        if gpod.itdb_get_mountpoint(self._itdb):
+            if not gpod.itdb_shuffle_write(self._itdb, None):
+                raise DatabaseException("Unable to save shuffle database on %s" % self._itdb.mountpoint)
         itdbext_file = "%s.ext" % (self._itdb_file)
         gtkpod.write(itdbext_file, self, self._itdb_file)
 
@@ -152,7 +155,7 @@
         gpod.itdb_track_add(self._itdb, track._track, pos)
         track.__database = self # so the db doesn't get gc'd
 
-    def remove(self, item, harddisk=False, ipod=True):
+    def remove(self, item, harddisk=False, ipod=True, quiet=False):
         """Remove a playlist or track from a database.
 
         item is either a playlist or track object.
@@ -161,6 +164,8 @@
 
         If ipod is True the item will be removed from the iPod.
 
+        If quiet is True no message will be printed for removed tracks
+
         """
 
         if isinstance(item, Playlist):
@@ -186,7 +191,8 @@
                 filename = item.ipod_filename()
                 if filename and os.path.exists(filename):
                     os.unlink(filename)
-                    print "unlinked %s" % filename
+                    if not quiet:
+                        print "unlinked %s" % filename
             gpod.itdb_track_unlink(item._track)
         else:
             raise DatabaseException("Unable to remove a %s from database" % type(item))
@@ -291,13 +297,18 @@
                                     k.startswith("reserved") or
                                     k == "chapterdata")]
 
-    def __init__(self, filename=None,
+    def __init__(self, filename=None, mediatype=gpod.ITDB_MEDIATYPE_AUDIO,
                  proxied_track=None, podcast=False, ownerdb=None):
         """Create a Track object.
 
         If from_file or filename is set, the file specified will be
         used to create the track.
 
+        The mediatype parameter sets the mediatype for the track.  It
+        defaults to audio, unless 'podcast' is True, in which case it
+        is set to podcast.  See gpod.ITDB_MEDIATYPE_* for other valid
+        mediatypes.
+
         If proxied_track is set, it is expected to be an Itdb_Track
         object.
 
@@ -315,7 +326,7 @@
             self._set_userdata_utf8('filename',filename)
             possible_image = os.path.join(os.path.split(filename)[0],'folder.jpg')
             if os.path.exists(possible_image):
-                self.set_thumbnail(possible_image)
+                self.set_coverart_from_file(possible_image)
             try:
                 audiofile = MP3(self._userdata_into_default_locale('filename'))
             except Exception, e:
@@ -351,6 +362,8 @@
         else:
             self._track = gpod.itdb_track_new()
             self.set_podcast(podcast)
+        if not 'mediatype' in self:
+            self['mediatype'] = mediatype
 
     def _set_userdata_utf8(self, key, value):
         self['userdata']['%s_locale' % key] = value
@@ -390,8 +403,10 @@
                                                        pixbuf)
 
     def get_coverart(self):
-        return Photo(proxied_photo=self._track.artwork,
-                     ownerdb=self._track.itdb)
+        if gpod.itdb_track_has_thumbnails(self._track):
+            return Photo(proxied_photo=self._track.artwork,
+                         ownerdb=self._track.itdb)
+        return None
 
     def copy_to_ipod(self):
         """Copy the track to the iPod."""
@@ -434,6 +449,7 @@
             self['skip_when_shuffling'] = 0x01
             self['remember_playback_position'] = 0x01
             self['flag4'] = 0x01 # Show Title/Album on the 'Now Playing' page
+            self['mediatype'] = gpod.ITDB_MEDIATYPE_PODCAST
         else:
             self['skip_when_shuffling'] = 0x00
             self['remember_playback_position'] = 0x00
@@ -448,13 +464,38 @@
             repr(self['title']),
             repr(self['album']))
 
+    def __iter__(self):
+        for k in self.keys():
+            yield k
+
+    def has_key(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
+    def __contains__(self, key):
+        return self.has_key(key)
+
+    def iteritems(self):
+        for k in self:
+            yield (k, self[k])
+
+    def iterkeys(self):
+        return self.__iter__()
+
+    def itervalues(self):
+        for _, v in self.iteritems():
+            yield v
+
     def keys(self):
         return list(self._proxied_attributes)
 
-    def items(self):
+    def values(self):
         return [self[k] for k in self._proxied_attributes]
 
-    def pairs(self):
+    def items(self):
         return [(k, self[k]) for k in self._proxied_attributes]
 
     def __getitem__(self, item):
@@ -931,13 +972,38 @@
             self['digitized_date'].strftime("%c"),
             repr(self['artwork_size']))
 
+    def __iter__(self):
+        for k in self.keys():
+            yield k
+
+    def has_key(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
+    def __contains__(self, key):
+        return self.has_key(key)
+
+    def iteritems(self):
+        for k in self:
+            yield (k, self[k])
+
+    def iterkeys(self):
+        return self.__iter__()
+
+    def itervalues(self):
+        for _, v in self.iteritems():
+            yield v
+
     def keys(self):
         return list(self._proxied_attributes)
 
-    def items(self):
+    def values(self):
         return [self[k] for k in self._proxied_attributes]
 
-    def pairs(self):
+    def items(self):
         return [(k, self[k]) for k in self._proxied_attributes]
 
     def __getitem__(self, item):
@@ -961,69 +1027,18 @@
         else:
             raise KeyError('No such key: %s' % item)
 
-    def get_thumbnails(self):
-        return [Thumbnail(proxied_thumbnail=t,
-                          ownerobject=self) for t in gpod.sw_get_artwork_thumbnails(
-            self._photo)]
+    if pixbuf_support:
+        def get_pixbuf(self, width=-1, height=-1):
+            """Get a pixbuf from a Photo.
 
-    thumbnails = property(get_thumbnails)
+            width: the width of the pixbuf to retrieve, -1 for the biggest
+            possible size and 0 for the smallest possible size (with no scaling)
 
-class Thumbnail:
-    """A thumbnail in an Photo."""
-
-    _proxied_attributes = [k for k in gpod._Itdb_Thumb.__dict__.keys()
-                            if not (k.startswith("_") or k.startswith("reserved"))]
-
-    def __init__(self, proxied_thumbnail=None, ownerobject=None):
-        """Create a thumbnail object."""
-
-        if not proxied_thumbnail:
-            raise NotImplemented("Can't create new Thumbnails from scratch, create Photos instead")
-
-        self._thumbnail = proxied_thumbnail
-        self.__ownerobject = ownerobject
-
-    def __str__(self):
-        return self.__repr__()
-
-    def __repr__(self):
-        return "<Thumbnail Filename:%s Size:%d Width:%d Height:%d>" % (
-            repr(self['filename']),
-            self['size'],
-            self['width'],
-            self['height'])
-
-    def keys(self):
-        return list(self._proxied_attributes)
-
-    def items(self):
-        return [self[k] for k in self._proxied_attributes]
-
-    def pairs(self):
-        return [(k, self[k]) for k in self._proxied_attributes]
-
-    def __getitem__(self, item):
-        if item in self._proxied_attributes:
-            return getattr(self._thumbnail, item)
-        else:
-            raise KeyError('No such key: %s' % item)
-
-    def __setitem__(self, item, value):
-        if type(value) == types.UnicodeType:
-            value = value.encode('UTF-8','replace')
-        if item in self._proxied_attributes:
-            return setattr(self._thumbnail, item, value)
-        else:
-            raise KeyError('No such key: %s' % item)
-
-    if pixbuf_support:
-        def get_pixbuf(self):
-            # this deals with coverart and photo albums
-            if hasattr(self.__ownerobject._database,"_itdb"):
-                return gpod.itdb_thumb_get_gdk_pixbuf(
-                    self.__ownerobject._database._itdb.device,
-                    self._thumbnail)
-            else:
-                return gpod.itdb_thumb_get_gdk_pixbuf(
-                    self.__ownerobject._database.device,
-                    self._thumbnail)
+            height: the height of the pixbuf to retrieve, -1 for the biggest
+            possible size and 0 for the smallest possible size (with no scaling)
+            """
+            device = self._database.device
+            if hasattr(self._database,"_itdb"):
+                device = self._database._itdb.device
+            return gpod.itdb_artwork_get_pixbuf(device, self._photo,
+                                                width, height)

Modified: libgpod/trunk/bindings/python/tests/Makefile.in
===================================================================
--- libgpod/trunk/bindings/python/tests/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/tests/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -13,15 +13,11 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -52,8 +48,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -80,35 +74,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -149,15 +132,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -193,13 +178,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -211,6 +196,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -242,8 +228,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = \
         resources       \
         tests.py
@@ -286,10 +275,6 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -298,22 +283,21 @@
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -361,7 +345,7 @@
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -375,12 +359,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -399,17 +391,21 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
+.MAKE: install-am install-strip
+
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	dist-hook distclean distclean-generic distclean-libtool \
 	distdir dvi dvi-am html html-am info info-am install \
-	install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	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-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-info-am
+	uninstall uninstall-am
 
 
 dist-hook:

Modified: libgpod/trunk/bindings/python/tests/tests.py
===================================================================
--- libgpod/trunk/bindings/python/tests/tests.py	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/bindings/python/tests/tests.py	2009-01-24 12:10:00 UTC (rev 341)
@@ -18,7 +18,7 @@
         os.mkdir(music_dir)
         for i in range(0,20):
             os.mkdir(os.path.join(music_dir,"f%02d" % i))
-        self.db = gpod.Database(self.mp)        
+        self.db = gpod.Database(self.mp)
 
     def tearDown(self):
         shutil.rmtree(self.mp)
@@ -38,13 +38,13 @@
         trackname = os.path.join(self.mp,
                                  'iPod_Control',
                                  'tiny.mp3')
-                                 
+
         pl = self.db.new_Playlist('my title')
         self.assertEqual(len(pl),0)
         t = self.db.new_Track(filename=trackname)
         pl.add(t)
         self.assertEqual(len(pl),1)
-                                 
+
     def testAddTrack(self):
         trackname = os.path.join(self.mp,
                                  'iPod_Control',
@@ -62,7 +62,7 @@
             track = self.db[0]
             track_file = track.ipod_filename()
             self.assertEqual(len(self.db),n)
-            self.db.remove(track, ipod=True)
+            self.db.remove(track, ipod=True, quiet=True)
             self.failIf(os.path.exists(track_file))
 
     def testDatestampSetting(self):
@@ -79,9 +79,14 @@
         t['time_added'] = time.mktime(date.timetuple())
         self.assertEqual(date.year, t['time_added'].year)
         self.assertEqual(date.second, t['time_added'].second)
-            
+
+    def testTrackContainerMethods(self):
+        self.testAddTrack()
+        track = self.db[0]
+        self.failUnless('title' in track)
+
     def testVersion(self):
-        self.assertEqual(type(gpod.version_info), 
+        self.assertEqual(type(gpod.version_info),
                          types.TupleType)
 
 class TestPhotoDatabase(unittest.TestCase):
@@ -134,7 +139,7 @@
 
     def testEnumeratePhotoAlbums(self):
         [photo for photo in self.db.PhotoAlbums]
-        
+
     def testAddPhoto(self):
         photoname = os.path.join(self.mp,
                                  'iPod_Control',
@@ -182,10 +187,10 @@
         for album in self.db.PhotoAlbums:
             [photo for photo in album]
 
-    def testEnumeratePhotosThumbs(self):
-        for album in self.db.PhotoAlbums:
-            for photo in album:
-                [thumb for thumb in photo.thumbnails]            
-                
+    def testPhotoContainerMethods(self):
+        self.testAddPhoto()
+        photo = self.db[0]
+        self.failUnless('id' in photo)
+
 if __name__ == '__main__':
     unittest.main()

Modified: libgpod/trunk/config.guess
===================================================================
--- libgpod/trunk/config.guess	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/config.guess	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2007-03-06'
+timestamp='2008-01-08'
 
 # 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
@@ -56,8 +56,8 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 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."
@@ -330,7 +330,7 @@
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
-    i86pc:SunOS:5.*:*)
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     sun4*:SunOS:6*:*)
@@ -532,7 +532,7 @@
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[456])
 	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
 		IBM_ARCH=rs6000
@@ -793,12 +793,15 @@
 	exit ;;
     *:Interix*:[3456]*)
     	case ${UNAME_MACHINE} in
-	    x86) 
+	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
 	    EM64T | authenticamd)
 		echo x86_64-unknown-interix${UNAME_RELEASE}
 		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
 	esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
@@ -833,7 +836,14 @@
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
     arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	eval $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-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
 	exit ;;
     avr32*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -954,8 +964,8 @@
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
 	exit ;;
-    xtensa:Linux:*:*)
-    	echo xtensa-unknown-linux-gnu
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
 	# The BFD linker knows what the default object file format is, so

Modified: libgpod/trunk/config.h.in
===================================================================
--- libgpod/trunk/config.h.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/config.h.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -31,6 +31,9 @@
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 #undef HAVE_LC_MESSAGES
 
+/* Whether libxml is installed, it's used to parse SysInfoExtended */
+#undef HAVE_LIBXML
+
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
@@ -65,6 +68,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
 /* Name of package */
 #undef PACKAGE
 

Modified: libgpod/trunk/config.sub
===================================================================
--- libgpod/trunk/config.sub	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/config.sub	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2007-01-18'
+timestamp='2008-01-16'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +72,8 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 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."
@@ -369,10 +369,14 @@
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
+	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-*)
 		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
@@ -443,6 +447,14 @@
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
@@ -475,8 +487,8 @@
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16c)
-		basic_machine=cr16c-unknown
+	cr16)
+		basic_machine=cr16-unknown
 		os=-elf
 		;;
 	crds | unos)
@@ -668,6 +680,14 @@
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -683,6 +703,10 @@
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -809,6 +833,14 @@
 		basic_machine=i860-intel
 		os=-osf
 		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
@@ -1017,6 +1049,10 @@
 		basic_machine=tic6x-unknown
 		os=-coff
 		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;

Modified: libgpod/trunk/configure
===================================================================
--- libgpod/trunk/configure	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/configure	2009-01-24 12:10:00 UTC (rev 341)
@@ -813,6 +813,7 @@
 INSTALL_PROGRAM
 INSTALL_SCRIPT
 INSTALL_DATA
+am__isrc
 CYGPATH_W
 PACKAGE
 VERSION
@@ -897,6 +898,9 @@
 INTLTOOL_THEME_RULE
 INTLTOOL_SERVICE_RULE
 INTLTOOL_POLICY_RULE
+XGETTEXT
+MSGMERGE
+MSGFMT
 INTLTOOL_EXTRACT
 INTLTOOL_MERGE
 INTLTOOL_UPDATE
@@ -906,6 +910,10 @@
 PKG_CONFIG
 LIBGPOD_CFLAGS
 LIBGPOD_LIBS
+GLIB_CFLAGS
+GLIB_LIBS
+WITH_INTERNAL_GCHECKSUM_TRUE
+WITH_INTERNAL_GCHECKSUM_FALSE
 SGUTILS_LIBS
 HAVE_SGUTILS_TRUE
 HAVE_SGUTILS_FALSE
@@ -918,20 +926,21 @@
 TAGLIB_LIBS
 HAVE_TAGLIB_TRUE
 HAVE_TAGLIB_FALSE
+LIBXML_CFLAGS
+LIBXML_LIBS
 GDKPIXBUF_CFLAGS
 GDKPIXBUF_LIBS
 HAVE_GDKPIXBUF_TRUE
 HAVE_GDKPIXBUF_FALSE
+GDKPIXBUF_REQ
 PYGOBJECT_CFLAGS
 PYGOBJECT_LIBS
 HAVE_PYGOBJECT_TRUE
 HAVE_PYGOBJECT_FALSE
 GETTEXT_PACKAGE
 USE_NLS
-MSGFMT
 MSGFMT_OPTS
 GMSGFMT
-XGETTEXT
 CATALOGS
 CATOBJEXT
 GMOFILES
@@ -943,6 +952,7 @@
 POSUB
 MKINSTALLDIRS
 HTML_DIR
+GTKDOC_CHECK
 ENABLE_GTK_DOC_TRUE
 ENABLE_GTK_DOC_FALSE
 GTK_DOC_USE_LIBTOOL_TRUE
@@ -983,10 +993,14 @@
 PKG_CONFIG
 LIBGPOD_CFLAGS
 LIBGPOD_LIBS
+GLIB_CFLAGS
+GLIB_LIBS
 HAL_CFLAGS
 HAL_LIBS
 TAGLIB_CFLAGS
 TAGLIB_LIBS
+LIBXML_CFLAGS
+LIBXML_LIBS
 GDKPIXBUF_CFLAGS
 GDKPIXBUF_LIBS
 PYGOBJECT_CFLAGS
@@ -1577,6 +1591,7 @@
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-libxml        SysInfoExtended won't be parsed
   --disable-gdk-pixbuf    ArtworkDB will be disabled without gdk-pixbuf
   --disable-pygobject     Python API will lack GdkPixbuf support without
                           PyGOBJECT
@@ -1590,6 +1605,8 @@
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-tags[=TAGS]      include additional configurations [automatic]
+  --with-internal-gchecksum
+                          Build using internal copy of gchecksum
   --without-hal           Disable HAL support
   --with-hal-callouts-dir=DIR
                           Directory where HAL expects its callout scripts to
@@ -1616,11 +1633,16 @@
               C compiler flags for LIBGPOD, overriding pkg-config
   LIBGPOD_LIBS
               linker flags for LIBGPOD, overriding pkg-config
+  GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
+  GLIB_LIBS   linker flags for GLIB, overriding pkg-config
   HAL_CFLAGS  C compiler flags for HAL, overriding pkg-config
   HAL_LIBS    linker flags for HAL, overriding pkg-config
   TAGLIB_CFLAGS
               C compiler flags for TAGLIB, overriding pkg-config
   TAGLIB_LIBS linker flags for TAGLIB, overriding pkg-config
+  LIBXML_CFLAGS
+              C compiler flags for LIBXML, overriding pkg-config
+  LIBXML_LIBS linker flags for LIBXML, overriding pkg-config
   GDKPIXBUF_CFLAGS
               C compiler flags for GDKPIXBUF, overriding pkg-config
   GDKPIXBUF_LIBS
@@ -2063,7 +2085,7 @@
 #   LIBGPOD_SO_VERSION - see comments
 #
 LIBGPOD_MAJOR_VERSION=0
-LIBGPOD_MINOR_VERSION=6
+LIBGPOD_MINOR_VERSION=7
 LIBGPOD_MICRO_VERSION=0
 # If you need a modifier for the version number.
 # Normally empty, but can be used to make "fixup" releases.
@@ -2076,7 +2098,7 @@
 #                 changes to the signature and the semantic)
 #  ? :+1 : ?   == just internal changes
 # CURRENT : REVISION : AGE
-LIBGPOD_SO_VERSION=3:0:0
+LIBGPOD_SO_VERSION=4:0:0
 
 
 
@@ -2084,7 +2106,8 @@
 
 
 
-am__api_version="1.9"
+am__api_version='1.10'
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -2267,39 +2290,54 @@
 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
+  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=.
+  for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
   else
-    mkdir_p='$(install_sh) -d'
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
   fi
 fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
 
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
 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.
@@ -2381,12 +2419,16 @@
 fi
 rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
    { (exit 1); exit 1; }; }
+  fi
 fi
 
 # test whether we have cygpath
@@ -2429,7 +2471,7 @@
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
 # Installed binaries are usually stripped using `strip' when the user
 # run `make install-strip'.  However `strip' might not be the right
@@ -2533,7 +2575,7 @@
 fi
 
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -2562,9 +2604,7 @@
 
   { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
+   if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
   MAINTAINER_MODE_FALSE='#'
 else
@@ -3553,9 +3593,7 @@
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
 fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
+ if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
   AMDEP_FALSE='#'
 else
@@ -3565,7 +3603,6 @@
 
 
 
-
 depcc="$CC"   am_compiler_list=
 
 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
@@ -3633,6 +3670,7 @@
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -3662,9 +3700,7 @@
 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
   am__fastdepCC_TRUE=
@@ -3675,7 +3711,133 @@
 fi
 
 
+if test "x$CC" != xcc; then
+  { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
+fi
+set dummy $CC; ac_cc=`echo $2 |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+	# cc works too.
+	:
+      else
+	# cc exists but doesn't like -o.
+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_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_PROG_CXX is only needed for the test program tests/test-rebuild-db.cc.
 # You can safely remove AC_PROG_CXX and the test program (edit tests/Makefile.am)
 # if you should run into problems.
@@ -4110,6 +4272,7 @@
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -4139,9 +4302,7 @@
 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
   am__fastdepCXX_TRUE=
@@ -5326,7 +5487,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu)
+netbsd*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   else
@@ -5446,7 +5607,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5449 "configure"' > conftest.$ac_ext
+  echo '#line 5610 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5511,6 +5672,7 @@
       esac
       ;;
     *64-bit*)
+      libsuff=64
       case $host in
         x86_64-*kfreebsd*-gnu)
           LD="${LD-ld} -m elf_x86_64_fbsd"
@@ -7306,11 +7468,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7309: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7471: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7313: \$? = $ac_status" >&5
+   echo "$as_me:7475: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7596,11 +7758,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7599: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7761: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7603: \$? = $ac_status" >&5
+   echo "$as_me:7765: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7700,11 +7862,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7703: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7865: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7707: \$? = $ac_status" >&5
+   echo "$as_me:7869: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -7964,13 +8126,12 @@
   $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
-	link_all_deplibs=no
       else
 	ld_shlibs=no
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -8514,7 +8675,7 @@
       link_all_deplibs=yes
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -9209,11 +9370,13 @@
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -9225,18 +9388,6 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -10062,7 +10213,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10065 "configure"
+#line 10216 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10162,7 +10313,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10165 "configure"
+#line 10316 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11772,7 +11923,7 @@
 	;;
     esac
     ;;
-  netbsd* | netbsdelf*-gnu)
+  netbsd*)
     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
       archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
       wlarc=
@@ -12473,7 +12624,7 @@
 	    ;;
 	esac
 	;;
-      netbsd* | netbsdelf*-gnu)
+      netbsd*)
 	;;
       osf3* | osf4* | osf5*)
 	case $cc_basename in
@@ -12582,11 +12733,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12585: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12736: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12589: \$? = $ac_status" >&5
+   echo "$as_me:12740: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12686,11 +12837,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12689: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12840: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12693: \$? = $ac_status" >&5
+   echo "$as_me:12844: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12758,9 +12909,6 @@
   cygwin* | mingw*)
     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
   ;;
-  linux* | k*bsd*-gnu)
-    link_all_deplibs_CXX=no
-  ;;
   *)
     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
@@ -13190,11 +13338,13 @@
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -13206,18 +13356,6 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -14263,11 +14401,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14266: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14404: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14270: \$? = $ac_status" >&5
+   echo "$as_me:14408: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14367,11 +14505,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14370: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14508: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14374: \$? = $ac_status" >&5
+   echo "$as_me:14512: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14631,13 +14769,12 @@
   $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
-	link_all_deplibs_F77=no
       else
 	ld_shlibs_F77=no
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -15161,7 +15298,7 @@
       link_all_deplibs_F77=yes
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -15804,11 +15941,13 @@
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -15820,18 +15959,6 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -16567,11 +16694,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16570: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16697: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16574: \$? = $ac_status" >&5
+   echo "$as_me:16701: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16857,11 +16984,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16860: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16987: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16864: \$? = $ac_status" >&5
+   echo "$as_me:16991: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16961,11 +17088,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16964: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17091: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16968: \$? = $ac_status" >&5
+   echo "$as_me:17095: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17225,13 +17352,12 @@
   $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
-	link_all_deplibs_GCJ=no
       else
 	ld_shlibs_GCJ=no
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -17775,7 +17901,7 @@
       link_all_deplibs_GCJ=yes
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -18418,11 +18544,13 @@
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -18434,18 +18562,6 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -19734,6 +19850,141 @@
 
 
 
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $XGETTEXT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+  { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MSGMERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+  { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+  { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 # Use the tools built into the package, not the ones that are installed.
 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
 
@@ -20084,11 +20335,10 @@
 { echo "$as_me:$LINENO: checking for LIBGPOD" >&5
 echo $ECHO_N "checking for LIBGPOD... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LIBGPOD_CFLAGS"; then
-        pkg_cv_LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LIBGPOD_CFLAGS"; then
+    pkg_cv_LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.8.0 gobject-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.8.0 gobject-2.0") 2>&5
   ac_status=$?
@@ -20098,15 +20348,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LIBGPOD_LIBS"; then
-        pkg_cv_LIBGPOD_LIBS="$LIBGPOD_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LIBGPOD_LIBS"; then
+    pkg_cv_LIBGPOD_LIBS="$LIBGPOD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.8.0 gobject-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.8.0 gobject-2.0") 2>&5
   ac_status=$?
@@ -20116,9 +20364,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -20131,9 +20378,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LIBGPOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.8.0 gobject-2.0"`
+	        LIBGPOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.8.0 gobject-2.0" 2>&1`
         else
-	        LIBGPOD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.8.0 gobject-2.0"`
+	        LIBGPOD_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.8.0 gobject-2.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBGPOD_PKG_ERRORS" >&5
@@ -20190,7 +20437,6 @@
 echo "${ECHO_T}yes" >&6; }
 	:
 fi
-LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS -Wall"
 
 expanded_libdir=`(
     case $prefix in
@@ -20204,7 +20450,165 @@
     eval echo $libdir
 )`
 
-{ echo "$as_me:$LINENO: checking for sg_ll_inquiry in -lsgutils" >&5
+
+
+
+# Check whether --with-internal-gchecksum was given.
+if test "${with_internal_gchecksum+set}" = set; then
+  withval=$with_internal_gchecksum;
+else
+  with_internal_gchecksum=no
+fi
+
+
+if test "x$with_internal_gchecksum" = "xno"; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GLIB" >&5
+echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; }
+
+if test -n "$GLIB_CFLAGS"; then
+    pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GLIB_LIBS"; then
+    pkg_cv_GLIB_LIBS="$GLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16.0" 2>&1`
+        else
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GLIB_PKG_ERRORS" >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                with_internal_gchecksum=yes
+elif test $pkg_failed = untried; then
+	with_internal_gchecksum=yes
+else
+	GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
+	GLIB_LIBS=$pkg_cv_GLIB_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	with_internal_gchecksum=no
+fi
+fi
+
+ if test "x$with_internal_gchecksum" = "xyes"; then
+  WITH_INTERNAL_GCHECKSUM_TRUE=
+  WITH_INTERNAL_GCHECKSUM_FALSE='#'
+else
+  WITH_INTERNAL_GCHECKSUM_TRUE='#'
+  WITH_INTERNAL_GCHECKSUM_FALSE=
+fi
+
+
+{ echo "$as_me:$LINENO: checking for sg_ll_inquiry in -lsgutils2" >&5
+echo $ECHO_N "checking for sg_ll_inquiry in -lsgutils2... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sgutils2_sg_ll_inquiry+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsgutils2  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sg_ll_inquiry ();
+int
+main ()
+{
+return sg_ll_inquiry ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_sgutils2_sg_ll_inquiry=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_sgutils2_sg_ll_inquiry=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_sgutils2_sg_ll_inquiry" >&5
+echo "${ECHO_T}$ac_cv_lib_sgutils2_sg_ll_inquiry" >&6; }
+if test $ac_cv_lib_sgutils2_sg_ll_inquiry = yes; then
+  SGUTILS_LIBS="-lsgutils2"; have_sgutils=yes
+else
+  have_sgutils=no
+fi
+
+if test "x$have_sgutils" != xyes; then
+    { echo "$as_me:$LINENO: checking for sg_ll_inquiry in -lsgutils" >&5
 echo $ECHO_N "checking for sg_ll_inquiry in -lsgutils... $ECHO_C" >&6; }
 if test "${ac_cv_lib_sgutils_sg_ll_inquiry+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -20271,10 +20675,9 @@
   have_sgutils=no
 fi
 
+fi
 
-
-
-if test x"$have_sgutils" = xyes; then
+ if test x"$have_sgutils" = xyes; then
   HAVE_SGUTILS_TRUE=
   HAVE_SGUTILS_FALSE='#'
 else
@@ -20307,11 +20710,10 @@
 { echo "$as_me:$LINENO: checking for HAL" >&5
 echo $ECHO_N "checking for HAL... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$HAL_CFLAGS"; then
-        pkg_cv_HAL_CFLAGS="$HAL_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$HAL_CFLAGS"; then
+    pkg_cv_HAL_CFLAGS="$HAL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal >= 0.5 hal < 0.6\"") >&5
   ($PKG_CONFIG --exists --print-errors "hal >= 0.5 hal < 0.6") 2>&5
   ac_status=$?
@@ -20321,15 +20723,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$HAL_LIBS"; then
-        pkg_cv_HAL_LIBS="$HAL_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$HAL_LIBS"; then
+    pkg_cv_HAL_LIBS="$HAL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal >= 0.5 hal < 0.6\"") >&5
   ($PKG_CONFIG --exists --print-errors "hal >= 0.5 hal < 0.6") 2>&5
   ac_status=$?
@@ -20339,9 +20739,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -20354,9 +20753,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hal >= 0.5 hal < 0.6"`
+	        HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "hal >= 0.5 hal < 0.6" 2>&1`
         else
-	        HAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hal >= 0.5 hal < 0.6"`
+	        HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors "hal >= 0.5 hal < 0.6" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$HAL_PKG_ERRORS" >&5
@@ -20379,7 +20778,7 @@
    { (exit 1); exit 1; }; }
   fi
 
-  if test "x$enable_hal" == "xyes"; then
+  if test "x$enable_hal" = "xyes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_HAL 1
@@ -20389,9 +20788,7 @@
 
   fi
 fi
-
-
-if test x"$enable_hal" = xyes; then
+ if test x"$enable_hal" = xyes; then
   HAVE_HAL_TRUE=
   HAVE_HAL_FALSE='#'
 else
@@ -20407,11 +20804,10 @@
 { echo "$as_me:$LINENO: checking for TAGLIB" >&5
 echo $ECHO_N "checking for TAGLIB... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TAGLIB_CFLAGS"; then
-        pkg_cv_TAGLIB_CFLAGS="$TAGLIB_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$TAGLIB_CFLAGS"; then
+    pkg_cv_TAGLIB_CFLAGS="$TAGLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"taglib\"") >&5
   ($PKG_CONFIG --exists --print-errors "taglib") 2>&5
   ac_status=$?
@@ -20421,15 +20817,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TAGLIB_LIBS"; then
-        pkg_cv_TAGLIB_LIBS="$TAGLIB_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$TAGLIB_LIBS"; then
+    pkg_cv_TAGLIB_LIBS="$TAGLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"taglib\"") >&5
   ($PKG_CONFIG --exists --print-errors "taglib") 2>&5
   ac_status=$?
@@ -20439,9 +20833,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -20454,9 +20847,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        TAGLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "taglib"`
+	        TAGLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "taglib" 2>&1`
         else
-	        TAGLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "taglib"`
+	        TAGLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "taglib" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$TAGLIB_PKG_ERRORS" >&5
@@ -20483,9 +20876,7 @@
 fi
 
 
-
-
-if test x"$have_taglib" = xyes; then
+ if test x"$have_taglib" = xyes; then
   HAVE_TAGLIB_TRUE=
   HAVE_TAGLIB_FALSE='#'
 else
@@ -20494,61 +20885,180 @@
 fi
 
 
+# Check whether --enable-libxml was given.
+if test "${enable_libxml+set}" = set; then
+  enableval=$enable_libxml; case "${enableval}" in
+  no) enable_libxml=no ;;
+  *) enable_libxml=yes;;
+esac
+fi
 
 
+
+if test x$enable_libxml != xno; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for LIBXML" >&5
+echo $ECHO_N "checking for LIBXML... $ECHO_C" >&6; }
+
+if test -n "$LIBXML_CFLAGS"; then
+    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBXML_LIBS"; then
+    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0" 2>&1`
+        else
+	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBXML_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (libxml-2.0) were not met:
+
+$LIBXML_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (libxml-2.0) were not met:
+
+$LIBXML_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
+	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+   cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXML 1
+_ACEOF
+
+   LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $LIBXML_CFLAGS"
+   LIBGPOD_LIBS="$LIBGPOD_LIBS $LIBXML_LIBS"
+fi
+
 # Check whether --enable-gdk-pixbuf was given.
 if test "${enable_gdk_pixbuf+set}" = set; then
   enableval=$enable_gdk_pixbuf; case "${enableval}" in
-  no) have_gdkpixbuf=no ;;
-  *) have_gdkpixbuf=yes;;
+  no) enable_gdkpixbuf=no ;;
+  *) enable_gdkpixbuf=yes;;
 esac
-else
-  have_gdkpixbuf=yes
 fi
 
 
 
-if test x$have_gdkpixbuf = xyes; then
+if test x$enable_gdkpixbuf != xno; then
+   GDKPIXBUF_REQ="gdk-pixbuf-2.0"
 
 pkg_failed=no
 { echo "$as_me:$LINENO: checking for GDKPIXBUF" >&5
 echo $ECHO_N "checking for GDKPIXBUF... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GDKPIXBUF_CFLAGS"; then
-        pkg_cv_GDKPIXBUF_CFLAGS="$GDKPIXBUF_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0 >= 2.6.0\"") >&5
-  ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0 >= 2.6.0") 2>&5
+if test -n "$GDKPIXBUF_CFLAGS"; then
+    pkg_cv_GDKPIXBUF_CFLAGS="$GDKPIXBUF_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GDKPIXBUF_REQ >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "$GDKPIXBUF_REQ >= 2.6.0") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0 >= 2.6.0" 2>/dev/null`
+  pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "$GDKPIXBUF_REQ >= 2.6.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GDKPIXBUF_LIBS"; then
-        pkg_cv_GDKPIXBUF_LIBS="$GDKPIXBUF_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0 >= 2.6.0\"") >&5
-  ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0 >= 2.6.0") 2>&5
+if test -n "$GDKPIXBUF_LIBS"; then
+    pkg_cv_GDKPIXBUF_LIBS="$GDKPIXBUF_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GDKPIXBUF_REQ >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "$GDKPIXBUF_REQ >= 2.6.0") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0 >= 2.6.0" 2>/dev/null`
+  pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "$GDKPIXBUF_REQ >= 2.6.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -20561,9 +21071,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-pixbuf-2.0 >= 2.6.0"`
+	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GDKPIXBUF_REQ >= 2.6.0" 2>&1`
         else
-	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-pixbuf-2.0 >= 2.6.0"`
+	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GDKPIXBUF_REQ >= 2.6.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GDKPIXBUF_PKG_ERRORS" >&5
@@ -20580,18 +21090,24 @@
 echo "${ECHO_T}yes" >&6; }
 	have_gdkpixbuf=yes
 fi
-   if test x"$have_gdkpixbuf" = xyes; then
-      cat >>confdefs.h <<_ACEOF
+   if test x"$enable_gdkpixbuf" = xyes -a x"$have_gdkpixbuf" = xno; then
+      { { echo "$as_me:$LINENO: error: gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found" >&5
+echo "$as_me: error: gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+if test x"$have_gdkpixbuf" = xyes; then
+   cat >>confdefs.h <<_ACEOF
 #define HAVE_GDKPIXBUF 1
 _ACEOF
 
-   fi
    LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $GDKPIXBUF_CFLAGS"
    LIBGPOD_LIBS="$LIBGPOD_LIBS $GDKPIXBUF_LIBS"
+else
+   have_gdkpixbuf=no
+   GDKPIXBUF_REQ=""
 fi
-
-
-if test x"$have_gdkpixbuf" = xyes; then
+ if test x"$have_gdkpixbuf" = xyes; then
   HAVE_GDKPIXBUF_TRUE=
   HAVE_GDKPIXBUF_FALSE='#'
 else
@@ -20601,29 +21117,27 @@
 
 
 
+
 # Check whether --enable-pygobject was given.
 if test "${enable_pygobject+set}" = set; then
   enableval=$enable_pygobject; case "${enableval}" in
-  no) have_pygobject=no ;;
-  *) have_pygobject=yes;;
+  no) enable_pygobject=no ;;
+  *) enable_pygobject=yes;;
 esac
-else
-  have_pygobject=yes
 fi
 
 
 
-if test x$have_pygobject = xyes; then
+if test x$enable_pygobject != xno; then
 
 pkg_failed=no
 { echo "$as_me:$LINENO: checking for PYGOBJECT" >&5
 echo $ECHO_N "checking for PYGOBJECT... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PYGOBJECT_CFLAGS"; then
-        pkg_cv_PYGOBJECT_CFLAGS="$PYGOBJECT_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$PYGOBJECT_CFLAGS"; then
+    pkg_cv_PYGOBJECT_CFLAGS="$PYGOBJECT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygobject-2.0 >= 2.8.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "pygobject-2.0 >= 2.8.0") 2>&5
   ac_status=$?
@@ -20633,15 +21147,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PYGOBJECT_LIBS"; then
-        pkg_cv_PYGOBJECT_LIBS="$PYGOBJECT_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$PYGOBJECT_LIBS"; then
+    pkg_cv_PYGOBJECT_LIBS="$PYGOBJECT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygobject-2.0 >= 2.8.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "pygobject-2.0 >= 2.8.0") 2>&5
   ac_status=$?
@@ -20651,9 +21163,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -20666,9 +21177,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pygobject-2.0 >= 2.8.0"`
+	        PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pygobject-2.0 >= 2.8.0" 2>&1`
         else
-	        PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pygobject-2.0 >= 2.8.0"`
+	        PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors "pygobject-2.0 >= 2.8.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$PYGOBJECT_PKG_ERRORS" >&5
@@ -20685,18 +21196,23 @@
 echo "${ECHO_T}yes" >&6; }
 	have_pygobject=yes
 fi
-   if test x"$have_pygobject" = xyes; then
-      cat >>confdefs.h <<_ACEOF
+   if test x"$enable_pygobject" = xyes -a x"$have_pygobject" = xno; then
+      { { echo "$as_me:$LINENO: error: pygobject support explicitly requested but pygobject couldn't be found" >&5
+echo "$as_me: error: pygobject support explicitly requested but pygobject couldn't be found" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+if test x"$have_pygobject" = xyes; then
+   cat >>confdefs.h <<_ACEOF
 #define HAVE_PYGOBJECT 1
 _ACEOF
 
-   fi
    LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $PYGOBJECT_CFLAGS"
    LIBGPOD_LIBS="$LIBGPOD_LIBS $PYGOBJECT_LIBS"
+else
+   have_pygobject=no
 fi
-
-
-if test x"$have_pygobject" = xyes; then
+ if test x"$have_pygobject" = xyes; then
   HAVE_PYGOBJECT_TRUE=
   HAVE_PYGOBJECT_FALSE='#'
 else
@@ -20705,7 +21221,7 @@
 fi
 
 
-ALL_LINGUAS="de es fr he it ja ro sv"
+ALL_LINGUAS="de es fr he it ja ro sv zh_CN"
 
 GETTEXT_PACKAGE=libgpod
 
@@ -20916,7 +21432,7 @@
 
     fi
   fi
-         USE_NLS=yes
+     USE_NLS=yes
 
 
     gt_cv_have_gettext=no
@@ -22253,19 +22769,38 @@
 fi
 
 
-  have_gtk_doc=no
   if test x$enable_gtk_doc = xyes; then
-    if test -z "$PKG_CONFIG"; then
-      # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: You need to have gtk-doc >= 1.0 installed to build gtk-doc" >&5
+echo "$as_me: error: You need to have gtk-doc >= 1.0 installed to build gtk-doc" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+  fi
+
+  { echo "$as_me:$LINENO: checking whether to build gtk-doc documentation" >&5
+echo $ECHO_N "checking whether to build gtk-doc documentation... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: result: $enable_gtk_doc" >&5
+echo "${ECHO_T}$enable_gtk_doc" >&6; }
+
+  for ac_prog in gtkdoc-check
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case $PKG_CONFIG in
+  case $GTKDOC_CHECK in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -22275,7 +22810,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -22283,47 +22818,24 @@
 done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   ;;
 esac
 fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
+GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK
+if test -n "$GTKDOC_CHECK"; then
+  { echo "$as_me:$LINENO: result: $GTKDOC_CHECK" >&5
+echo "${ECHO_T}$GTKDOC_CHECK" >&6; }
 else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
 
 
-    fi
-    if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
-      have_gtk_doc=yes
-    fi
+  test -n "$GTKDOC_CHECK" && break
+done
 
-  gtk_doc_min_version=1.0
-    if test "$have_gtk_doc" = yes; then
-      { echo "$as_me:$LINENO: checking gtk-doc version >= $gtk_doc_min_version" >&5
-echo $ECHO_N "checking gtk-doc version >= $gtk_doc_min_version... $ECHO_C" >&6; }
-      if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-      else
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-        have_gtk_doc=no
-      fi
-    fi
 
-    if test "$have_gtk_doc" != yes; then
-      enable_gtk_doc=no
-    fi
-  fi
-
-
-
-if test x$enable_gtk_doc = xyes; then
+   if test x$enable_gtk_doc = xyes; then
   ENABLE_GTK_DOC_TRUE=
   ENABLE_GTK_DOC_FALSE='#'
 else
@@ -22331,9 +22843,7 @@
   ENABLE_GTK_DOC_FALSE=
 fi
 
-
-
-if test -n "$LIBTOOL"; then
+   if test -n "$LIBTOOL"; then
   GTK_DOC_USE_LIBTOOL_TRUE=
   GTK_DOC_USE_LIBTOOL_FALSE='#'
 else
@@ -22370,7 +22880,7 @@
     { echo "$as_me:$LINENO: result: $with_python" >&5
 echo "${ECHO_T}$with_python" >&6; }
 
-    if test "X$with_python" == Xyes; then
+    if test "X$with_python" = Xyes; then
         if test -z "$PYTHON"; then
             # Extract the first word of "python", so it can be a program name with args.
 set dummy python; ac_word=$2
@@ -22653,7 +23163,7 @@
 CPPFLAGS="$save_CPPFLAGS"
 
 
-            if test "X$with_python" == Xyes; then
+            if test "X$with_python" = Xyes; then
                                                 if test `uname` = Darwin; then
                     PYTHON_LDFLAGS="-Wl,-F. -Wl,-F. -bundle"
                     if $PYTHON -c 'import sys, string; sys.exit(string.find(sys.prefix,"Framework")+1)'; then
@@ -22713,7 +23223,7 @@
 
 
 
-                                if test "X$with_python" == Xyes; then
+                                if test "X$with_python" = Xyes; then
 
         # Extract the first word of "swig", so it can be a program name with args.
 set dummy swig; ac_word=$2
@@ -22827,9 +23337,7 @@
             with_python="no"
         fi
     fi
-
-
-if test x$with_python = xyes; then
+     if test x$with_python = xyes; then
   HAVE_PYTHON_TRUE=
   HAVE_PYTHON_FALSE='#'
 else
@@ -22846,7 +23354,7 @@
   enableval=$enable_more_warnings; set_more_warnings="$enableval"
 else
 
-if test -d "$srcdir/{arch}" || test -d "$srcdir/.svn"; then
+if test -e "$srcdir/autogen.sh"; then
 	set_more_warnings=yes
 else
 	set_more_warnings=no
@@ -23063,6 +23571,13 @@
   ac_config_commands="$ac_config_commands po/stamp-it"
 
 
+if test -z "${WITH_INTERNAL_GCHECKSUM_TRUE}" && test -z "${WITH_INTERNAL_GCHECKSUM_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_INTERNAL_GCHECKSUM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_INTERNAL_GCHECKSUM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${HAVE_SGUTILS_TRUE}" && test -z "${HAVE_SGUTILS_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"HAVE_SGUTILS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -23483,6 +23998,7 @@
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -23716,6 +24232,7 @@
 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
 INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
 CYGPATH_W!$CYGPATH_W$ac_delim
 PACKAGE!$PACKAGE$ac_delim
 VERSION!$VERSION$ac_delim
@@ -23767,7 +24284,6 @@
 build_os!$build_os$ac_delim
 host!$host$ac_delim
 host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -23809,6 +24325,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+host_vendor!$host_vendor$ac_delim
 host_os!$host_os$ac_delim
 GREP!$GREP$ac_delim
 EGREP!$EGREP$ac_delim
@@ -23841,6 +24358,9 @@
 INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim
 INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim
 INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim
+XGETTEXT!$XGETTEXT$ac_delim
+MSGMERGE!$MSGMERGE$ac_delim
+MSGFMT!$MSGFMT$ac_delim
 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
@@ -23850,6 +24370,10 @@
 PKG_CONFIG!$PKG_CONFIG$ac_delim
 LIBGPOD_CFLAGS!$LIBGPOD_CFLAGS$ac_delim
 LIBGPOD_LIBS!$LIBGPOD_LIBS$ac_delim
+GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
+GLIB_LIBS!$GLIB_LIBS$ac_delim
+WITH_INTERNAL_GCHECKSUM_TRUE!$WITH_INTERNAL_GCHECKSUM_TRUE$ac_delim
+WITH_INTERNAL_GCHECKSUM_FALSE!$WITH_INTERNAL_GCHECKSUM_FALSE$ac_delim
 SGUTILS_LIBS!$SGUTILS_LIBS$ac_delim
 HAVE_SGUTILS_TRUE!$HAVE_SGUTILS_TRUE$ac_delim
 HAVE_SGUTILS_FALSE!$HAVE_SGUTILS_FALSE$ac_delim
@@ -23862,20 +24386,21 @@
 TAGLIB_LIBS!$TAGLIB_LIBS$ac_delim
 HAVE_TAGLIB_TRUE!$HAVE_TAGLIB_TRUE$ac_delim
 HAVE_TAGLIB_FALSE!$HAVE_TAGLIB_FALSE$ac_delim
+LIBXML_CFLAGS!$LIBXML_CFLAGS$ac_delim
+LIBXML_LIBS!$LIBXML_LIBS$ac_delim
 GDKPIXBUF_CFLAGS!$GDKPIXBUF_CFLAGS$ac_delim
 GDKPIXBUF_LIBS!$GDKPIXBUF_LIBS$ac_delim
 HAVE_GDKPIXBUF_TRUE!$HAVE_GDKPIXBUF_TRUE$ac_delim
 HAVE_GDKPIXBUF_FALSE!$HAVE_GDKPIXBUF_FALSE$ac_delim
+GDKPIXBUF_REQ!$GDKPIXBUF_REQ$ac_delim
 PYGOBJECT_CFLAGS!$PYGOBJECT_CFLAGS$ac_delim
 PYGOBJECT_LIBS!$PYGOBJECT_LIBS$ac_delim
 HAVE_PYGOBJECT_TRUE!$HAVE_PYGOBJECT_TRUE$ac_delim
 HAVE_PYGOBJECT_FALSE!$HAVE_PYGOBJECT_FALSE$ac_delim
 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
 USE_NLS!$USE_NLS$ac_delim
-MSGFMT!$MSGFMT$ac_delim
 MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim
 GMSGFMT!$GMSGFMT$ac_delim
-XGETTEXT!$XGETTEXT$ac_delim
 CATALOGS!$CATALOGS$ac_delim
 CATOBJEXT!$CATOBJEXT$ac_delim
 GMOFILES!$GMOFILES$ac_delim
@@ -23887,6 +24412,7 @@
 POSUB!$POSUB$ac_delim
 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
 HTML_DIR!$HTML_DIR$ac_delim
+GTKDOC_CHECK!$GTKDOC_CHECK$ac_delim
 ENABLE_GTK_DOC_TRUE!$ENABLE_GTK_DOC_TRUE$ac_delim
 ENABLE_GTK_DOC_FALSE!$ENABLE_GTK_DOC_FALSE$ac_delim
 GTK_DOC_USE_LIBTOOL_TRUE!$GTK_DOC_USE_LIBTOOL_TRUE$ac_delim
@@ -23896,16 +24422,6 @@
 PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim
 PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim
 PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim
-pythondir!$pythondir$ac_delim
-pkgpythondir!$pkgpythondir$ac_delim
-pyexecdir!$pyexecdir$ac_delim
-pkgpyexecdir!$pkgpyexecdir$ac_delim
-PYTHON_INCLUDES!$PYTHON_INCLUDES$ac_delim
-PYTHON_LDFLAGS!$PYTHON_LDFLAGS$ac_delim
-SWIG!$SWIG$ac_delim
-SWIG_LIB!$SWIG_LIB$ac_delim
-HAVE_PYTHON_TRUE!$HAVE_PYTHON_TRUE$ac_delim
-HAVE_PYTHON_FALSE!$HAVE_PYTHON_FALSE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -23947,11 +24463,21 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+pythondir!$pythondir$ac_delim
+pkgpythondir!$pkgpythondir$ac_delim
+pyexecdir!$pyexecdir$ac_delim
+pkgpyexecdir!$pkgpyexecdir$ac_delim
+PYTHON_INCLUDES!$PYTHON_INCLUDES$ac_delim
+PYTHON_LDFLAGS!$PYTHON_LDFLAGS$ac_delim
+SWIG!$SWIG$ac_delim
+SWIG_LIB!$SWIG_LIB$ac_delim
+HAVE_PYTHON_TRUE!$HAVE_PYTHON_TRUE$ac_delim
+HAVE_PYTHON_FALSE!$HAVE_PYTHON_FALSE$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 2; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -24178,6 +24704,11 @@
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
   esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -24231,6 +24762,7 @@
 s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
 
@@ -24346,21 +24878,22 @@
   fi
   rm -f "$tmp/out12"
 # Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $ac_file | $ac_file:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X$ac_file : 'X\(//\)[^/]' \| \
-	 X$ac_file : 'X\(//\)$' \| \
-	 X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -24395,8 +24928,9 @@
   # some people rename them; so instead we look at the file content.
   # Grep'ing the first line is not enough: some people post-process
   # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
     dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$mf" : 'X\(//\)[^/]' \| \
@@ -24595,7 +25129,7 @@
  Preprocessor .........: $CC $CPPFLAGS
  Compiler .............: $CC $CFLAGS $LIBGPOD_CFLAGS
  Linker ...............: $CC $LDFLAGS $LIBS $LIBGPOD_LIBS
- ArtworkDB support ....: $have_gdkpixbuf
+ Artwork support ......: $have_gdkpixbuf
  Python bindings ......: $with_python
  PyGObject support ....: $have_pygobject
 
@@ -24603,3 +25137,18 @@
  and then 'make install' for installation.
 "
 
+if test x"$enable_libxml" = xno; then
+        echo "
+**WARNING** libxml support is disabled, libgpod won't be able to
+parse SysInfoExtended. This means it can't take advantage of the
+extensive iPod description (image formats, features, ...)
+available from that file
+"
+fi
+
+if test x"$have_gdkpixbuf" = xno; then
+        echo "
+**WARNING** gdkpixbuf support is disabled. libgpod won't be able
+to read or write artwork (covers, photos, ...) from/to the iPod
+"
+fi

Modified: libgpod/trunk/configure.ac
===================================================================
--- libgpod/trunk/configure.ac	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/configure.ac	2009-01-24 12:10:00 UTC (rev 341)
@@ -10,7 +10,7 @@
 #   LIBGPOD_SO_VERSION - see comments
 #
 LIBGPOD_MAJOR_VERSION=0
-LIBGPOD_MINOR_VERSION=6
+LIBGPOD_MINOR_VERSION=7
 LIBGPOD_MICRO_VERSION=0
 # If you need a modifier for the version number. 
 # Normally empty, but can be used to make "fixup" releases.
@@ -24,7 +24,7 @@
 #                 changes to the signature and the semantic)
 #  ? :+1 : ?   == just internal changes
 # CURRENT : REVISION : AGE
-LIBGPOD_SO_VERSION=3:0:0
+LIBGPOD_SO_VERSION=4:0:0
 
 AC_SUBST(LIBGPOD_SO_VERSION)
 AC_SUBST(LIBGPOD_MAJOR_VERSION)
@@ -41,6 +41,7 @@
 
 AC_GNU_SOURCE
 AC_PROG_CC
+AM_PROG_CC_C_O
 
 # AC_PROG_CXX is only needed for the test program tests/test-rebuild-db.cc.
 # You can safely remove AC_PROG_CXX and the test program (edit tests/Makefile.am)
@@ -56,7 +57,6 @@
 AC_PROG_INTLTOOL([0.21])
 
 PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0)
-LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS -Wall"
 
 dnl **************************************************
 dnl * expand $libdir 
@@ -75,12 +75,36 @@
     eval echo $libdir
 )`
 
+
 dnl **************************************************
+dnl we've copied gchecksum from glib 2.16. Only use the
+dnl copy if the version of glib on the system does not
+dnl provide it.
+dnl **************************************************
+
+AC_ARG_WITH(internal-gchecksum,
+            AC_HELP_STRING([--with-internal-gchecksum],
+                           [Build using internal copy of gchecksum]),,
+                           with_internal_gchecksum=no)
+
+if test "x$with_internal_gchecksum" = "xno"; then
+        PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0, with_internal_gchecksum=no,
+                          with_internal_gchecksum=yes)
+fi
+
+AM_CONDITIONAL(WITH_INTERNAL_GCHECKSUM, test "x$with_internal_gchecksum" = "xyes")
+
+dnl **************************************************
 dnl * sgutils is necessary to get the xml device file from the ipod
 dnl **************************************************
-AC_CHECK_LIB(sgutils, sg_ll_inquiry,
-             [SGUTILS_LIBS="-lsgutils"; have_sgutils=yes], 
-	     have_sgutils=no)
+AC_CHECK_LIB(sgutils2, sg_ll_inquiry,
+             [SGUTILS_LIBS="-lsgutils2"; have_sgutils=yes],
+             have_sgutils=no)
+if test "x$have_sgutils" != xyes; then
+    AC_CHECK_LIB(sgutils, sg_ll_inquiry,
+                 [SGUTILS_LIBS="-lsgutils"; have_sgutils=yes],
+                 have_sgutils=no)
+fi
 AC_SUBST(SGUTILS_LIBS)
 AM_CONDITIONAL(HAVE_SGUTILS, test x"$have_sgutils" = xyes)
 
@@ -105,7 +129,7 @@
       AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
   fi
 
-  if test "x$enable_hal" == "xyes"; then
+  if test "x$enable_hal" = "xyes"; then
         AC_DEFINE(HAVE_HAL, 1, [Define if you have HAL support])
         AC_SUBST(HAL_CFLAGS)
 	AC_SUBST(HAL_LIBS)
@@ -127,26 +151,48 @@
 AC_SUBST(TAGLIB_LIBS)
 AM_CONDITIONAL(HAVE_TAGLIB, test x"$have_taglib" = xyes)
 
+dnl **************************************************
+dnl * libxml is used to parse the plist files (aka SysInfoExtended)
+dnl **************************************************
+AC_ARG_ENABLE(libxml, [AC_HELP_STRING([--disable-libxml],[SysInfoExtended won't be parsed])], 
+[case "${enableval}" in
+  no) enable_libxml=no ;;
+  *) enable_libxml=yes;;
+esac])
+AH_TEMPLATE([HAVE_LIBXML], [Whether libxml is installed, it's used to parse SysInfoExtended])
+if test x$enable_libxml != xno; then
+   PKG_CHECK_MODULES(LIBXML, libxml-2.0)
+   AC_DEFINE_UNQUOTED(HAVE_LIBXML, 1)
+   LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $LIBXML_CFLAGS"
+   LIBGPOD_LIBS="$LIBGPOD_LIBS $LIBXML_LIBS"
+fi
 
 dnl **************************************************
 dnl * GDKPIXBUF is optional
 dnl **************************************************
-
 AC_ARG_ENABLE(gdk-pixbuf, [AC_HELP_STRING([--disable-gdk-pixbuf],[ArtworkDB will be disabled without gdk-pixbuf])], 
 [case "${enableval}" in
-  no) have_gdkpixbuf=no ;;
-  *) have_gdkpixbuf=yes;;
-esac], have_gdkpixbuf=yes)
+  no) enable_gdkpixbuf=no ;;
+  *) enable_gdkpixbuf=yes;;
+esac])
 AH_TEMPLATE([HAVE_GDKPIXBUF], [Whether gdk-pixbuf is installed, ArtworkDB writing support will be disabled if it can't be found])
-if test x$have_gdkpixbuf = xyes; then
-   PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0 >= 2.6.0, have_gdkpixbuf=yes, have_gdkpixbuf=no)
-   if test x"$have_gdkpixbuf" = xyes; then
-      AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF, 1)
+if test x$enable_gdkpixbuf != xno; then
+   GDKPIXBUF_REQ="gdk-pixbuf-2.0"
+   PKG_CHECK_MODULES(GDKPIXBUF, $GDKPIXBUF_REQ >= 2.6.0, have_gdkpixbuf=yes, have_gdkpixbuf=no)
+   if test x"$enable_gdkpixbuf" = xyes -a x"$have_gdkpixbuf" = xno; then
+      AC_MSG_ERROR([gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found])
    fi
+fi
+if test x"$have_gdkpixbuf" = xyes; then
+   AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF, 1)
    LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $GDKPIXBUF_CFLAGS"
    LIBGPOD_LIBS="$LIBGPOD_LIBS $GDKPIXBUF_LIBS"
+else
+   have_gdkpixbuf=no
+   GDKPIXBUF_REQ=""
 fi
 AM_CONDITIONAL(HAVE_GDKPIXBUF, test x"$have_gdkpixbuf" = xyes)
+AC_SUBST(GDKPIXBUF_REQ)
 
 dnl **************************************************
 dnl * PYGOBJECT is optional
@@ -154,24 +200,29 @@
 
 AC_ARG_ENABLE(pygobject, [AC_HELP_STRING([--disable-pygobject],[Python API will lack GdkPixbuf support without PyGOBJECT])], 
 [case "${enableval}" in
-  no) have_pygobject=no ;;
-  *) have_pygobject=yes;;
-esac], have_pygobject=yes)
+  no) enable_pygobject=no ;;
+  *) enable_pygobject=yes;;
+esac])
 AH_TEMPLATE([HAVE_PYGOBJECT], [Whether pygobject is installed, Python API will lack GdkPixbuf support without PyGOBJECT])
-if test x$have_pygobject = xyes; then
+if test x$enable_pygobject != xno; then
    PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= 2.8.0, have_pygobject=yes, have_pygobject=no)
-   if test x"$have_pygobject" = xyes; then
-      AC_DEFINE_UNQUOTED(HAVE_PYGOBJECT, 1)
+   if test x"$enable_pygobject" = xyes -a x"$have_pygobject" = xno; then
+      AC_MSG_ERROR([pygobject support explicitly requested but pygobject couldn't be found])
    fi
+fi
+if test x"$have_pygobject" = xyes; then
+   AC_DEFINE_UNQUOTED(HAVE_PYGOBJECT, 1)
    LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $PYGOBJECT_CFLAGS"
    LIBGPOD_LIBS="$LIBGPOD_LIBS $PYGOBJECT_LIBS"
+else
+   have_pygobject=no
 fi
 AM_CONDITIONAL(HAVE_PYGOBJECT, test x"$have_pygobject" = xyes)
 
 dnl **************************************************
 dnl * internationalization support
 dnl **************************************************
-ALL_LINGUAS="de es fr he it ja ro sv"
+ALL_LINGUAS="de es fr he it ja ro sv zh_CN"
 
 GETTEXT_PACKAGE=libgpod
 AC_SUBST(GETTEXT_PACKAGE)
@@ -201,7 +252,7 @@
 AC_ARG_ENABLE(more-warnings,
 [  --enable-more-warnings  Maximum compiler warnings],
 set_more_warnings="$enableval",[
-if test -d "$srcdir/{arch}" || test -d "$srcdir/.svn"; then
+if test -e "$srcdir/autogen.sh"; then
 	set_more_warnings=yes
 else
 	set_more_warnings=no
@@ -270,7 +321,7 @@
  Preprocessor .........: $CC $CPPFLAGS
  Compiler .............: $CC $CFLAGS $LIBGPOD_CFLAGS
  Linker ...............: $CC $LDFLAGS $LIBS $LIBGPOD_LIBS
- ArtworkDB support ....: $have_gdkpixbuf
+ Artwork support ......: $have_gdkpixbuf
  Python bindings ......: $with_python
  PyGObject support ....: $have_pygobject
 
@@ -278,3 +329,18 @@
  and then 'make install' for installation.
 "
 
+if test x"$enable_libxml" = xno; then
+        echo "
+**WARNING** libxml support is disabled, libgpod won't be able to 
+parse SysInfoExtended. This means it can't take advantage of the 
+extensive iPod description (image formats, features, ...) 
+available from that file
+"
+fi
+
+if test x"$have_gdkpixbuf" = xno; then
+        echo "
+**WARNING** gdkpixbuf support is disabled. libgpod won't be able
+to read or write artwork (covers, photos, ...) from/to the iPod
+"
+fi

Modified: libgpod/trunk/debian/changelog
===================================================================
--- libgpod/trunk/debian/changelog	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/debian/changelog	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,3 +1,9 @@
+libgpod (0.7.0-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Frank Lichtenheld <djpig at debian.org>  Sat, 24 Jan 2009 11:35:12 +0100
+
 libgpod (0.6.0-7) unstable; urgency=high
 
   * Add missing dependency of python-gpod on python-gobject.

Modified: libgpod/trunk/depcomp
===================================================================
--- libgpod/trunk/depcomp	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/depcomp	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,9 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2005-07-09.11
+scriptversion=2007-03-29.01
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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
@@ -91,7 +92,20 @@
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
   if test $stat -eq 0; then :
   else
@@ -201,34 +215,39 @@
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -276,6 +295,46 @@
   rm -f "$tmpdepfile"
   ;;
 
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +347,13 @@
 
    if test "$libtool" = yes; then
       # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
+      # static library.  This mechanism is used in libtool 1.4 series to
       # handle both shared and static libraries in a single compilation.
       # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
       #
       # With libtool 1.5 this exception was removed, and libtool now
       # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # compilations output dependencies in $dir.libs/$base.o.d and
       # in $dir$base.o.d.  We have to check for both files, because
       # one of the two compilations can be disabled.  We should prefer
       # $dir$base.o.d over $dir.libs/$base.o.d because the latter is

Modified: libgpod/trunk/docs/Makefile.in
===================================================================
--- libgpod/trunk/docs/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -13,15 +13,11 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -50,10 +46,13 @@
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -61,8 +60,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -89,35 +86,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -158,15 +144,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -202,13 +190,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -220,6 +208,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -251,8 +240,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = reference
 all: all-recursive
 
@@ -293,10 +285,6 @@
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -328,8 +316,7 @@
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
 	@failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -373,8 +360,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -399,8 +386,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -410,13 +397,12 @@
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -430,22 +416,21 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -459,7 +444,7 @@
 	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    distdir=`$(am__cd) $(distdir) && pwd`; \
 	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -467,6 +452,8 @@
 	      $(MAKE) $(AM_MAKEFLAGS) \
 	        top_distdir="$$top_distdir" \
 	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -506,8 +493,7 @@
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -521,12 +507,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
 install-exec-am:
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -545,22 +539,24 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean 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-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
 
 # 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.

Modified: libgpod/trunk/docs/reference/Makefile.am
===================================================================
--- libgpod/trunk/docs/reference/Makefile.am	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/Makefile.am	2009-01-24 12:10:00 UTC (rev 341)
@@ -79,3 +79,6 @@
 # Build the documentation when creating tarballs
 dist-hook-local:
 	$(MAKE) all
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR)

Modified: libgpod/trunk/docs/reference/Makefile.in
===================================================================
--- libgpod/trunk/docs/reference/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -19,15 +19,11 @@
 ####################################
 # Everything below here is generic #
 ####################################
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -59,8 +55,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -87,35 +81,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -156,15 +139,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -200,13 +185,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -218,6 +203,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -249,8 +235,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 # We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
@@ -350,7 +339,12 @@
 	$(DOC_MODULE).prerequisites \
 	$(DOC_MODULE).signals
 
-CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+REPORT_FILES = \
+	$(DOC_MODULE)-undocumented.txt \
+	$(DOC_MODULE)-undeclared.txt \
+	$(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
 all: all-am
 
 .SUFFIXES:
@@ -391,10 +385,6 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -403,23 +393,21 @@
 
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/../..
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -468,7 +456,7 @@
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic distclean-local
 
 dvi: dvi-am
 
@@ -482,12 +470,20 @@
 
 install-data-am: install-data-local
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -507,19 +503,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-local
+uninstall-am: uninstall-local
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 
+.MAKE: install-am install-strip uninstall-am
+
 .PHONY: all all-am all-local check check-am clean clean-generic \
 	clean-libtool clean-local dist-hook distclean \
-	distclean-generic distclean-libtool distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-data-local install-exec \
-	install-exec-am install-info install-info-am install-man \
+	distclean-generic distclean-libtool distclean-local distdir \
+	dvi dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-data-local 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-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic \
 	maintainer-clean-local mostlyclean mostlyclean-generic \
 	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-info-am uninstall-local
+	uninstall-hook uninstall-local
 
 
 @ENABLE_GTK_DOC_TRUE at all-local: html-build.stamp
@@ -558,6 +560,9 @@
 tmpl.stamp: tmpl-build.stamp
 	@true
 
+tmpl/*.sgml:
+	@true
+
 #### xml ####
 
 sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
@@ -575,11 +580,11 @@
 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 	@echo 'gtk-doc: Building HTML'
 	@-chmod -R u+w $(srcdir)
-	rm -rf $(srcdir)/html 
+	rm -rf $(srcdir)/html
 	mkdir $(srcdir)/html
 	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
 	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
-	@echo 'gtk-doc: Fixing cross-references' 
+	@echo 'gtk-doc: Fixing cross-references'
 	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
 	touch html-build.stamp
 
@@ -589,8 +594,13 @@
 	rm -f *~ *.bak
 	rm -rf .libs
 
+distclean-local:
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
 maintainer-clean-local: clean
-	cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+	cd $(srcdir) && rm -rf xml html
 
 install-data-local:
 	installfiles=`echo $(srcdir)/html/*`; \
@@ -604,6 +614,8 @@
 	  done; \
 	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
 	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+	  (which gtkdoc-rebase >& /dev/null && \
+            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || : ; \
 	fi
 
 uninstall-local:
@@ -624,15 +636,19 @@
 	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
 	-cp $(srcdir)/xml/*.xml $(distdir)/xml
 	cp $(srcdir)/html/* $(distdir)/html
-	if test -f $(srcdir)/$(DOC_MODULE).types; then \
-	  cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \
-	fi
+	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+	cd $(distdir) && rm -f $(DISTCLEANFILES)
+	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
 
 .PHONY : dist-hook-local docs
 
 # Build the documentation when creating tarballs
 dist-hook-local:
 	$(MAKE) all
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR)
 # 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:

Modified: libgpod/trunk/docs/reference/html/ch01.html
===================================================================
--- libgpod/trunk/docs/reference/html/ch01.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/ch01.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>iPod database components</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="prev" href="libgpod-Low-level-functions.html" title="Low-level functions">
 <link rel="next" href="libgpod-Tracks.html" title="Tracks">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -24,7 +24,7 @@
 </tr></table>
 <div class="chapter" lang="en">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2510524"></a>iPod database components</h2></div></div></div>
+<a name="id2734640"></a>iPod database components</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="libgpod-Tracks.html">Tracks</a></span><span class="refpurpose"> &#8212; Data structure to store metadata about an iPod track</span>
@@ -39,6 +39,9 @@
 <span class="refentrytitle"><a href="libgpod-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (album covers)</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="libgpod-Chapter-Data.html">Chapter Data</a></span><span class="refpurpose"> &#8212; Data structure to store chapter data for tracks</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="libgpod-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
 </dt>
 </dl></div>

Modified: libgpod/trunk/docs/reference/html/index.html
===================================================================
--- libgpod/trunk/docs/reference/html/index.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/index.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,11 +3,11 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>libgpod Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <meta name="description" content="This manual documents the interfaces of the libgpod library and has some short notes to help get you up to speed with using the library. Please see the programs in the tests/ directory of the source distribution for some usage examples. A more complete example can be found in the source for Gtkpod. You can also ask questions on the developer's mailing list: gtkpod-devel at lists.sourceforge.net.">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="next" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,7 +23,7 @@
 <span class="firstname">Jorg</span> <span class="surname">Schuler</span>
 </h3>
 <div class="affiliation"><div class="address"><p><br>
-	&#160;&#160;&#160;&#160;<code class="email">&lt;<a href="mailto:jorg.schuler at gmx.de">jorg.schuler at gmx.de</a>&gt;</code><br>
+	&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:jorg.schuler at gmx.de">jorg.schuler at gmx.de</a>&gt;</code><br>
 	&#160;&#160;</p></div></div>
 </div>
 <div class="author">
@@ -31,21 +31,21 @@
 <span class="firstname">Christophe</span> <span class="surname">Fergeau</span>
 </h3>
 <div class="affiliation"><div class="address"><p><br>
-	&#160;&#160;&#160;&#160;<code class="email">&lt;<a href="mailto:teuf at gnome.org">teuf at gnome.org</a>&gt;</code><br>
+	&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:teuf at gnome.org">teuf at gnome.org</a>&gt;</code><br>
 	&#160;&#160;</p></div></div>
 </div>
 </div></div>
-<div><p class="releaseinfo">for libgpod <span>0.6.0</span></p></div>
-<div><p class="copyright">Copyright &#169; 2006 Christophe Fergeau</p></div>
+<div><p class="releaseinfo">for libgpod <span>0.7.0</span></p></div>
+<div><p class="copyright">Copyright &#169; 2006-2008 Christophe Fergeau</p></div>
 <div><div class="legalnotice">
-<a name="id2515628"></a><p>Permission is granted to copy, distribute and/or modify
+<a name="id2740084"></a><p>Permission is granted to copy, distribute and/or modify
       this document under the terms of the <em class="citetitle">GNU Free
       Documentation License</em>, Version 1.1 or any later
       version published by the Free Software Foundation with no
       Invariant Sections, no Front-Cover Texts, and no Back-Cover
       Texts. You may obtain a copy of the <em class="citetitle">GNU Free
       Documentation License</em> from the Free Software
-      Foundation by visiting <a href="http://www.fsf.org" target="_top">their Web site</a> or by writing
+      Foundation by visiting <a class="ulink" href="http://www.fsf.org" target="_top">their Web site</a> or by writing
       to: Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.</p>
 <p>Many of the names used by companies to distinguish their
@@ -63,10 +63,10 @@
       library.
       </p>
 <p>
-      Please see the programs in the <a href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/" target="_top">tests/</a>
+      Please see the programs in the <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/" target="_top">tests/</a>
       directory of the source distribution for some usage examples.  A more
-      complete example can be found in the source for <a href="http://www.gtkpod.org" target="_top"> Gtkpod</a>.  You can also ask questions
-      on the developer's mailing list: <a href="mailto:gtkpod-devel at lists.sourceforge.net" target="_top">gtkpod-devel at lists.sourceforge.net</a>.
+      complete example can be found in the source for <a class="ulink" href="http://www.gtkpod.org" target="_top"> Gtkpod</a>.  You can also ask questions
+      on the developer's mailing list: <a class="ulink" href="mailto:gtkpod-devel at lists.sourceforge.net" target="_top">gtkpod-devel at lists.sourceforge.net</a>.
       </p>
 </div></div>
 </div>
@@ -76,13 +76,14 @@
 <dt><span class="part"><a href="itunesdb.html">I. iPod database</a></span></dt>
 <dd><dl>
 <dt>
-<span class="refentrytitle"><a href="libgpod-The-Itdb-iTunesDB-structure.html">iPod database reading/writing</a></span><span class="refpurpose"> &#8212; Functions to create, read, write the iPod database</span>
+<span class="refentrytitle"><a href="libgpod-The-Itdb-iTunesDB-structure.html">iPod database reading/writing</a></span><span class="refpurpose"> &#8212; Functions to read, write, and create an iPod database</span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="libgpod-File-handling-functions.html">File handling functions</a></span><span class="refpurpose"> &#8212; Managing files on the iPod</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libgpod-Time-handling.html">Time handling</a></span><span class="refpurpose"> &#8212; Helper functions to convert between Epoch time and Mac (iPod) time</span>
+<span class="refentrytitle"><a href="libgpod-Time-handling.html">Time handling</a></span><span class="refpurpose"> &#8212; [DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="libgpod-Low-level-functions.html">Low-level functions</a></span><span class="refpurpose"> &#8212; Low-level functions which shouldn't be needed in normal situations</span>
@@ -102,6 +103,9 @@
 <span class="refentrytitle"><a href="libgpod-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (album covers)</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="libgpod-Chapter-Data.html">Chapter Data</a></span><span class="refpurpose"> &#8212; Data structure to store chapter data for tracks</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="libgpod-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
 </dt>
 </dl></dd>

Modified: libgpod/trunk/docs/reference/html/index.sgml
===================================================================
--- libgpod/trunk/docs/reference/html/index.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/index.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,11 @@
 <ANCHOR id="libgpod-The-Itdb-iTunesDB-structure" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html">
 <ANCHOR id="Itdb-iTunesDB" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">
-<ANCHOR id="ItdbUserDataDestroyFunc" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">
-<ANCHOR id="ItdbUserDataDuplicateFunc" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">
+<ANCHOR id="ItdbFileError" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError">
+<ANCHOR id="ITDB-FILE-ERROR-SEEK:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-SEEK:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-CORRUPT:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-CORRUPT:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-NOTFOUND:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-NOTFOUND:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-RENAME:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-RENAME:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS">
 <ANCHOR id="itdb-new" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-new">
 <ANCHOR id="itdb-free" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-free">
 <ANCHOR id="itdb-parse" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse">
@@ -11,6 +15,8 @@
 <ANCHOR id="itdb-tracks-number" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number">
 <ANCHOR id="itdb-tracks-number-nontransferred" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred">
 <ANCHOR id="itdb-playlists-number" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number">
+<ANCHOR id="ItdbUserDataDestroyFunc" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">
+<ANCHOR id="ItdbUserDataDuplicateFunc" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">
 <ANCHOR id="libgpod-File-handling-functions" href="libgpod/libgpod-File-handling-functions.html">
 <ANCHOR id="itdb-cp-track-to-ipod" href="libgpod/libgpod-File-handling-functions.html#itdb-cp-track-to-ipod">
 <ANCHOR id="itdb-filename-fs2ipod" href="libgpod/libgpod-File-handling-functions.html#itdb-filename-fs2ipod">
@@ -36,17 +42,23 @@
 <ANCHOR id="itdb-get-photos-thumb-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir">
 <ANCHOR id="itdb-get-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-path">
 <ANCHOR id="itdb-resolve-path" href="libgpod/libgpod-Low-level-functions.html#itdb-resolve-path">
-<ANCHOR id="itdb-shuffle-write" href="libgpod/libgpod-Low-level-functions.html#itdb-shuffle-write">
-<ANCHOR id="itdb-shuffle-write-file" href="libgpod/libgpod-Low-level-functions.html#itdb-shuffle-write-file">
 <ANCHOR id="itdb-cp" href="libgpod/libgpod-Low-level-functions.html#itdb-cp">
 <ANCHOR id="itdb-cp-get-dest-filename" href="libgpod/libgpod-Low-level-functions.html#itdb-cp-get-dest-filename">
 <ANCHOR id="itdb-cp-finalize" href="libgpod/libgpod-Low-level-functions.html#itdb-cp-finalize">
 <ANCHOR id="itdb-parse-file" href="libgpod/libgpod-Low-level-functions.html#itdb-parse-file">
 <ANCHOR id="itdb-write-file" href="libgpod/libgpod-Low-level-functions.html#itdb-write-file">
+<ANCHOR id="itdb-shuffle-write" href="libgpod/libgpod-Low-level-functions.html#itdb-shuffle-write">
+<ANCHOR id="itdb-shuffle-write-file" href="libgpod/libgpod-Low-level-functions.html#itdb-shuffle-write-file">
 <ANCHOR id="itdb-duplicate" href="libgpod/libgpod-Low-level-functions.html#itdb-duplicate">
 <ANCHOR id="libgpod-Tracks" href="libgpod/libgpod-Tracks.html">
 <ANCHOR id="Itdb-Track" href="libgpod/libgpod-Tracks.html#Itdb-Track">
 <ANCHOR id="Itdb-Mediatype" href="libgpod/libgpod-Tracks.html#Itdb-Mediatype">
+<ANCHOR id="ITDB-MEDIATYPE-AUDIO:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-AUDIO:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-MOVIE:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-MOVIE:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-PODCAST:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-PODCAST:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-AUDIOBOOK:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-AUDIOBOOK:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-MUSICVIDEO:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-MUSICVIDEO:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-TVSHOW:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-TVSHOW:CAPS">
 <ANCHOR id="ITDB-RATING-STEP:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">
 <ANCHOR id="itdb-track-new" href="libgpod/libgpod-Tracks.html#itdb-track-new">
 <ANCHOR id="itdb-track-free" href="libgpod/libgpod-Tracks.html#itdb-track-free">
@@ -58,6 +70,8 @@
 <ANCHOR id="itdb-track-id-tree-create" href="libgpod/libgpod-Tracks.html#itdb-track-id-tree-create">
 <ANCHOR id="itdb-track-id-tree-destroy" href="libgpod/libgpod-Tracks.html#itdb-track-id-tree-destroy">
 <ANCHOR id="itdb-track-id-tree-by-id" href="libgpod/libgpod-Tracks.html#itdb-track-id-tree-by-id">
+<ANCHOR id="itdb-track-get-thumbnail" href="libgpod/libgpod-Tracks.html#itdb-track-get-thumbnail">
+<ANCHOR id="itdb-track-has-thumbnails" href="libgpod/libgpod-Tracks.html#itdb-track-has-thumbnails">
 <ANCHOR id="itdb-track-set-thumbnails" href="libgpod/libgpod-Tracks.html#itdb-track-set-thumbnails">
 <ANCHOR id="itdb-track-set-thumbnails-from-data" href="libgpod/libgpod-Tracks.html#itdb-track-set-thumbnails-from-data">
 <ANCHOR id="itdb-track-set-thumbnails-from-pixbuf" href="libgpod/libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf">
@@ -65,6 +79,32 @@
 <ANCHOR id="libgpod-Playlists" href="libgpod/libgpod-Playlists.html">
 <ANCHOR id="Itdb-Playlist" href="libgpod/libgpod-Playlists.html#Itdb-Playlist">
 <ANCHOR id="ItdbPlaylistSortOrder" href="libgpod/libgpod-Playlists.html#ItdbPlaylistSortOrder">
+<ANCHOR id="ITDB-PSO-MANUAL:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-MANUAL:CAPS">
+<ANCHOR id="ITDB-PSO-TITLE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TITLE:CAPS">
+<ANCHOR id="ITDB-PSO-ALBUM:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-ALBUM:CAPS">
+<ANCHOR id="ITDB-PSO-ARTIST:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-ARTIST:CAPS">
+<ANCHOR id="ITDB-PSO-BIRATE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-BIRATE:CAPS">
+<ANCHOR id="ITDB-PSO-GENRE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-GENRE:CAPS">
+<ANCHOR id="ITDB-PSO-FILETYPE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-FILETYPE:CAPS">
+<ANCHOR id="ITDB-PSO-TIME-MODIFIED:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME-MODIFIED:CAPS">
+<ANCHOR id="ITDB-PSO-TRACK-NR:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TRACK-NR:CAPS">
+<ANCHOR id="ITDB-PSO-SIZE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-SIZE:CAPS">
+<ANCHOR id="ITDB-PSO-TIME:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME:CAPS">
+<ANCHOR id="ITDB-PSO-YEAR:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-YEAR:CAPS">
+<ANCHOR id="ITDB-PSO-SAMPLERATE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-SAMPLERATE:CAPS">
+<ANCHOR id="ITDB-PSO-COMMENT:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-COMMENT:CAPS">
+<ANCHOR id="ITDB-PSO-TIME-ADDED:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME-ADDED:CAPS">
+<ANCHOR id="ITDB-PSO-EQUALIZER:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-EQUALIZER:CAPS">
+<ANCHOR id="ITDB-PSO-COMPOSER:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-COMPOSER:CAPS">
+<ANCHOR id="ITDB-PSO-PLAYCOUNT:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-PLAYCOUNT:CAPS">
+<ANCHOR id="ITDB-PSO-TIME-PLAYED:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME-PLAYED:CAPS">
+<ANCHOR id="ITDB-PSO-CD-NR:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-CD-NR:CAPS">
+<ANCHOR id="ITDB-PSO-RATING:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-RATING:CAPS">
+<ANCHOR id="ITDB-PSO-RELEASE-DATE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-RELEASE-DATE:CAPS">
+<ANCHOR id="ITDB-PSO-BPM:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-BPM:CAPS">
+<ANCHOR id="ITDB-PSO-GROUPING:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-GROUPING:CAPS">
+<ANCHOR id="ITDB-PSO-CATEGORY:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-CATEGORY:CAPS">
+<ANCHOR id="ITDB-PSO-DESCRIPTION:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-DESCRIPTION:CAPS">
 <ANCHOR id="itdb-playlist-new" href="libgpod/libgpod-Playlists.html#itdb-playlist-new">
 <ANCHOR id="itdb-playlist-free" href="libgpod/libgpod-Playlists.html#itdb-playlist-free">
 <ANCHOR id="itdb-playlist-duplicate" href="libgpod/libgpod-Playlists.html#itdb-playlist-duplicate">
@@ -93,13 +133,102 @@
 <ANCHOR id="Itdb-SPLRule" href="libgpod/libgpod-Smart-Playlists.html#Itdb-SPLRule">
 <ANCHOR id="Itdb-SPLRules" href="libgpod/libgpod-Smart-Playlists.html#Itdb-SPLRules">
 <ANCHOR id="ItdbLimitSort" href="libgpod/libgpod-Smart-Playlists.html#ItdbLimitSort">
+<ANCHOR id="ITDB-LIMITSORT-RANDOM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-RANDOM:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-SONG-NAME:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-SONG-NAME:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-ALBUM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-ALBUM:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-ARTIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-ARTIST:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-GENRE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-GENRE:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-HIGHEST-RATING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-HIGHEST-RATING:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LOWEST-RATING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LOWEST-RATING:CAPS">
 <ANCHOR id="ItdbLimitType" href="libgpod/libgpod-Smart-Playlists.html#ItdbLimitType">
+<ANCHOR id="ITDB-LIMITTYPE-MINUTES:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-MINUTES:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-MB:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-MB:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-SONGS:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-SONGS:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-HOURS:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-HOURS:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-GB:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-GB:CAPS">
 <ANCHOR id="ItdbSPLAction" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLAction">
+<ANCHOR id="ITDB-SPLACTION-IS-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-INT:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-GREATER-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-GREATER-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-LESS-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-LESS-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-IN-THE-LAST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-IN-THE-LAST:CAPS">
+<ANCHOR id="ITDB-SPLACTION-BINARY-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-BINARY-AND:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-STRING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-STRING:CAPS">
+<ANCHOR id="ITDB-SPLACTION-CONTAINS:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-CONTAINS:CAPS">
+<ANCHOR id="ITDB-SPLACTION-STARTS-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-STARTS-WITH:CAPS">
+<ANCHOR id="ITDB-SPLACTION-ENDS-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-ENDS-WITH:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-INT:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT:CAPS">
+<ANCHOR id="ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS">
+<ANCHOR id="ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS">
 <ANCHOR id="ItdbSPLActionLast" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLActionLast">
+<ANCHOR id="ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS">
 <ANCHOR id="ItdbSPLActionType" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLActionType">
+<ANCHOR id="ITDB-SPLAT-STRING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-STRING:CAPS">
+<ANCHOR id="ITDB-SPLAT-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-INT:CAPS">
+<ANCHOR id="ITDB-SPLAT-DATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-DATE:CAPS">
+<ANCHOR id="ITDB-SPLAT-RANGE-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-RANGE-INT:CAPS">
+<ANCHOR id="ITDB-SPLAT-RANGE-DATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-RANGE-DATE:CAPS">
+<ANCHOR id="ITDB-SPLAT-INTHELAST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-INTHELAST:CAPS">
+<ANCHOR id="ITDB-SPLAT-PLAYLIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-PLAYLIST:CAPS">
+<ANCHOR id="ITDB-SPLAT-NONE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-NONE:CAPS">
+<ANCHOR id="ITDB-SPLAT-INVALID:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-INVALID:CAPS">
+<ANCHOR id="ITDB-SPLAT-UNKNOWN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-SPLAT-BINARY-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-BINARY-AND:CAPS">
 <ANCHOR id="ItdbSPLField" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLField">
+<ANCHOR id="ITDB-SPLFIELD-SONG-NAME:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SONG-NAME:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-ALBUM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-ALBUM:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-ARTIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-ARTIST:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-BITRATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-BITRATE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SAMPLE-RATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SAMPLE-RATE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-YEAR:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-YEAR:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-GENRE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-GENRE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-KIND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-KIND:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-DATE-MODIFIED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-DATE-MODIFIED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-TRACKNUMBER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-TRACKNUMBER:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SIZE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SIZE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-TIME:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-TIME:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-COMMENT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-COMMENT:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-DATE-ADDED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-DATE-ADDED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-COMPOSER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-COMPOSER:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-PLAYCOUNT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-PLAYCOUNT:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-LAST-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-LAST-PLAYED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-DISC-NUMBER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-DISC-NUMBER:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-RATING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-RATING:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-COMPILATION:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-COMPILATION:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-BPM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-BPM:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-GROUPING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-GROUPING:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-PLAYLIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-PLAYLIST:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-VIDEO-KIND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-VIDEO-KIND:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-TVSHOW:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-TVSHOW:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SEASON-NR:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SEASON-NR:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SKIPCOUNT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SKIPCOUNT:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-LAST-SKIPPED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-LAST-SKIPPED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-ALBUMARTIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-ALBUMARTIST:CAPS">
 <ANCHOR id="ItdbSPLFieldType" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLFieldType">
+<ANCHOR id="ITDB-SPLFT-STRING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-STRING:CAPS">
+<ANCHOR id="ITDB-SPLFT-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-INT:CAPS">
+<ANCHOR id="ITDB-SPLFT-BOOLEAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-BOOLEAN:CAPS">
+<ANCHOR id="ITDB-SPLFT-DATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-DATE:CAPS">
+<ANCHOR id="ITDB-SPLFT-PLAYLIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-PLAYLIST:CAPS">
+<ANCHOR id="ITDB-SPLFT-UNKNOWN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-SPLFT-BINARY-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-BINARY-AND:CAPS">
 <ANCHOR id="ItdbSPLMatch" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLMatch">
+<ANCHOR id="ITDB-SPLMATCH-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLMATCH-AND:CAPS">
+<ANCHOR id="ITDB-SPLMATCH-OR:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLMATCH-OR:CAPS">
 <ANCHOR id="ITDB-SPL-DATE-IDENTIFIER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS">
 <ANCHOR id="ITDB-SPL-STRING-MAXLEN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS">
 <ANCHOR id="itdb-splr-get-field-type" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-get-field-type">
@@ -116,22 +245,31 @@
 <ANCHOR id="itdb-spl-update-live" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-update-live">
 <ANCHOR id="libgpod-Artwork" href="libgpod/libgpod-Artwork.html">
 <ANCHOR id="Itdb-Artwork" href="libgpod/libgpod-Artwork.html#Itdb-Artwork">
-<ANCHOR id="Itdb-Thumb" href="libgpod/libgpod-Artwork.html#Itdb-Thumb">
-<ANCHOR id="ItdbThumbType" href="libgpod/libgpod-Artwork.html#ItdbThumbType">
 <ANCHOR id="itdb-artwork-new" href="libgpod/libgpod-Artwork.html#itdb-artwork-new">
 <ANCHOR id="itdb-artwork-duplicate" href="libgpod/libgpod-Artwork.html#itdb-artwork-duplicate">
 <ANCHOR id="itdb-artwork-free" href="libgpod/libgpod-Artwork.html#itdb-artwork-free">
-<ANCHOR id="itdb-artwork-add-thumbnail" href="libgpod/libgpod-Artwork.html#itdb-artwork-add-thumbnail">
-<ANCHOR id="itdb-artwork-add-thumbnail-from-data" href="libgpod/libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-data">
-<ANCHOR id="itdb-artwork-add-thumbnail-from-pixbuf" href="libgpod/libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-pixbuf">
-<ANCHOR id="itdb-artwork-remove-thumbnail" href="libgpod/libgpod-Artwork.html#itdb-artwork-remove-thumbnail">
+<ANCHOR id="itdb-artwork-get-pixbuf" href="libgpod/libgpod-Artwork.html#itdb-artwork-get-pixbuf">
+<ANCHOR id="itdb-artwork-set-thumbnail" href="libgpod/libgpod-Artwork.html#itdb-artwork-set-thumbnail">
+<ANCHOR id="itdb-artwork-set-thumbnail-from-data" href="libgpod/libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data">
+<ANCHOR id="itdb-artwork-set-thumbnail-from-pixbuf" href="libgpod/libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf">
 <ANCHOR id="itdb-artwork-remove-thumbnails" href="libgpod/libgpod-Artwork.html#itdb-artwork-remove-thumbnails">
-<ANCHOR id="itdb-artwork-get-thumb-by-type" href="libgpod/libgpod-Artwork.html#itdb-artwork-get-thumb-by-type">
-<ANCHOR id="itdb-thumb-get-gdk-pixbuf" href="libgpod/libgpod-Artwork.html#itdb-thumb-get-gdk-pixbuf">
+<ANCHOR id="Itdb-Thumb" href="libgpod/libgpod-Artwork.html#Itdb-Thumb">
 <ANCHOR id="itdb-thumb-duplicate" href="libgpod/libgpod-Artwork.html#itdb-thumb-duplicate">
 <ANCHOR id="itdb-thumb-free" href="libgpod/libgpod-Artwork.html#itdb-thumb-free">
-<ANCHOR id="itdb-thumb-new" href="libgpod/libgpod-Artwork.html#itdb-thumb-new">
-<ANCHOR id="itdb-thumb-get-filename" href="libgpod/libgpod-Artwork.html#itdb-thumb-get-filename">
+<ANCHOR id="itdb-thumb-to-pixbuf-at-size" href="libgpod/libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size">
+<ANCHOR id="itdb-thumb-to-pixbufs" href="libgpod/libgpod-Artwork.html#itdb-thumb-to-pixbufs">
+<ANCHOR id="libgpod-Chapter-Data" href="libgpod/libgpod-Chapter-Data.html">
+<ANCHOR id="Itdb-Chapter" href="libgpod/libgpod-Chapter-Data.html#Itdb-Chapter">
+<ANCHOR id="Itdb-Chapterdata" href="libgpod/libgpod-Chapter-Data.html#Itdb-Chapterdata">
+<ANCHOR id="itdb-chapter-new" href="libgpod/libgpod-Chapter-Data.html#itdb-chapter-new">
+<ANCHOR id="itdb-chapter-duplicate" href="libgpod/libgpod-Chapter-Data.html#itdb-chapter-duplicate">
+<ANCHOR id="itdb-chapter-free" href="libgpod/libgpod-Chapter-Data.html#itdb-chapter-free">
+<ANCHOR id="itdb-chapterdata-new" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-new">
+<ANCHOR id="itdb-chapterdata-add-chapter" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter">
+<ANCHOR id="itdb-chapterdata-duplicate" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-duplicate">
+<ANCHOR id="itdb-chapterdata-remove-chapter" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter">
+<ANCHOR id="itdb-chapterdata-remove-chapters" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters">
+<ANCHOR id="itdb-chapterdata-free" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-free">
 <ANCHOR id="libgpod-Device" href="libgpod/libgpod-Device.html">
 <ANCHOR id="Itdb-Device" href="libgpod/libgpod-Device.html#Itdb-Device">
 <ANCHOR id="itdb-device-new" href="libgpod/libgpod-Device.html#itdb-device-new">
@@ -141,29 +279,89 @@
 <ANCHOR id="itdb-device-get-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-get-sysinfo">
 <ANCHOR id="itdb-device-set-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-set-sysinfo">
 <ANCHOR id="itdb-device-write-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-write-sysinfo">
+<ANCHOR id="Itdb-IpodInfo" href="libgpod/libgpod-Device.html#Itdb-IpodInfo">
 <ANCHOR id="itdb-device-get-ipod-info" href="libgpod/libgpod-Device.html#itdb-device-get-ipod-info">
 <ANCHOR id="itdb-device-supports-artwork" href="libgpod/libgpod-Device.html#itdb-device-supports-artwork">
 <ANCHOR id="itdb-device-supports-photo" href="libgpod/libgpod-Device.html#itdb-device-supports-photo">
+<ANCHOR id="itdb-device-supports-video" href="libgpod/libgpod-Device.html#itdb-device-supports-video">
 <ANCHOR id="itdb-info-get-ipod-info-table" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-info-table">
+<ANCHOR id="Itdb-IpodGeneration" href="libgpod/libgpod-Device.html#Itdb-IpodGeneration">
+<ANCHOR id="ITDB-IPOD-GENERATION-UNKNOWN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-FIRST:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-FIRST:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SECOND:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SECOND:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-THIRD:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-THIRD:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-FOURTH:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-FOURTH:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-PHOTO:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-PHOTO:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-MOBILE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-MOBILE:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-MINI-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-MINI-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-MINI-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-MINI-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-3:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-3:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-4:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-4:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-VIDEO-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-VIDEO-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-VIDEO-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-VIDEO-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-CLASSIC-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-CLASSIC-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-CLASSIC-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-CLASSIC-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-TOUCH-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-TOUCH-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-IPHONE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-IPHONE-1:CAPS">
 <ANCHOR id="itdb-info-get-ipod-generation-string" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-generation-string">
+<ANCHOR id="Itdb-IpodModel" href="libgpod/libgpod-Device.html#Itdb-IpodModel">
+<ANCHOR id="ITDB-IPOD-MODEL-INVALID:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-INVALID:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-UNKNOWN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-COLOR:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-COLOR:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-COLOR-U2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-COLOR-U2:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-REGULAR:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-REGULAR:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-REGULAR-U2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-REGULAR-U2:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-BLUE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-BLUE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-PINK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-PINK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-GREEN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-GREEN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-GOLD:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-GOLD:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-WHITE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-WHITE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-BLACK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MOBILE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MOBILE-1:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-VIDEO-U2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-VIDEO-U2:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-SILVER:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-SILVER:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-BLUE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-BLUE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-GREEN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-GREEN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-PINK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-PINK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-RED:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-RED:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-YELLOW:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-YELLOW:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-PURPLE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-PURPLE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-ORANGE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-ORANGE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-IPHONE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-IPHONE-1:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS">
 <ANCHOR id="itdb-info-get-ipod-model-name-string" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-model-name-string">
 <ANCHOR id="itdb-init-ipod" href="libgpod/libgpod-Device.html#itdb-init-ipod">
-<ANCHOR id="Itdb-IpodGeneration" href="libgpod/libgpod-Device.html#Itdb-IpodGeneration">
-<ANCHOR id="Itdb-IpodInfo" href="libgpod/libgpod-Device.html#Itdb-IpodInfo">
-<ANCHOR id="Itdb-IpodModel" href="libgpod/libgpod-Device.html#Itdb-IpodModel">
 <ANCHOR id="Itdb-ArtworkFormat" href="libgpod/libgpod-Device.html#Itdb-ArtworkFormat">
 <ANCHOR id="libgpod-Photo-database" href="libgpod/libgpod-Photo-database.html">
-<ANCHOR id="Itdb-PhotoAlbum" href="libgpod/libgpod-Photo-database.html#Itdb-PhotoAlbum">
 <ANCHOR id="Itdb-PhotoDB" href="libgpod/libgpod-Photo-database.html#Itdb-PhotoDB">
+<ANCHOR id="itdb-photodb-create" href="libgpod/libgpod-Photo-database.html#itdb-photodb-create">
+<ANCHOR id="itdb-photodb-free" href="libgpod/libgpod-Photo-database.html#itdb-photodb-free">
+<ANCHOR id="itdb-photodb-parse" href="libgpod/libgpod-Photo-database.html#itdb-photodb-parse">
+<ANCHOR id="itdb-photodb-write" href="libgpod/libgpod-Photo-database.html#itdb-photodb-write">
 <ANCHOR id="itdb-photodb-add-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-add-photo">
 <ANCHOR id="itdb-photodb-add-photo-from-data" href="libgpod/libgpod-Photo-database.html#itdb-photodb-add-photo-from-data">
 <ANCHOR id="itdb-photodb-add-photo-from-pixbuf" href="libgpod/libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf">
-<ANCHOR id="itdb-photodb-create" href="libgpod/libgpod-Photo-database.html#itdb-photodb-create">
-<ANCHOR id="itdb-photodb-free" href="libgpod/libgpod-Photo-database.html#itdb-photodb-free">
-<ANCHOR id="itdb-photodb-parse" href="libgpod/libgpod-Photo-database.html#itdb-photodb-parse">
+<ANCHOR id="itdb-photodb-remove-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-remove-photo">
+<ANCHOR id="Itdb-PhotoAlbum" href="libgpod/libgpod-Photo-database.html#Itdb-PhotoAlbum">
+<ANCHOR id="itdb-photodb-photoalbum-create" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-create">
 <ANCHOR id="itdb-photodb-photoalbum-add-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo">
 <ANCHOR id="itdb-photodb-photoalbum-by-name" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name">
-<ANCHOR id="itdb-photodb-photoalbum-create" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-create">
 <ANCHOR id="itdb-photodb-photoalbum-remove" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-remove">
-<ANCHOR id="itdb-photodb-remove-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-remove-photo">
-<ANCHOR id="itdb-photodb-write" href="libgpod/libgpod-Photo-database.html#itdb-photodb-write">

Modified: libgpod/trunk/docs/reference/html/itunesdb.html
===================================================================
--- libgpod/trunk/docs/reference/html/itunesdb.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/itunesdb.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Part&#160;I.&#160;iPod database</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="index.html" title="libgpod Reference Manual">
 <link rel="prev" href="index.html" title="libgpod Reference Manual">
 <link rel="next" href="libgpod-The-Itdb-iTunesDB-structure.html" title="iPod database reading/writing">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -31,7 +31,46 @@
       The iPod database functions are used for adding audio and video
       to the iPod.
       </p>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-The-Itdb-iTunesDB-structure.html">iPod database reading/writing</a></span><span class="refpurpose"> &#8212; Functions to read, write, and create an iPod database</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-File-handling-functions.html">File handling functions</a></span><span class="refpurpose"> &#8212; Managing files on the iPod</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Time-handling.html">Time handling</a></span><span class="refpurpose"> &#8212; [DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Low-level-functions.html">Low-level functions</a></span><span class="refpurpose"> &#8212; Low-level functions which shouldn't be needed in normal situations</span>
+</dt>
+<dt><span class="chapter"><a href="ch01.html">iPod database components</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Tracks.html">Tracks</a></span><span class="refpurpose"> &#8212; Data structure to store metadata about an iPod track</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Playlists.html">Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Smart-Playlists.html">Smart Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod smart playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (album covers)</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Chapter-Data.html">Chapter Data</a></span><span class="refpurpose"> &#8212; Data structure to store chapter data for tracks</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
+</dt>
+</dl></dd>
+</dl>
 </div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Artwork.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Artwork.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Artwork.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Artwork</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="ch01.html" title="iPod database components">
 <link rel="prev" href="libgpod-Smart-Playlists.html" title="Smart Playlists">
-<link rel="next" href="libgpod-Device.html" title="Device">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<link rel="next" href="libgpod-Chapter-Data.html" title="Chapter Data">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -21,18 +21,18 @@
 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 <th width="100%" align="center">libgpod Reference Manual</th>
-<td><a accesskey="n" href="libgpod-Device.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="libgpod-Chapter-Data.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2573451" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2795129" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2607850" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2809475" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Artwork"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2573451"></a><span class="refentrytitle">Artwork</span>
+<a name="id2795129"></a><span class="refentrytitle">Artwork</span>
 </h2>
 <p>Artwork &#8212; Data structure to store iPod artwork (album covers)</p>
 </td>
@@ -44,71 +44,104 @@
 
 
 
-                    <a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>;
-                    <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>;
-enum                <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a>;
-<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a href="libgpod-Artwork.html#itdb-artwork-new">itdb_artwork_new</a>                    (void);
-<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a href="libgpod-Artwork.html#itdb-artwork-duplicate">itdb_artwork_duplicate</a>              (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
-void                <a href="libgpod-Artwork.html#itdb-artwork-free">itdb_artwork_free</a>                   (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
-gboolean            <a href="libgpod-Artwork.html#itdb-artwork-add-thumbnail">itdb_artwork_add_thumbnail</a>          (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type,
-                                                         const gchar *filename,
-                                                         gint rotation,
-                                                         GError **error);
-gboolean            <a href="libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-data">itdb_artwork_add_thumbnail_from_data</a>
-                                                        (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type,
-                                                         const guchar *image_data,
-                                                         gsize image_data_len,
-                                                         gint rotation,
-                                                         GError **error);
-gboolean            <a href="libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-pixbuf">itdb_artwork_add_thumbnail_from_pixbuf</a>
-                                                        (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type,
-                                                         gpointer pixbuf,
-                                                         gint rotation,
-                                                         GError **error);
-void                <a href="libgpod-Artwork.html#itdb-artwork-remove-thumbnail">itdb_artwork_remove_thumbnail</a>       (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
-void                <a href="libgpod-Artwork.html#itdb-artwork-remove-thumbnails">itdb_artwork_remove_thumbnails</a>      (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
-<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         <a href="libgpod-Artwork.html#itdb-artwork-get-thumb-by-type">itdb_artwork_get_thumb_by_type</a>      (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type);
-gpointer            <a href="libgpod-Artwork.html#itdb-thumb-get-gdk-pixbuf">itdb_thumb_get_gdk_pixbuf</a>           (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
-<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         <a href="libgpod-Artwork.html#itdb-thumb-duplicate">itdb_thumb_duplicate</a>                (<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
-void                <a href="libgpod-Artwork.html#itdb-thumb-free">itdb_thumb_free</a>                     (<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
-<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         <a href="libgpod-Artwork.html#itdb-thumb-new">itdb_thumb_new</a>                      (void);
-gchar*              <a href="libgpod-Artwork.html#itdb-thumb-get-filename">itdb_thumb_get_filename</a>             (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
+                    <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>;
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Artwork.html#itdb-artwork-new">itdb_artwork_new</a>                    (void);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Artwork.html#itdb-artwork-duplicate">itdb_artwork_duplicate</a>              (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
+void                <a class="link" href="libgpod-Artwork.html#itdb-artwork-free">itdb_artwork_free</a>                   (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-get-pixbuf">itdb_artwork_get_pixbuf</a>             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-set-thumbnail">itdb_artwork_set_thumbnail</a>          (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data">itdb_artwork_set_thumbnail_from_data</a>
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf">itdb_artwork_set_thumbnail_from_pixbuf</a>
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-Artwork.html#itdb-artwork-remove-thumbnails">itdb_artwork_remove_thumbnails</a>      (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
+                    <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>;
+<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         <a class="link" href="libgpod-Artwork.html#itdb-thumb-duplicate">itdb_thumb_duplicate</a>                (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
+void                <a class="link" href="libgpod-Artwork.html#itdb-thumb-free">itdb_thumb_free</a>                     (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            <a class="link" href="libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size">itdb_thumb_to_pixbuf_at_size</a>        (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>*              <a class="link" href="libgpod-Artwork.html#itdb-thumb-to-pixbufs">itdb_thumb_to_pixbufs</a>               (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2607850"></a><h2>Description</h2>
+<a name="id2809475"></a><h2>Description</h2>
 <p>
 These functions and structures are for adding, changing, and removing
 album/track artwork.  For working with photos, see the
-<a href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a> section.
+<a class="link" href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a> section.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2607874"></a><h2>Details</h2>
+<a name="id2839616"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2607885"></a><h3>
+<a name="id2839627"></a><h3>
 <a name="Itdb-Artwork"></a>Itdb_Artwork</h3>
-<a class="indexterm" name="id2607897"></a><pre class="programlisting">typedef struct {
-    GList *thumbnails;     /* list of Itdb_Thumbs */
-    guint32 id;            /* Artwork id used by photoalbums, starts at
-			    * 0x40... libgpod will set this on sync. */
+<a class="indexterm" name="id2839642"></a><pre class="programlisting">typedef struct {
+    Itdb_Thumb *thumbnail;
+    guint32 id;
+    guint64 dbid;
     gint32  unk028;
-    guint32 rating;        /* Rating from iPhoto * 20 (PhotoDB only) */
+    guint32 rating;
     gint32  unk036;
-    time_t  creation_date;  /* Date the image file was created
-			      (creation date of image file (PhotoDB only) */
-    time_t  digitized_date;/* Date the image was taken (EXIF information,
-			      PhotoDB only) */
-    guint32 artwork_size;  /* Size in bytes of the original source
-			      image (PhotoDB only -- don't touch in
-			      case of ArtworkDB!) */
+    time_t  creation_date;
+    time_t  digitized_date;
+    guint32 artwork_size;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -123,85 +156,160 @@
 } Itdb_Artwork;
 </pre>
 <p>
-
-</p>
-</div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2592895"></a><h3>
-<a name="Itdb-Thumb"></a>Itdb_Thumb</h3>
-<a class="indexterm" name="id2567564"></a><pre class="programlisting">typedef struct {
-    ItdbThumbType type;
-    gchar   *filename;
-    guchar  *image_data;      /* holds the thumbnail data of
-				 non-transfered thumbnails when
-				 filename == NULL */
-    gsize   image_data_len;   /* length of data */
-    gpointer pixbuf;
-    gint    rotation;         /* angle (0, 90, 180, 270) to rotate the image */
-    guint32 offset;
-    guint32 size;
-    gint16  width;
-    gint16  height;
-    gint16  horizontal_padding;
-    gint16  vertical_padding;
-    /* reserved for future use */
-    gint32 reserved_int1;
-    gint32 reserved_int2;
-    gpointer reserved1;
-    gpointer reserved2;
-} Itdb_Thumb;
-</pre>
+Structure representing artwork in an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> or <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a></p>
 <p>
 
 </p>
-</div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2577225"></a><h3>
-<a name="ItdbThumbType"></a>enum ItdbThumbType</h3>
-<a class="indexterm" name="id2599700"></a><pre class="programlisting">typedef enum { 
-    ITDB_THUMB_COVER_SMALL = 0,
-    ITDB_THUMB_COVER_LARGE,
-    ITDB_THUMB_PHOTO_SMALL,
-    ITDB_THUMB_PHOTO_LARGE,
-    ITDB_THUMB_PHOTO_FULL_SCREEN,
-    ITDB_THUMB_PHOTO_TV_SCREEN,
-    ITDB_THUMB_COVER_XLARGE,      /* iPhone: cover flow */
-    ITDB_THUMB_COVER_MEDIUM,      /* iPhone: cover view */
-    ITDB_THUMB_COVER_SMEDIUM,     /* iPhone: ??         */
-    ITDB_THUMB_COVER_XSMALL,      /* iPhone: ??         */
-} ItdbThumbType;
-</pre>
-<p>
-
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>&#160;*<em class="structfield"><code>thumbnail</code></em>;</span></p></td>
+<td>          An <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                 Artwork id used by photoalbums.  This starts at 0x40 and
+                     is set automatically when the ArtworkDB or PhotoDB is
+                     written
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>dbid</code></em>;</span></p></td>
+<td>               The dbid of associated track.  Used internally by
+                     libgpod.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk028</code></em>;</span></p></td>
+<td>             Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>rating</code></em>;</span></p></td>
+<td>             Rating from iPhoto * 20 (PhotoDB only)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk036</code></em>;</span></p></td>
+<td>             Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>creation_date</code></em>;</span></p></td>
+<td>      Date the image file was created (PhotoDB only)
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>digitized_date</code></em>;</span></p></td>
+<td>     Date the image was taken (EXIF information, PhotoDB
+                     only)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>artwork_size</code></em>;</span></p></td>
+<td>       Size in bytes of the original source image (PhotoDB
+                     only -- don't touch in case of ArtworkDB!)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.3.0
 </p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599724"></a><h3>
+<a name="id2839036"></a><h3>
 <a name="itdb-artwork-new"></a>itdb_artwork_new ()</h3>
-<a class="indexterm" name="id2599736"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_artwork_new                    (void);</pre>
+<a class="indexterm" name="id2839051"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_artwork_new                    (void);</pre>
 <p>
-Creates a new <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a></p>
+Creates a new <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a></p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a new <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> to be freed with <a href="libgpod-Artwork.html#itdb-artwork-free"><code class="function">itdb_artwork_free()</code></a> when
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> to be freed with <a class="link" href="libgpod-Artwork.html#itdb-artwork-free"><code class="function">itdb_artwork_free()</code></a> when
 no longer needed
+
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599799"></a><h3>
+<a name="id2839121"></a><h3>
 <a name="itdb-artwork-duplicate"></a>itdb_artwork_duplicate ()</h3>
-<a class="indexterm" name="id2599810"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_artwork_duplicate              (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<a class="indexterm" name="id2839135"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_artwork_duplicate              (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
 <p>
 Duplicates <em class="parameter"><code>artwork</code></em></p>
 <p>
@@ -211,23 +319,26 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> a new copy of <em class="parameter"><code>artwork</code></em>
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599889"></a><h3>
+<a name="id2839221"></a><h3>
 <a name="itdb-artwork-free"></a>itdb_artwork_free ()</h3>
-<a class="indexterm" name="id2599902"></a><pre class="programlisting">void                itdb_artwork_free                   (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<a class="indexterm" name="id2839235"></a><pre class="programlisting">void                itdb_artwork_free                   (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
 <p>
 Frees memory used by <em class="parameter"><code>artwork</code></em></p>
 <p>
@@ -236,91 +347,103 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610419"></a><h3>
-<a name="itdb-artwork-add-thumbnail"></a>itdb_artwork_add_thumbnail ()</h3>
-<a class="indexterm" name="id2610430"></a><pre class="programlisting">gboolean            itdb_artwork_add_thumbnail          (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type,
-                                                         const gchar *filename,
-                                                         gint rotation,
-                                                         GError **error);</pre>
+<a name="id2839304"></a><h3>
+<a name="itdb-artwork-get-pixbuf"></a>itdb_artwork_get_pixbuf ()</h3>
+<a class="indexterm" name="id2839317"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            itdb_artwork_get_pixbuf             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);</pre>
 <p>
-Appends a thumbnail of type <em class="parameter"><code>type</code></em> to existing thumbnails in <em class="parameter"><code>artwork</code></em>. No 
-data is read from <em class="parameter"><code>filename</code></em> yet, the file will be when <em class="parameter"><code>artwork</code></em> is saved to
-disk. <em class="parameter"><code>filename</code></em> must still exist when that happens.
-</p>
+Returns a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> representing the thumbnail stored in <em class="parameter"><code>artwork</code></em>
+scaling it if appropriate. If either height or width is -1, then the
+biggest unscaled thumbnail available will be returned</p>
 <p>
-For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</p>
-<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <span class="type">Itdb_Thumbnail</span>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
-<td> thumbnail size
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> image file to use to create the thumbnail
+<td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
+<td>      width of the pixbuf to retrieve, -1 for the biggest
+             possible size and 0 for the smallest possible size (with no
+             scaling)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></td>
-<td> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td>
+<td>     height of the pixbuf to retrieve, -1 for the biggest possible
+             size and 0 for the smallest possible size (with no scaling)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
 </td>
 </tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE if the thumbnail could be successfully added, FALSE
-otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
-</td>
-</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610634"></a><h3>
-<a name="itdb-artwork-add-thumbnail-from-data"></a>itdb_artwork_add_thumbnail_from_data ()</h3>
-<a class="indexterm" name="id2610648"></a><pre class="programlisting">gboolean            itdb_artwork_add_thumbnail_from_data
-                                                        (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type,
-                                                         const guchar *image_data,
-                                                         gsize image_data_len,
-                                                         gint rotation,
-                                                         GError **error);</pre>
+<a name="id2839491"></a><h3>
+<a name="itdb-artwork-set-thumbnail"></a>itdb_artwork_set_thumbnail ()</h3>
+<a class="indexterm" name="id2839505"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_artwork_set_thumbnail          (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Appends a thumbnail of type <em class="parameter"><code>type</code></em> to existing thumbnails in
-<em class="parameter"><code>artwork</code></em>. No data is processed yet. This will be done when <em class="parameter"><code>artwork</code></em>
-is saved to disk.
+Appends a thumbnail of type <em class="parameter"><code>type</code></em> to existing thumbnails in <em class="parameter"><code>artwork</code></em>. No
+data is read from <em class="parameter"><code>filename</code></em> yet, the file will be when <em class="parameter"><code>artwork</code></em> is saved to
+disk. <em class="parameter"><code>filename</code></em> must still exist when that happens.
 </p>
 <p>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</p>
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
 <p>
 
 </p>
@@ -328,66 +451,68 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <span class="type">Itdb_Thumbnail</span>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
-<td> thumbnail size
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   image file to use to create the thumbnail
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></td>
-<td> data used to create the thumbnail (the raw contents of
-             an image file)
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></td>
-<td> length of above data block
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></td>
-<td> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
-</td>
-</tr>
-<tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
-</td>
-</tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if the thumbnail could be successfully added, FALSE
 otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2613470"></a><h3>
-<a name="itdb-artwork-add-thumbnail-from-pixbuf"></a>itdb_artwork_add_thumbnail_from_pixbuf ()</h3>
-<a class="indexterm" name="id2613482"></a><pre class="programlisting">gboolean            itdb_artwork_add_thumbnail_from_pixbuf
-                                                        (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type,
-                                                         gpointer pixbuf,
-                                                         gint rotation,
-                                                         GError **error);</pre>
+<a name="id2847934"></a><h3>
+<a name="itdb-artwork-set-thumbnail-from-data"></a>itdb_artwork_set_thumbnail_from_data ()</h3>
+<a class="indexterm" name="id2847947"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_artwork_set_thumbnail_from_data
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Appends a thumbnail of type <em class="parameter"><code>type</code></em> to existing thumbnails in <em class="parameter"><code>artwork</code></em>. No 
-data is generated from <em class="parameter"><code>pixbuf</code></em> yet, it will be done when <em class="parameter"><code>artwork</code></em> is saved 
-to disk. <em class="parameter"><code>pixbuf</code></em> is ref'ed by this function, but is not copied, so it should
-not be modified before the database is saved.
+Set a thumbnail in <em class="parameter"><code>artwork</code></em>. No data is processed yet. This will be done when
+<em class="parameter"><code>artwork</code></em> is saved to disk.
 </p>
 <p>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</p>
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
 <p>
 
 </p>
@@ -395,72 +520,120 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <span class="type">Itdb_Thumbnail</span>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>        an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
-<td> thumbnail size
+<td><p><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></p></td>
+<td>     data used to create the thumbnail (the raw contents of
+                 an image file)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
-<td> <span class="type">GdkPixbuf</span> to use to create the thumbnail
+<td><p><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></p></td>
+<td> length of above data block
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></td>
-<td> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>          return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if the thumbnail could be successfully added, FALSE
 otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2613675"></a><h3>
-<a name="itdb-artwork-remove-thumbnail"></a>itdb_artwork_remove_thumbnail ()</h3>
-<a class="indexterm" name="id2613687"></a><pre class="programlisting">void                itdb_artwork_remove_thumbnail       (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<a name="id2848156"></a><h3>
+<a name="itdb-artwork-set-thumbnail-from-pixbuf"></a>itdb_artwork_set_thumbnail_from_pixbuf ()</h3>
+<a class="indexterm" name="id2848170"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_artwork_set_thumbnail_from_pixbuf
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Removes <em class="parameter"><code>thumb</code></em> from <em class="parameter"><code>artwork</code></em>. The memory used by <em class="parameter"><code>thumb</code></em> is freed.</p>
+Set a thumbnail in <em class="parameter"><code>artwork</code></em>. No data is generated from <em class="parameter"><code>pixbuf</code></em> yet, it will
+be done when <em class="parameter"><code>artwork</code></em> is saved to disk. <em class="parameter"><code>pixbuf</code></em> is ref'ed by this function,
+but is not copied, so it should not be modified before the database is saved.
+</p>
 <p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td>
+<td>     <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> to use to create the thumbnail
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
+
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2613779"></a><h3>
+<a name="id2848382"></a><h3>
 <a name="itdb-artwork-remove-thumbnails"></a>itdb_artwork_remove_thumbnails ()</h3>
-<a class="indexterm" name="id2613791"></a><pre class="programlisting">void                itdb_artwork_remove_thumbnails      (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<a class="indexterm" name="id2848396"></a><pre class="programlisting">void                itdb_artwork_remove_thumbnails      (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
 <p>
 Removes all thumbnails from <em class="parameter"><code>artwork</code></em></p>
 <p>
@@ -469,20 +642,26 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2613847"></a><h3>
-<a name="itdb-artwork-get-thumb-by-type"></a>itdb_artwork_get_thumb_by_type ()</h3>
-<a class="indexterm" name="id2613859"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         itdb_artwork_get_thumb_by_type      (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
-                                                         <a href="libgpod-Artwork.html#ItdbThumbType">ItdbThumbType</a> type);</pre>
+<a name="id2848458"></a><h3>
+<a name="Itdb-Thumb"></a>Itdb_Thumb</h3>
+<a class="indexterm" name="id2848471"></a><pre class="programlisting">typedef struct {
+    ItdbThumbDataType data_type;
+    guint rotation;
+} Itdb_Thumb;
+</pre>
 <p>
-Searches <em class="parameter"><code>artwork</code></em> for an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a> of type <em class="parameter"><code>type</code></em>.</p>
+This is an opaque structure representing a thumbnail to be
+transferred to the ipod or read from the ipod.</p>
 <p>
 
 </p>
@@ -490,66 +669,27 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+<td><p><span class="term">ItdbThumbDataType&#160;<em class="structfield"><code>data_type</code></em>;</span></p></td>
+<td> The type of data (file, memory, pixbuf, ipod, etc.)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
-<td> type of the <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a> to retrieve
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
+>guint</a>&#160;<em class="structfield"><code>rotation</code></em>;</span></p></td>
+<td>  Angle by which the image is rotated counterclockwise
 </td>
 </tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a> of type <em class="parameter"><code>type</code></em>, or NULL if such a thumbnail couldn't
-be found
-</td>
-</tr>
 </tbody>
 </table></div>
-</div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2613974"></a><h3>
-<a name="itdb-thumb-get-gdk-pixbuf"></a>itdb_thumb_get_gdk_pixbuf ()</h3>
-<a class="indexterm" name="id2613985"></a><pre class="programlisting">gpointer            itdb_thumb_get_gdk_pixbuf           (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
-<p>
-Converts <em class="parameter"><code>thumb</code></em> to a <span class="type">GdkPixbuf</span>.
-Since we want to have gdk-pixbuf dependency optional, a generic
-gpointer is returned which you have to cast to a <span class="type">GdkPixbuf</span> using 
-<code class="function">GDK_PIXBUF()</code> yourself.</p>
-<p>
-
+<p class="since">Since  0.3.0
 </p>
-<div class="variablelist"><table border="0">
-<col align="left" valign="top">
-<tbody>
-<tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
-</td>
-</tr>
-<tr>
-<td><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
-</td>
-</tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a <span class="type">GdkPixbuf</span> that must be unreffed with <code class="function">gdk_pixbuf_unref()</code>
-after use, or NULL if the creation of the gdk-pixbuf failed or if 
-libgpod was compiled without gdk-pixbuf support.
-</td>
-</tr>
-</tbody>
-</table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2614116"></a><h3>
+<a name="id2848539"></a><h3>
 <a name="itdb-thumb-duplicate"></a>itdb_thumb_duplicate ()</h3>
-<a class="indexterm" name="id2614126"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         itdb_thumb_duplicate                (<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<a class="indexterm" name="id2848552"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         itdb_thumb_duplicate                (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
 <p>
 Duplicates the data contained in <em class="parameter"><code>thumb</code></em></p>
 <p>
@@ -559,24 +699,27 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly allocated copy of <em class="parameter"><code>thumb</code></em> to be freed with 
-<a href="libgpod-Artwork.html#itdb-thumb-free"><code class="function">itdb_thumb_free()</code></a> after use
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated copy of <em class="parameter"><code>thumb</code></em> to be freed with
+<a class="link" href="libgpod-Artwork.html#itdb-thumb-free"><code class="function">itdb_thumb_free()</code></a> after use
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2614204"></a><h3>
+<a name="id2848636"></a><h3>
 <a name="itdb-thumb-free"></a>itdb_thumb_free ()</h3>
-<a class="indexterm" name="id2614214"></a><pre class="programlisting">void                itdb_thumb_free                     (<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<a class="indexterm" name="id2848648"></a><pre class="programlisting">void                itdb_thumb_free                     (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
 <p>
 Frees the memory used by <em class="parameter"><code>thumb</code></em></p>
 <p>
@@ -585,42 +728,113 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2614269"></a><h3>
-<a name="itdb-thumb-new"></a>itdb_thumb_new ()</h3>
-<a class="indexterm" name="id2614279"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         itdb_thumb_new                      (void);</pre>
+<a name="id2848709"></a><h3>
+<a name="itdb-thumb-to-pixbuf-at-size"></a>itdb_thumb_to_pixbuf_at_size ()</h3>
+<a class="indexterm" name="id2848723"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            itdb_thumb_to_pixbuf_at_size        (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);</pre>
 <p>
-Creates a new <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a></p>
+Converts <em class="parameter"><code>thumb</code></em> to a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a>.
+</p>
 <p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+Since we want to have gdk-pixbuf dependency optional, a generic
+gpointer is returned which you have to cast to a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> using
+<code class="function">GDK_PIXBUF()</code> yourself.
+</div>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
-<tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> newly allocated <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a> to be freed with <a href="libgpod-Artwork.html#itdb-thumb-free"><code class="function">itdb_thumb_free()</code></a>
-after use
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
-</tr></tbody>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
+<td>  width of the pixbuf to retrieve, -1 for the biggest
+         possible size and 0 for the smallest possible size (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td>
+<td> height of the pixbuf to retrieve, -1 for the biggest possible size
+         and 0 for the smallest possible size (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> that must be unreffed with <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html#gdk-pixbuf-unref"
+><code class="function">gdk_pixbuf_unref()</code></a>
+after use, or NULL if the creation of the gdk-pixbuf failed or if
+libgpod was compiled without gdk-pixbuf support.
+
+</td>
+</tr>
+</tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2614335"></a><h3>
-<a name="itdb-thumb-get-filename"></a>itdb_thumb_get_filename ()</h3>
-<a class="indexterm" name="id2614345"></a><pre class="programlisting">gchar*              itdb_thumb_get_filename             (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         <a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<a name="id2848909"></a><h3>
+<a name="itdb-thumb-to-pixbufs"></a>itdb_thumb_to_pixbufs ()</h3>
+<a class="indexterm" name="id2848921"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>*              itdb_thumb_to_pixbufs               (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
 <p>
-Get filename of thumbnail. If it's a thumbnail on the iPod, return
-the full path to the ithmb file. Otherwise return the full path to
-the original file.</p>
+Converts <em class="parameter"><code>thumb</code></em> to a <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> of <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a>. The returned <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> will
+generally contain only 1 element, the full-size pixbuf associated with
+<em class="parameter"><code>thumb</code></em>, but when the artwork has been read from the ipod and hasn't been
+modified from the library, then the returned <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> will contain several
+<a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> corresponding to the various thumbnail sizes that were
+written to the iPod database.</p>
 <p>
 
 </p>
@@ -628,31 +842,53 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> newly allocated string containing the absolute path to the 
-thumbnail file. 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> of <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> which are associated with <em class="parameter"><code>thumb</code></em>, NULL
+if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+support. The <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> must be unreffed with <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html#gdk-pixbuf-unref"
+><code class="function">gdk_pixbuf_unref()</code></a> after use
+and the <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> must be freed with <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#g-list-free"
+><code class="function">g_list_free()</code></a>.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614435"></a><h2>See Also</h2>
+<a name="id2849109"></a><h2>See Also</h2>
 <p>
-<a href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a>
+<a class="link" href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a>
 </p>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2849124"></a><div class="refsect2" lang="en"><a name="id2849125"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2849126"></a></div>
 </div>
+</div>
 </body>
 </html>

Copied: libgpod/trunk/docs/reference/html/libgpod-Chapter-Data.html (from rev 340, libgpod/branches/upstream/current/docs/reference/html/libgpod-Chapter-Data.html)
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Chapter-Data.html	                        (rev 0)
+++ libgpod/trunk/docs/reference/html/libgpod-Chapter-Data.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -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=US-ASCII">
+<title>Chapter Data</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="libgpod-Artwork.html" title="Artwork">
+<link rel="next" href="libgpod-Device.html" title="Device">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</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="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Artwork.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Device.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2802489" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2788846" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Chapter-Data"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2802489"></a><span class="refentrytitle">Chapter Data</span>
+</h2>
+<p>Chapter Data &#8212; Data structure to store chapter data for tracks</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>;
+                    <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>;
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-new">itdb_chapter_new</a>                    (void);
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-duplicate">itdb_chapter_duplicate</a>              (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-free">itdb_chapter_free</a>                   (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-new">itdb_chapterdata_new</a>                (void);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter">itdb_chapterdata_add_chapter</a>        (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> startpos,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *chaptertitle);
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-duplicate">itdb_chapterdata_duplicate</a>          (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter">itdb_chapterdata_remove_chapter</a>     (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters">itdb_chapterdata_remove_chapters</a>    (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-free">itdb_chapterdata_free</a>               (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2788846"></a><h2>Description</h2>
+<p>
+Chapters allow for a large file to be divided into sections.  The start and stop
+points in the track are defined here, as well as the title for each chapter.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2788864"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2788875"></a><h3>
+<a name="Itdb-Chapter"></a>Itdb_Chapter</h3>
+<a class="indexterm" name="id2788889"></a><pre class="programlisting">typedef struct {
+    guint32 startpos;
+    gchar *chaptertitle;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapter;
+</pre>
+<p>
+Structure representing an iTunesDB Chapter</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>startpos</code></em>;</span></p></td>
+<td>      The start position of the chapter in ms. The first chapter
+                begins at 1.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>chaptertitle</code></em>;</span></p></td>
+<td>  The chapter title in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2838689"></a><h3>
+<a name="Itdb-Chapterdata"></a>Itdb_Chapterdata</h3>
+<a class="indexterm" name="id2838703"></a><pre class="programlisting">typedef struct {
+    GList *chapters;
+    guint32 unk024;
+    guint32 unk028;
+    guint32 unk032;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapterdata;
+</pre>
+<p>
+Structure representing iTunesDB Chapter data</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>chapters</code></em>;</span></p></td>
+<td>      A list of chapters (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk024</code></em>;</span></p></td>
+<td>        Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk028</code></em>;</span></p></td>
+<td>        Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk032</code></em>;</span></p></td>
+<td>        Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2838190"></a><h3>
+<a name="itdb-chapter-new"></a>itdb_chapter_new ()</h3>
+<a class="indexterm" name="id2838205"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       itdb_chapter_new                    (void);</pre>
+<p>
+Creates a new <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> newly allocated <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a> to be freed with <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-free"><code class="function">itdb_chapter_free()</code></a>
+after use
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2838276"></a><h3>
+<a name="itdb-chapter-duplicate"></a>itdb_chapter_duplicate ()</h3>
+<a class="indexterm" name="id2838289"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       itdb_chapter_duplicate              (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);</pre>
+<p>
+Duplicates the data contained in <em class="parameter"><code>chapter</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapter</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated copy of <em class="parameter"><code>chapter</code></em> to be freed with
+<a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-free"><code class="function">itdb_chapter_free()</code></a> after use
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2838385"></a><h3>
+<a name="itdb-chapter-free"></a>itdb_chapter_free ()</h3>
+<a class="indexterm" name="id2838400"></a><pre class="programlisting">void                itdb_chapter_free                   (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);</pre>
+<p>
+Frees the memory used by <em class="parameter"><code>chapter</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>chapter</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2843562"></a><h3>
+<a name="itdb-chapterdata-new"></a>itdb_chapterdata_new ()</h3>
+<a class="indexterm" name="id2843575"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   itdb_chapterdata_new                (void);</pre>
+<p>
+Creates a new <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a> to be freed with
+              <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-free"><code class="function">itdb_chapterdata_free()</code></a> when no longer needed
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2843645"></a><h3>
+<a name="itdb-chapterdata-add-chapter"></a>itdb_chapterdata_add_chapter ()</h3>
+<a class="indexterm" name="id2843660"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_chapterdata_add_chapter        (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> startpos,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *chaptertitle);</pre>
+<p>
+Appends a chapter to existing chapters in <em class="parameter"><code>chapterdata</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>startpos</code></em>&#160;:</span></p></td>
+<td>     chapter start time in milliseconds
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chaptertitle</code></em>&#160;:</span></p></td>
+<td> chapter title
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the chapter could be successfully added, FALSE
+otherwise.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2843785"></a><h3>
+<a name="itdb-chapterdata-duplicate"></a>itdb_chapterdata_duplicate ()</h3>
+<a class="indexterm" name="id2843799"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   itdb_chapterdata_duplicate          (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);</pre>
+<p>
+Duplicates <em class="parameter"><code>chapterdata</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new copy of <em class="parameter"><code>chapterdata</code></em>
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2843884"></a><h3>
+<a name="itdb-chapterdata-remove-chapter"></a>itdb_chapterdata_remove_chapter ()</h3>
+<a class="indexterm" name="id2843900"></a><pre class="programlisting">void                itdb_chapterdata_remove_chapter     (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);</pre>
+<p>
+Removes <em class="parameter"><code>chapter</code></em> from <em class="parameter"><code>chapterdata</code></em>. The memory used by <em class="parameter"><code>chapter</code></em> is freed.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapter</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2844011"></a><h3>
+<a name="itdb-chapterdata-remove-chapters"></a>itdb_chapterdata_remove_chapters ()</h3>
+<a class="indexterm" name="id2844027"></a><pre class="programlisting">void                itdb_chapterdata_remove_chapters    (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);</pre>
+<p>
+Removes all chapters from <em class="parameter"><code>chapterdata</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2844096"></a><h3>
+<a name="itdb-chapterdata-free"></a>itdb_chapterdata_free ()</h3>
+<a class="indexterm" name="id2844110"></a><pre class="programlisting">void                itdb_chapterdata_free               (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);</pre>
+<p>
+Frees memory used by <em class="parameter"><code>chapterdata</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2844180"></a><div class="refsect2" lang="en"><a name="id2844181"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2844182"></a></div>
+</div>
+</div>
+</body>
+</html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Device.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Device.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Device.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Device</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="ch01.html" title="iPod database components">
-<link rel="prev" href="libgpod-Artwork.html" title="Artwork">
+<link rel="prev" href="libgpod-Chapter-Data.html" title="Chapter Data">
 <link rel="next" href="photodb.html" title="Part&#160;II.&#160;Photo database">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -17,22 +17,22 @@
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 <tr valign="middle">
-<td><a accesskey="p" href="libgpod-Artwork.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="libgpod-Chapter-Data.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="photodb.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2562194" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2803674" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2576086" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2844188" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Device"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2562194"></a><span class="refentrytitle">Device</span>
+<a name="id2803674"></a><span class="refentrytitle">Device</span>
 </h2>
 <p>Device &#8212; Data structure holding information about the iPod (model, mount point, etc.)</p>
 </td>
@@ -44,93 +44,187 @@
 
 
 
-                    <a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>;
-<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>*        <a href="libgpod-Device.html#itdb-device-new">itdb_device_new</a>                     (void);
-void                <a href="libgpod-Device.html#itdb-device-free">itdb_device_free</a>                    (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
-void                <a href="libgpod-Device.html#itdb-device-set-mountpoint">itdb_device_set_mountpoint</a>          (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         const gchar *mp);
-gboolean            <a href="libgpod-Device.html#itdb-device-read-sysinfo">itdb_device_read_sysinfo</a>            (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
-gchar*              <a href="libgpod-Device.html#itdb-device-get-sysinfo">itdb_device_get_sysinfo</a>             (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         const gchar *field);
-void                <a href="libgpod-Device.html#itdb-device-set-sysinfo">itdb_device_set_sysinfo</a>             (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         const gchar *field,
-                                                         const gchar *value);
-gboolean            <a href="libgpod-Device.html#itdb-device-write-sysinfo">itdb_device_write_sysinfo</a>           (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         GError **error);
-const <a href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* <a href="libgpod-Device.html#itdb-device-get-ipod-info">itdb_device_get_ipod_info</a>          (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
-gboolean            <a href="libgpod-Device.html#itdb-device-supports-artwork">itdb_device_supports_artwork</a>        (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
-gboolean            <a href="libgpod-Device.html#itdb-device-supports-photo">itdb_device_supports_photo</a>          (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
-const <a href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* <a href="libgpod-Device.html#itdb-info-get-ipod-info-table">itdb_info_get_ipod_info_table</a>      (void);
-const gchar*        <a href="libgpod-Device.html#itdb-info-get-ipod-generation-string">itdb_info_get_ipod_generation_string</a>
-                                                        (<a href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a> generation);
-const gchar*        <a href="libgpod-Device.html#itdb-info-get-ipod-model-name-string">itdb_info_get_ipod_model_name_string</a>
-                                                        (<a href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a> model);
-gboolean            <a href="libgpod-Device.html#itdb-init-ipod">itdb_init_ipod</a>                      (const gchar *mountpoint,
-                                                         const gchar *model_number,
-                                                         const gchar *ipod_name,
-                                                         GError **error);
-enum                <a href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a>;
-                    <a href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>;
-enum                <a href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a>;
-                    <a href="libgpod-Device.html#Itdb-ArtworkFormat">Itdb_ArtworkFormat</a>;
+                    <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>;
+<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>*        <a class="link" href="libgpod-Device.html#itdb-device-new">itdb_device_new</a>                     (void);
+void                <a class="link" href="libgpod-Device.html#itdb-device-free">itdb_device_free</a>                    (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+void                <a class="link" href="libgpod-Device.html#itdb-device-set-mountpoint">itdb_device_set_mountpoint</a>          (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-read-sysinfo">itdb_device_read_sysinfo</a>            (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Device.html#itdb-device-get-sysinfo">itdb_device_get_sysinfo</a>             (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field);
+void                <a class="link" href="libgpod-Device.html#itdb-device-set-sysinfo">itdb_device_set_sysinfo</a>             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *value);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-write-sysinfo">itdb_device_write_sysinfo</a>           (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+                    <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>;
+const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* <a class="link" href="libgpod-Device.html#itdb-device-get-ipod-info">itdb_device_get_ipod_info</a>          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-artwork">itdb_device_supports_artwork</a>        (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-photo">itdb_device_supports_photo</a>          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-video">itdb_device_supports_video</a>          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* <a class="link" href="libgpod-Device.html#itdb-info-get-ipod-info-table">itdb_info_get_ipod_info_table</a>      (void);
+enum                <a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a>;
+const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        <a class="link" href="libgpod-Device.html#itdb-info-get-ipod-generation-string">itdb_info_get_ipod_generation_string</a>
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a> generation);
+enum                <a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a>;
+const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        <a class="link" href="libgpod-Device.html#itdb-info-get-ipod-model-name-string">itdb_info_get_ipod_model_name_string</a>
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a> model);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-init-ipod">itdb_init_ipod</a>                      (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *model_number,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_name,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+                    <a class="link" href="libgpod-Device.html#Itdb-ArtworkFormat">Itdb_ArtworkFormat</a>;
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2576086"></a><h2>Description</h2>
+<a name="id2844188"></a><h2>Description</h2>
 <p>
 These functions are for reading and setting information about the iPod.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2576102"></a><h2>Details</h2>
+<a name="id2844204"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2576113"></a><h3>
+<a name="id2844215"></a><h3>
 <a name="Itdb-Device"></a>Itdb_Device</h3>
-<a class="indexterm" name="id2576125"></a><pre class="programlisting">typedef struct {
-    gchar *mountpoint;    /* mountpoint of the iPod */
-    gint   musicdirs;     /* number of /iPod_Control/Music/F.. dirs */
-    guint  byte_order;    /* G_LITTLE_ENDIAN "regular" endianness 
-			   * G_BIG_ENDIAN "reversed" endianness (e.g. mobile
-			   * phone iTunesDBs)
-			   */
-    GHashTable *sysinfo;  /* hash with value/key pairs of all entries
-			   * in Device/SysInfo */
-    gboolean sysinfo_changed; /* Has the sysinfo hash been changed by
-				 the user (itdb_set_sysinfo) */
-    gint timezone_shift;  /* difference in seconds between the current
-                           * timezone and UTC
-                           */
+<a class="indexterm" name="id2844230"></a><pre class="programlisting">typedef struct {
+    gchar *mountpoint;
+    gint   musicdirs;
+    guint  byte_order;
+    GHashTable *sysinfo;
+    SysInfoIpodProperties *sysinfo_extended;
+    gboolean sysinfo_changed;
+    gint timezone_shift;
 } Itdb_Device;
 </pre>
 <p>
+Structure representing an iPod device</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>mountpoint</code></em>;</span></p></td>
+<td>         The mountpoint of the iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>musicdirs</code></em>;</span></p></td>
+<td>          The number of /iPod_Control/Music/F.. dirs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
+>guint</a>&#160;<em class="structfield"><code>byte_order</code></em>;</span></p></td>
+<td>         G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN
+                     "reversed" endianness (e.g. mobile phone iTunesDBs)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
+>GHashTable</a>&#160;*<em class="structfield"><code>sysinfo</code></em>;</span></p></td>
+<td>            A hash with key/value pairs of all entries in
+                     Device/SysInfo
+</td>
+</tr>
+<tr>
+<td><p><span class="term">SysInfoIpodProperties&#160;*<em class="structfield"><code>sysinfo_extended</code></em>;</span></p></td>
+<td>   The parsed content of SysInfoExtended, which can be NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>sysinfo_changed</code></em>;</span></p></td>
+<td>    True if the sysinfo hash been changed by the user, false
+                     otherwise.  (see <code class="function">itdb_set_sysinfo()</code>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>timezone_shift</code></em>;</span></p></td>
+<td>     The difference in seconds between the current timezone
+                     and UTC
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2577660"></a><h3>
+<a name="id2844426"></a><h3>
 <a name="itdb-device-new"></a>itdb_device_new ()</h3>
-<a class="indexterm" name="id2577781"></a><pre class="programlisting"><a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>*        itdb_device_new                     (void);</pre>
+<a class="indexterm" name="id2844441"></a><pre class="programlisting"><a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>*        itdb_device_new                     (void);</pre>
 <p>
-Creates a new <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> structure</p>
+Creates a new <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> structure</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly allocated <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> which must be freed with
-<a href="libgpod-Device.html#itdb-device-free"><code class="function">itdb_device_free()</code></a> when no longer needed
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> which must be freed with
+<a class="link" href="libgpod-Device.html#itdb-device-free"><code class="function">itdb_device_free()</code></a> when no longer needed
+
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2612646"></a><h3>
+<a name="id2844511"></a><h3>
 <a name="itdb-device-free"></a>itdb_device_free ()</h3>
-<a class="indexterm" name="id2612658"></a><pre class="programlisting">void                itdb_device_free                    (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<a class="indexterm" name="id2844526"></a><pre class="programlisting">void                itdb_device_free                    (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
 <p>
 Frees memory used by <em class="parameter"><code>device</code></em></p>
 <p>
@@ -139,18 +233,22 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2612719"></a><h3>
+<a name="id2844594"></a><h3>
 <a name="itdb-device-set-mountpoint"></a>itdb_device_set_mountpoint ()</h3>
-<a class="indexterm" name="id2612730"></a><pre class="programlisting">void                itdb_device_set_mountpoint          (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         const gchar *mp);</pre>
+<a class="indexterm" name="id2844609"></a><pre class="programlisting">void                itdb_device_set_mountpoint          (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);</pre>
 <p>
 Sets the mountpoint of <em class="parameter"><code>device</code></em> to <em class="parameter"><code>mp</code></em> and update the cached device 
 information (in particular, re-read the SysInfo file)</p>
@@ -161,23 +259,27 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
-<td> the new mount point
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     the new mount point
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2612821"></a><h3>
+<a name="id2850726"></a><h3>
 <a name="itdb-device-read-sysinfo"></a>itdb_device_read_sysinfo ()</h3>
-<a class="indexterm" name="id2612832"></a><pre class="programlisting">gboolean            itdb_device_read_sysinfo            (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<a class="indexterm" name="id2850739"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_read_sysinfo            (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
 <p>
 Reads the SysInfo file and stores information in device-&gt;sysinfo for
 later use.</p>
@@ -188,24 +290,31 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if file could be read, FALSE otherwise 
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2576271"></a><h3>
+<a name="id2850815"></a><h3>
 <a name="itdb-device-get-sysinfo"></a>itdb_device_get_sysinfo ()</h3>
-<a class="indexterm" name="id2576282"></a><pre class="programlisting">gchar*              itdb_device_get_sysinfo             (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         const gchar *field);</pre>
+<a class="indexterm" name="id2850829"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_device_get_sysinfo             (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field);</pre>
 <p>
 Retrieve specified field from the SysInfo file.</p>
 <p>
@@ -215,34 +324,43 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></td>
-<td> field to retrive information from
+<td><p><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></p></td>
+<td>  field to retrive information from
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> the information associated with <em class="parameter"><code>field</code></em>, or NULL if <em class="parameter"><code>field</code></em>
-couldn't be found. <code class="function">g_free()</code> after use
+couldn't be found. <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2576392"></a><h3>
+<a name="id2850946"></a><h3>
 <a name="itdb-device-set-sysinfo"></a>itdb_device_set_sysinfo ()</h3>
-<a class="indexterm" name="id2576403"></a><pre class="programlisting">void                itdb_device_set_sysinfo             (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         const gchar *field,
-                                                         const gchar *value);</pre>
+<a class="indexterm" name="id2850960"></a><pre class="programlisting">void                itdb_device_set_sysinfo             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *value);</pre>
 <p>
 Set specified field. It can later be written to the iPod using
-<a href="libgpod-Device.html#itdb-device-write-sysinfo"><code class="function">itdb_device_write_sysinfo()</code></a></p>
+<a class="link" href="libgpod-Device.html#itdb-device-write-sysinfo"><code class="function">itdb_device_write_sysinfo()</code></a></p>
 <p>
 
 </p>
@@ -250,29 +368,35 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></td>
-<td> field to set
+<td><p><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></p></td>
+<td>  field to set
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
-<td> value to set (or NULL to remove the field).
+<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
+<td>  value to set (or NULL to remove the field).
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615294"></a><h3>
+<a name="id2851075"></a><h3>
 <a name="itdb-device-write-sysinfo"></a>itdb_device_write_sysinfo ()</h3>
-<a class="indexterm" name="id2615304"></a><pre class="programlisting">gboolean            itdb_device_write_sysinfo           (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
-                                                         GError **error);</pre>
+<a class="indexterm" name="id2851090"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_write_sysinfo           (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Fills the SysInfo file with information in device-&gt;sysinfo. Note:
 no directories are created if not already existent.</p>
@@ -283,30 +407,47 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if file could be read, FALSE otherwise 
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615392"></a><h3>
-<a name="itdb-device-get-ipod-info"></a>itdb_device_get_ipod_info ()</h3>
-<a class="indexterm" name="id2615403"></a><pre class="programlisting">const <a href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* itdb_device_get_ipod_info          (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<a name="id2851194"></a><h3>
+<a name="Itdb-IpodInfo"></a>Itdb_IpodInfo</h3>
+<a class="indexterm" name="id2851209"></a><pre class="programlisting">typedef struct {
+    const gchar *model_number;
+    const double capacity;
+    const Itdb_IpodModel ipod_model;
+    const Itdb_IpodGeneration ipod_generation;
+    const guint musicdirs;
+    /* reserved for future use */
+    const gint32 reserved_int1;
+    const gint32 reserved_int2;
+    gconstpointer reserved1;
+    gconstpointer reserved2;
+} Itdb_IpodInfo;
+</pre>
 <p>
-Retrieve the <a href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod</p>
+Structure representing information about an iPod</p>
 <p>
 
 </p>
@@ -314,27 +455,81 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>model_number</code></em>;</span></p></td>
+<td>    The model number.  This is abbreviated.  If the first
+                  character is not numeric, it is ommited. e.g.
+                  "MA350 -&gt; A350", "M9829 -&gt; 9829"
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the <a href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod
+<td><p><span class="term">const&#160;double&#160;<em class="structfield"><code>capacity</code></em>;</span></p></td>
+<td>        The iPod's capacity in gigabytes
 </td>
 </tr>
+<tr>
+<td><p><span class="term">const&#160;<a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a>&#160;<em class="structfield"><code>ipod_model</code></em>;</span></p></td>
+<td>      The iPod model
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a>&#160;<em class="structfield"><code>ipod_generation</code></em>;</span></p></td>
+<td> The iPod generation
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
+>guint</a>&#160;<em class="structfield"><code>musicdirs</code></em>;</span></p></td>
+<td>       The number of music (Fnn) dirs created by iTunes. The
+                  exact number seems to be version dependent. Therefore, the
+                  numbers here represent a mixture of reported values and
+                  common sense.  Note: this number does not necessarily
+                  represent the number of dirs present on a particular iPod.
+                  It is used when setting up a new iPod from scratch.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>   Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>   Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
+>gconstpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>       Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
+>gconstpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>       Reserved for future use
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615476"></a><h3>
-<a name="itdb-device-supports-artwork"></a>itdb_device_supports_artwork ()</h3>
-<a class="indexterm" name="id2615488"></a><pre class="programlisting">gboolean            itdb_device_supports_artwork        (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<a name="id2851453"></a><h3>
+<a name="itdb-device-get-ipod-info"></a>itdb_device_get_ipod_info ()</h3>
+<a class="indexterm" name="id2851467"></a><pre class="programlisting">const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* itdb_device_get_ipod_info          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
 <p>
-Indicates whether <em class="parameter"><code>device</code></em> can display artwork or not. When dealing
-with a non-art capable ipod, no artwork data will be written to the
-iPod so you can spare calls to the artwork handling methods.</p>
+Retrieve the <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod</p>
 <p>
 
 </p>
@@ -342,25 +537,32 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> true if <em class="parameter"><code>device</code></em> can display artwork.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615562"></a><h3>
-<a name="itdb-device-supports-photo"></a>itdb_device_supports_photo ()</h3>
-<a class="indexterm" name="id2615573"></a><pre class="programlisting">gboolean            itdb_device_supports_photo          (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<a name="id2851557"></a><h3>
+<a name="itdb-device-supports-artwork"></a>itdb_device_supports_artwork ()</h3>
+<a class="indexterm" name="id2851572"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_artwork        (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
 <p>
-Indicates whether <em class="parameter"><code>device</code></em> can display photos or not.</p>
+Indicates whether <em class="parameter"><code>device</code></em> can display artwork or not. When dealing
+with a non-art capable iPod, no artwork data will be written to the
+iPod so you can spare calls to the artwork handling methods.</p>
 <p>
 
 </p>
@@ -368,47 +570,30 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> true if <em class="parameter"><code>device</code></em> can display photos.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can display artwork.
+
 </td>
 </tr>
 </tbody>
 </table></div>
-</div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2615643"></a><h3>
-<a name="itdb-info-get-ipod-info-table"></a>itdb_info_get_ipod_info_table ()</h3>
-<a class="indexterm" name="id2615656"></a><pre class="programlisting">const <a href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* itdb_info_get_ipod_info_table      (void);</pre>
-<p>
-Return a pointer to the start of valid iPod model descriptions,
-which is an array of <a href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entries.</p>
-<p>
-
+<p class="since">Since  0.5.0
 </p>
-<div class="variablelist"><table border="0">
-<col align="left" valign="top">
-<tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a pointer to the array of <a href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entries.
-</td>
-</tr></tbody>
-</table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615707"></a><h3>
-<a name="itdb-info-get-ipod-generation-string"></a>itdb_info_get_ipod_generation_string ()</h3>
-<a class="indexterm" name="id2615720"></a><pre class="programlisting">const gchar*        itdb_info_get_ipod_generation_string
-                                                        (<a href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a> generation);</pre>
+<a name="id2851662"></a><h3>
+<a name="itdb-device-supports-photo"></a>itdb_device_supports_photo ()</h3>
+<a class="indexterm" name="id2851676"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_photo          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
 <p>
-Return the iPod's generic generation name, like "First Generation",
-"Mobile Phone"...</p>
+Indicates whether <em class="parameter"><code>device</code></em> can display photos or not.</p>
 <p>
 
 </p>
@@ -416,27 +601,30 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>generation</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-IpodGeneration"><span class="type">Itdb_IpodGeneration</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a pointer to the generation name. This is a static
-string and must not be <code class="function">g_free()</code>d.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can display photos.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615794"></a><h3>
-<a name="itdb-info-get-ipod-model-name-string"></a>itdb_info_get_ipod_model_name_string ()</h3>
-<a class="indexterm" name="id2615806"></a><pre class="programlisting">const gchar*        itdb_info_get_ipod_model_name_string
-                                                        (<a href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a> model);</pre>
+<a name="id2851762"></a><h3>
+<a name="itdb-device-supports-video"></a>itdb_device_supports_video ()</h3>
+<a class="indexterm" name="id2851776"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_video          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
 <p>
-Return the iPod's generic model name, like "Color", "Nano"...</p>
+Indicates whether <em class="parameter"><code>device</code></em> can play videos or not.</p>
 <p>
 
 </p>
@@ -444,73 +632,49 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>model</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Device.html#Itdb-IpodModel"><span class="type">Itdb_IpodModel</span></a>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a pointer to the model name. This is a static string
-and must not be <code class="function">g_free()</code>d.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can play videos.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.7.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2615880"></a><h3>
-<a name="itdb-init-ipod"></a>itdb_init_ipod ()</h3>
-<a class="indexterm" name="id2615890"></a><pre class="programlisting">gboolean            itdb_init_ipod                      (const gchar *mountpoint,
-                                                         const gchar *model_number,
-                                                         const gchar *ipod_name,
-                                                         GError **error);</pre>
+<a name="id2851862"></a><h3>
+<a name="itdb-info-get-ipod-info-table"></a>itdb_info_get_ipod_info_table ()</h3>
+<a class="indexterm" name="id2851878"></a><pre class="programlisting">const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* itdb_info_get_ipod_info_table      (void);</pre>
 <p>
-Initialise an iPod device from scratch. The function attempts to
-create a blank database, complete with master playlist and device
-information as well as the directory structure required for the
-type of iPod.</p>
+Return a pointer to the start of valid iPod model descriptions,
+which is an array of <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entries.</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
-<tbody>
-<tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
-<td>   the iPod mountpoint
-</td>
-</tr>
-<tr>
-<td><span class="term"><em class="parameter"><code>model_number</code></em>&#160;:</span></td>
-<td> the iPod model number
-</td>
-</tr>
-<tr>
-<td><span class="term"><em class="parameter"><code>ipod_name</code></em>&#160;:</span></td>
-<td>    the name to give to the iPod. Will be displayed in
-               gtkpod or itunes
-</td>
-</tr>
-<tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td>        return location for a <span class="type">GError</span> or NULL
-</td>
-</tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE when successful, FALSE if a failure has occurred.
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the array of <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entries.
 
 </td>
-</tr>
-</tbody>
+</tr></tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2616015"></a><h3>
+<a name="id2851943"></a><h3>
 <a name="Itdb-IpodGeneration"></a>enum Itdb_IpodGeneration</h3>
-<a class="indexterm" name="id2616025"></a><pre class="programlisting">typedef enum {
+<a class="indexterm" name="id2851957"></a><pre class="programlisting">typedef enum {
     ITDB_IPOD_GENERATION_UNKNOWN,
     ITDB_IPOD_GENERATION_FIRST,
     ITDB_IPOD_GENERATION_SECOND,
@@ -526,53 +690,183 @@
     ITDB_IPOD_GENERATION_NANO_1,
     ITDB_IPOD_GENERATION_NANO_2,
     ITDB_IPOD_GENERATION_NANO_3,
+    ITDB_IPOD_GENERATION_NANO_4,
     ITDB_IPOD_GENERATION_VIDEO_1,
     ITDB_IPOD_GENERATION_VIDEO_2,
     ITDB_IPOD_GENERATION_CLASSIC_1,
+    ITDB_IPOD_GENERATION_CLASSIC_2,
     ITDB_IPOD_GENERATION_TOUCH_1,
-    /* The following 2 are no longer in use and should be removed */
-    ITDB_IPOD_GENERATION_FIFTH,
-    ITDB_IPOD_GENERATION_SIXTH,
+    ITDB_IPOD_GENERATION_IPHONE_1,
 } Itdb_IpodGeneration;
 </pre>
 <p>
+iPod generation information
+</p>
+<p>
+See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod
+for more details.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-UNKNOWN:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_UNKNOWN</code></span></p></td>
+<td>   Unknown iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-FIRST:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_FIRST</code></span></p></td>
+<td>     First Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SECOND:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SECOND</code></span></p></td>
+<td>    Second Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-THIRD:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_THIRD</code></span></p></td>
+<td>     Third Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-FOURTH:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_FOURTH</code></span></p></td>
+<td>    Fourth Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-PHOTO:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_PHOTO</code></span></p></td>
+<td>     Photo iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-MOBILE:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_MOBILE</code></span></p></td>
+<td>    Mobile iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-MINI-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_MINI_1</code></span></p></td>
+<td>    First Generation iPod Mini
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-MINI-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_MINI_2</code></span></p></td>
+<td>    Second Generation iPod Mini
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SHUFFLE_1</code></span></p></td>
+<td> First Generation iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SHUFFLE_2</code></span></p></td>
+<td> Second Generation iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SHUFFLE_3</code></span></p></td>
+<td> Third Generation iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_1</code></span></p></td>
+<td>    First Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_2</code></span></p></td>
+<td>    Second Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-3:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_3</code></span></p></td>
+<td>    Third Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-4:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_4</code></span></p></td>
+<td>    Fourth Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-VIDEO-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_VIDEO_1</code></span></p></td>
+<td>   First Generation iPod Video (aka 5g)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-VIDEO-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_VIDEO_2</code></span></p></td>
+<td>   Second Generation iPod Video (aka 5.5g)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-CLASSIC-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_CLASSIC_1</code></span></p></td>
+<td> First Generation iPod Classic
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-CLASSIC-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_CLASSIC_2</code></span></p></td>
+<td> Second Generation iPod Classic
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-TOUCH-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_TOUCH_1</code></span></p></td>
+<td>   First Generation iPod Touch
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-IPHONE-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_IPHONE_1</code></span></p></td>
+<td>  First Generation iPhone
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2616052"></a><h3>
-<a name="Itdb-IpodInfo"></a>Itdb_IpodInfo</h3>
-<a class="indexterm" name="id2616063"></a><pre class="programlisting">typedef struct {
-    /* model_number is abbreviated: if the first character is not
-       numeric, it is ommited. e.g. "MA350 -&gt; A350", "M9829 -&gt; 9829" */
-    const gchar *model_number;
-    const double capacity;  /* in GB */
-    const Itdb_IpodModel ipod_model;
-    const Itdb_IpodGeneration ipod_generation;
-    /* Number of music (Fnn) dirs created by iTunes. The exact number
-       seems to be version dependent. Therefore, the numbers here
-       represent a mixture of reported values and common sense. Note:
-       this number does not necessarily represent the number of dirs
-       present on a particular iPod. It is used when setting up a new
-       iPod from scratch. */
-    const guint musicdirs;
-    /* reserved for future use */
-    const gint32 reserved_int1;
-    const gint32 reserved_int2;
-    gconstpointer reserved1;
-    gconstpointer reserved2;
-} Itdb_IpodInfo;
-</pre>
+<a name="id2852501"></a><h3>
+<a name="itdb-info-get-ipod-generation-string"></a>itdb_info_get_ipod_generation_string ()</h3>
+<a class="indexterm" name="id2852515"></a><pre class="programlisting">const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        itdb_info_get_ipod_generation_string
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a> generation);</pre>
 <p>
+Return the iPod's generic generation name, like "First Generation",
+"Mobile Phone"...</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>generation</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-IpodGeneration"><span class="type">Itdb_IpodGeneration</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the generation name. This is a static
+string and must not be <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>d.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2616091"></a><h3>
+<a name="id2852604"></a><h3>
 <a name="Itdb-IpodModel"></a>enum Itdb_IpodModel</h3>
-<a class="indexterm" name="id2616102"></a><pre class="programlisting">typedef enum {
+<a class="indexterm" name="id2852619"></a><pre class="programlisting">typedef enum {
     ITDB_IPOD_MODEL_INVALID,
     ITDB_IPOD_MODEL_UNKNOWN,
     ITDB_IPOD_MODEL_COLOR,
@@ -596,6 +890,9 @@
     ITDB_IPOD_MODEL_NANO_GREEN,
     ITDB_IPOD_MODEL_NANO_PINK,
     ITDB_IPOD_MODEL_NANO_RED,
+    ITDB_IPOD_MODEL_NANO_YELLOW,
+    ITDB_IPOD_MODEL_NANO_PURPLE,
+    ITDB_IPOD_MODEL_NANO_ORANGE,
     ITDB_IPOD_MODEL_IPHONE_1,
     ITDB_IPOD_MODEL_SHUFFLE_SILVER,
     ITDB_IPOD_MODEL_SHUFFLE_PINK,
@@ -603,33 +900,451 @@
     ITDB_IPOD_MODEL_SHUFFLE_GREEN,
     ITDB_IPOD_MODEL_SHUFFLE_ORANGE,
     ITDB_IPOD_MODEL_SHUFFLE_PURPLE,
+    ITDB_IPOD_MODEL_SHUFFLE_RED,
     ITDB_IPOD_MODEL_CLASSIC_SILVER,
     ITDB_IPOD_MODEL_CLASSIC_BLACK,
     ITDB_IPOD_MODEL_TOUCH_BLACK,
 } Itdb_IpodModel;
 </pre>
 <p>
+iPod model information</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-INVALID:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_INVALID</code></span></p></td>
+<td>        Invalid model
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-UNKNOWN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_UNKNOWN</code></span></p></td>
+<td>        Unknown model
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-COLOR:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_COLOR</code></span></p></td>
+<td>          Color iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-COLOR-U2:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_COLOR_U2</code></span></p></td>
+<td>       Color iPod (U2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-REGULAR:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_REGULAR</code></span></p></td>
+<td>        Regular iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-REGULAR-U2:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_REGULAR_U2</code></span></p></td>
+<td>     Regular iPod (U2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI</code></span></p></td>
+<td>           iPod Mini
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-BLUE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_BLUE</code></span></p></td>
+<td>      iPod Mini (Blue)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-PINK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_PINK</code></span></p></td>
+<td>      iPod Mini (Pink)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-GREEN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_GREEN</code></span></p></td>
+<td>     iPod Mini (Green)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-GOLD:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_GOLD</code></span></p></td>
+<td>      iPod Mini (Gold)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE</code></span></p></td>
+<td>        iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-WHITE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_WHITE</code></span></p></td>
+<td>     iPod Nano (White)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_BLACK</code></span></p></td>
+<td>     iPod Nano (Black)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_VIDEO_WHITE</code></span></p></td>
+<td>    iPod Video (White)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_VIDEO_BLACK</code></span></p></td>
+<td>    iPod Video (Black)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MOBILE-1:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MOBILE_1</code></span></p></td>
+<td>       Mobile iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-VIDEO-U2:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_VIDEO_U2</code></span></p></td>
+<td>       iPod Video (U2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-SILVER:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_SILVER</code></span></p></td>
+<td>    iPod Nano (Silver)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-BLUE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_BLUE</code></span></p></td>
+<td>      iPod Nano (Blue)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-GREEN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_GREEN</code></span></p></td>
+<td>     iPod Nano (Green)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-PINK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_PINK</code></span></p></td>
+<td>      iPod Nano (Pink)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-RED:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_RED</code></span></p></td>
+<td>       iPod Nano (Red)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-YELLOW:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_YELLOW</code></span></p></td>
+<td>    iPod Nano (Yellow)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-PURPLE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_PURPLE</code></span></p></td>
+<td>    iPod Nano (Purple)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-ORANGE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_ORANGE</code></span></p></td>
+<td>    iPod Nano (Orange)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-IPHONE-1:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_IPHONE_1</code></span></p></td>
+<td>       iPhone
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_SILVER</code></span></p></td>
+<td> iPod Shuffle (Silver)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_PINK</code></span></p></td>
+<td>   iPod Shuffle (Pink)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_BLUE</code></span></p></td>
+<td>   iPod Shuffle (Blue)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_GREEN</code></span></p></td>
+<td>  iPod Shuffle (Green)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_ORANGE</code></span></p></td>
+<td> iPod Shuffle (Orange)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_PURPLE</code></span></p></td>
+<td> iPod Shuffle (Purple)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_RED</code></span></p></td>
+<td>    iPod Shuffle (Red)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_CLASSIC_SILVER</code></span></p></td>
+<td> iPod Classic (Silver)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_CLASSIC_BLACK</code></span></p></td>
+<td>  iPod Classic (Black)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_TOUCH_BLACK</code></span></p></td>
+<td>    iPod Touch (Black)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2616134"></a><h3>
+<a name="id2855814"></a><h3>
+<a name="itdb-info-get-ipod-model-name-string"></a>itdb_info_get_ipod_model_name_string ()</h3>
+<a class="indexterm" name="id2855829"></a><pre class="programlisting">const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        itdb_info_get_ipod_model_name_string
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a> model);</pre>
+<p>
+Return the iPod's generic model name, like "Color", "Nano"...</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>model</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-IpodModel"><span class="type">Itdb_IpodModel</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the model name. This is a static string
+and must not be <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>d.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2855908"></a><h3>
+<a name="itdb-init-ipod"></a>itdb_init_ipod ()</h3>
+<a class="indexterm" name="id2855921"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_init_ipod                      (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *model_number,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_name,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Initialise an iPod device from scratch. The function attempts to
+create a blank database, complete with master playlist and device
+information as well as the directory structure required for the
+type of iPod.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td>   the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>model_number</code></em>&#160;:</span></p></td>
+<td> the iPod model number
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ipod_name</code></em>&#160;:</span></p></td>
+<td>    the name to give to the iPod. Will be displayed in
+               gtkpod or itunes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>        return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE when successful, FALSE if a failure has occurred.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2856051"></a><h3>
 <a name="Itdb-ArtworkFormat"></a>Itdb_ArtworkFormat</h3>
-<a class="indexterm" name="id2616144"></a><pre class="programlisting">typedef struct {
-	ItdbThumbType type;
-	gint16 width;
-	gint16 height;
-	gint16 correlation_id;
+<a class="indexterm" name="id2856061"></a><pre class="programlisting">typedef struct {
+        gint format_id;
+        gint width;
+        gint height;
         ItdbThumbFormat format;
         gint32 padding;
+        gboolean crop;
+        gint rotation;
+        guchar back_color[4];
+
+        gint display_width;
+        gboolean interlaced;
+        gboolean align_row_bytes;
+        gint color_adjustment;
+        gdouble gamma;
+        gint associated_format;
 } Itdb_ArtworkFormat;
 </pre>
 <p>
+Structure representing the characteristics of the thumbnails to
+write to a given .ithmb file. The format of the structure is based
+on the way artwork formats are written to SysInfoExtended.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>format_id</code></em>;</span></p></td>
+<td>          Unique ID for the format (generally a 4 digit int)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>width</code></em>;</span></p></td>
+<td>              Width of the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>height</code></em>;</span></p></td>
+<td>             Height of the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term">ItdbThumbFormat&#160;<em class="structfield"><code>format</code></em>;</span></p></td>
+<td>             Pixel format of the thumbnail (RGB, YUV, ...)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>padding</code></em>;</span></p></td>
+<td>            Number of bytes of padding to add after the thumbnail
+                     (not found in SysInfoExtended -- added for
+                     compatibility with hardcoded artwork formats)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>crop</code></em>;</span></p></td>
+<td>               Indicates if the thumbnail is to be cropped
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>rotation</code></em>;</span></p></td>
+<td>           Degrees to rotate the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a>&#160;<em class="structfield"><code>back_color</code></em>[4];</span></p></td>
+<td>         Background color for the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>display_width</code></em>;</span></p></td>
+<td>      Width at which the thumbnail will be displayed
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>interlaced</code></em>;</span></p></td>
+<td>         If TRUE, the thumbnails are interlaced
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>align_row_bytes</code></em>;</span></p></td>
+<td>    If TRUE, each pixel row must be aligned a 2-byte boundary
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>color_adjustment</code></em>;</span></p></td>
+<td>   Color adjustment for the thumbnails
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"
+>gdouble</a>&#160;<em class="structfield"><code>gamma</code></em>;</span></p></td>
+<td>              Gamma value for the thumbails
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>associated_format</code></em>;</span></p></td>
+<td>  Unknown (not currently used)
+</td>
+</tr>
+</tbody>
+</table></div>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2856364"></a><div class="refsect2" lang="en"><a name="id2856365"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2856366"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>File handling functions</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="prev" href="libgpod-The-Itdb-iTunesDB-structure.html" title="iPod database reading/writing">
 <link rel="next" href="libgpod-Time-handling.html" title="Time handling">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,16 +23,16 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="libgpod-Time-handling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2567376" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2785999" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2597516" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2803374" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-File-handling-functions"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2567376"></a><span class="refentrytitle">File handling functions</span>
+<a name="id2785999"></a><span class="refentrytitle">File handling functions</span>
 </h2>
 <p>File handling functions &#8212; Managing files on the iPod</p>
 </td>
@@ -44,60 +44,86 @@
 
 
 
-gboolean            <a href="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod">itdb_cp_track_to_ipod</a>               (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *filename,
-                                                         GError **error);
-void                <a href="libgpod-File-handling-functions.html#itdb-filename-fs2ipod">itdb_filename_fs2ipod</a>               (gchar *filename);
-void                <a href="libgpod-File-handling-functions.html#itdb-filename-ipod2fs">itdb_filename_ipod2fs</a>               (gchar *ipod_file);
-gchar*              <a href="libgpod-File-handling-functions.html#itdb-filename-on-ipod">itdb_filename_on_ipod</a>               (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-gint                <a href="libgpod-File-handling-functions.html#itdb-musicdirs-number">itdb_musicdirs_number</a>               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-gboolean            <a href="libgpod-File-handling-functions.html#itdb-rename-files">itdb_rename_files</a>                   (const gchar *mp,
-                                                         GError **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod">itdb_cp_track_to_ipod</a>               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-File-handling-functions.html#itdb-filename-fs2ipod">itdb_filename_fs2ipod</a>               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);
+void                <a class="link" href="libgpod-File-handling-functions.html#itdb-filename-ipod2fs">itdb_filename_ipod2fs</a>               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_file);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-File-handling-functions.html#itdb-filename-on-ipod">itdb_filename_on_ipod</a>               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>                <a class="link" href="libgpod-File-handling-functions.html#itdb-musicdirs-number">itdb_musicdirs_number</a>               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-File-handling-functions.html#itdb-rename-files">itdb_rename_files</a>                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2597516"></a><h2>Description</h2>
+<a name="id2803374"></a><h2>Description</h2>
 <p>
-These functions are for copying, renaming, and getting information about the
-files and directories on the iPod
+These functions are for copying, renaming, and retrieving information
+about the files and directories on the iPod.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2597534"></a><h2>Details</h2>
+<a name="id2803392"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2597544"></a><h3>
+<a name="id2803402"></a><h3>
 <a name="itdb-cp-track-to-ipod"></a>itdb_cp_track_to_ipod ()</h3>
-<a class="indexterm" name="id2597556"></a><pre class="programlisting">gboolean            itdb_cp_track_to_ipod               (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *filename,
-                                                         GError **error);</pre>
+<a class="indexterm" name="id2803414"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_cp_track_to_ipod               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Copy one track to the iPod. The PC filename is <em class="parameter"><code>filename</code></em>
 and is taken literally.
 </p>
 <p>
 The mountpoint of the iPod (in local encoding) must have been set
-with <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint"><code class="function">itdb_set_mountpoint()</code></a> (done automatically when reading an
+with <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint"><code class="function">itdb_set_mountpoint()</code></a> (done automatically when reading an
 iTunesDB).
 </p>
 <p>
-If <em class="parameter"><code>track</code></em>-&gt;transferred is set to TRUE, nothing is done. Upon
-successful transfer <em class="parameter"><code>track</code></em>-&gt;transferred is set to TRUE.
+If <em class="parameter"><code>track-&gt;transferred</code></em> is set to TRUE, nothing is done. Upon
+successful transfer <em class="parameter"><code>track-&gt;transferred</code></em> is set to TRUE.
 </p>
 <p>
-For storage, the directories "f00 ... fnn" will be used randomly.
+For storage, the directories "F00 ... Fnn" will be used randomly.
 </p>
 <p>
-The filename is constructed as "gtkpod"&lt;random number&gt; and copied
-to <em class="parameter"><code>track</code></em>-&gt;ipod_path. If this file already exists, &lt;random number&gt;
+The filename is constructed as "libgpod<em class="parameter"><code>random_number</code></em>" and copied
+to <em class="parameter"><code>track-&gt;ipod_path</code></em>. If this file already exists, <em class="parameter"><code>random_number</code></em>
 is adjusted until an unused filename is found.
 </p>
 <p>
-If <em class="parameter"><code>track</code></em>-&gt;ipod_path is already set, this one will be used
+If <em class="parameter"><code>track-&gt;ipod_path</code></em> is already set, this one will be used
 instead. If a file with this name already exists, it will be
 overwritten.
 </p>
 <p>
-<em class="parameter"><code>track</code></em>-&gt;filetype_marker is set according to the filename extension</p>
+<em class="parameter"><code>track-&gt;filetype_marker</code></em> is set according to the filename extension</p>
 <p>
 
 </p>
@@ -105,22 +131,24 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> to copy (containing <em class="parameter"><code>filename</code></em> metadata)
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>      the <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> to copy (containing <em class="parameter"><code>filename</code></em> metadata)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> the source file
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   the source file
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
 set accordingly.
 </td>
@@ -130,77 +158,94 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2595423"></a><h3>
+<a name="id2820868"></a><h3>
 <a name="itdb-filename-fs2ipod"></a>itdb_filename_fs2ipod ()</h3>
-<a class="indexterm" name="id2595434"></a><pre class="programlisting">void                itdb_filename_fs2ipod               (gchar *filename);</pre>
+<a class="indexterm" name="id2820879"></a><pre class="programlisting">void                itdb_filename_fs2ipod               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);</pre>
 <p>
-Convert string from casual PC file name to iPod iTunesDB format using ':' 
-instead of G_DIR_SEPARATOR_S (ie slashes on Unix-like systems). <em class="parameter"><code>ipod_file</code></em>
-is modified in place.</p>
+Convert string from casual PC file name to iPod iTunesDB format
+using ':' instead of G_DIR_SEPARATOR_S (i.e. slashes on Unix-like
+systems). <em class="parameter"><code>ipod_file</code></em> is modified in place.</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> a filename 'PC-style' (eg /iPod_Control/Music/f00/test.mp3)
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2595493"></a><h3>
+<a name="id2820937"></a><h3>
 <a name="itdb-filename-ipod2fs"></a>itdb_filename_ipod2fs ()</h3>
-<a class="indexterm" name="id2595504"></a><pre class="programlisting">void                itdb_filename_ipod2fs               (gchar *ipod_file);</pre>
+<a class="indexterm" name="id2820948"></a><pre class="programlisting">void                itdb_filename_ipod2fs               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_file);</pre>
 <p>
-Convert string from from iPod iTunesDB format to casual PC file name
-using G_DIR_SEPARATOR (ie slashes on Unix-like systems) instead of ':'.
-<em class="parameter"><code>ipod_file</code></em> is modified in place.</p>
+Convert string from from iPod iTunesDB format to casual PC file
+name using G_DIR_SEPARATOR (ie slashes on Unix-like systems)
+instead of ':'.  <em class="parameter"><code>ipod_file</code></em> is modified in place.</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>ipod_file</code></em>&#160;:</span></td>
-<td> a filename 'PC-style' (eg /iPod_Control/Music/f00/test.mp3)
+<td><p><span class="term"><em class="parameter"><code>ipod_file</code></em>&#160;:</span></p></td>
+<td> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2595563"></a><h3>
+<a name="id2821007"></a><h3>
 <a name="itdb-filename-on-ipod"></a>itdb_filename_on_ipod ()</h3>
-<a class="indexterm" name="id2595574"></a><pre class="programlisting">gchar*              itdb_filename_on_ipod               (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2821018"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_filename_on_ipod               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
-Return the full iPod filename as stored in <em class="parameter"><code>track</code></em>.
+Get the full iPod filename as stored in <em class="parameter"><code>track</code></em>.
 </p>
 <p>
-NOTE: NULL is returned when the file does not exist.
 </p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+NULL is returned when the file does not exist.
+</div>
 <p>
-NOTE: this code works around a problem on some systems (see
-<a href="libgpod-Low-level-functions.html#itdb-resolve-path"><code class="function">itdb_resolve_path()</code></a> ) and might return a filename with different
-case than the original filename. Don't copy it back to <em class="parameter"><code>track</code></em>
-unless you must</p>
+</p>
 <p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+This code works around a problem on some systems (see
+<a class="link" href="libgpod-Low-level-functions.html#itdb-resolve-path"><code class="function">itdb_resolve_path()</code></a>) and might return a filename with different
+case than the original filename. Don't copy it back to <em class="parameter"><code>track</code></em> if
+you can avoid it.
+</div>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> full filename to <em class="parameter"><code>track</code></em> on the iPod or NULL if no
-filename is set in <em class="parameter"><code>track</code></em>. Must be freed with <code class="function">g_free()</code> after use.
+filename is set in <em class="parameter"><code>track</code></em>. Must be freed with <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
 </td>
 </tr>
 </tbody>
@@ -208,16 +253,18 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2590668"></a><h3>
+<a name="id2810437"></a><h3>
 <a name="itdb-musicdirs-number"></a>itdb_musicdirs_number ()</h3>
-<a class="indexterm" name="id2590679"></a><pre class="programlisting">gint                itdb_musicdirs_number               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2810451"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>                itdb_musicdirs_number               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Determine the number of F.. directories in iPod_Control/Music.
 </p>
 <p>
-If itdb-&gt;musicdirs is already set, simply return the previously
+If <em class="parameter"><code>itdb-&gt;musicdirs</code></em> is already set, simply return the previously
 determined number. Otherwise count the directories first and set
-itdb-&gt;musicdirs.</p>
+<em class="parameter"><code>itdb-&gt;musicdirs</code></em>.</p>
 <p>
 
 </p>
@@ -225,24 +272,33 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> max number of directories in iPod_Control/Music
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.1.3
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2590755"></a><h3>
+<a name="id2810545"></a><h3>
 <a name="itdb-rename-files"></a>itdb_rename_files ()</h3>
-<a class="indexterm" name="id2590767"></a><pre class="programlisting">gboolean            itdb_rename_files                   (const gchar *mp,
-                                                         GError **error);</pre>
+<a class="indexterm" name="id2810557"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_rename_files                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Renames/removes some files on the iPod (Playcounts, OTG
 semaphore). May have to be called if you write the iTunesDB not
@@ -255,17 +311,19 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
-<td> mount point of the iPod
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     mount point of the iPod
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> FALSE on error and sets <em class="parameter"><code>error</code></em> accordingly
 </td>
 </tr>
@@ -273,6 +331,11 @@
 </table></div>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2810656"></a><div class="refsect2" lang="en"><a name="id2810657"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2810658"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Low-level functions</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="prev" href="libgpod-Time-handling.html" title="Time handling">
 <link rel="next" href="ch01.html" title="iPod database components">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,16 +23,16 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="ch01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2573162" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2795805" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2597297" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2800916" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Low-level-functions"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2573162"></a><span class="refentrytitle">Low-level functions</span>
+<a name="id2795805"></a><span class="refentrytitle">Low-level functions</span>
 </h2>
 <p>Low-level functions &#8212; Low-level functions which shouldn't be needed in normal situations</p>
 </td>
@@ -44,58 +44,160 @@
 
 
 
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-control-dir">itdb_get_control_dir</a>                (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-itunes-dir">itdb_get_itunes_dir</a>                 (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-music-dir">itdb_get_music_dir</a>                  (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-artwork-dir">itdb_get_artwork_dir</a>                (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-device-dir">itdb_get_device_dir</a>                 (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-photos-dir">itdb_get_photos_dir</a>                 (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-itunesdb-path">itdb_get_itunesdb_path</a>              (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-itunessd-path">itdb_get_itunessd_path</a>              (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-artworkdb-path">itdb_get_artworkdb_path</a>             (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-photodb-path">itdb_get_photodb_path</a>               (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir">itdb_get_photos_thumb_dir</a>           (const gchar *mountpoint);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-get-path">itdb_get_path</a>                       (const gchar *dir,
-                                                         const gchar *file);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-resolve-path">itdb_resolve_path</a>                   (const gchar *root,
-                                                         const gchar * const *components);
-gboolean            <a href="libgpod-Low-level-functions.html#itdb-shuffle-write">itdb_shuffle_write</a>                  (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         GError **error);
-gboolean            <a href="libgpod-Low-level-functions.html#itdb-shuffle-write-file">itdb_shuffle_write_file</a>             (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         const gchar *filename,
-                                                         GError **error);
-gboolean            <a href="libgpod-Low-level-functions.html#itdb-cp">itdb_cp</a>                             (const gchar *from_file,
-                                                         const gchar *to_file,
-                                                         GError **error);
-gchar*              <a href="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename">itdb_cp_get_dest_filename</a>           (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *mountpoint,
-                                                         const gchar *filename,
-                                                         GError **error);
-<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a href="libgpod-Low-level-functions.html#itdb-cp-finalize">itdb_cp_finalize</a>                    (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *mountpoint,
-                                                         const gchar *dest_filename,
-                                                         GError **error);
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a href="libgpod-Low-level-functions.html#itdb-parse-file">itdb_parse_file</a>                     (const gchar *filename,
-                                                         GError **error);
-gboolean            <a href="libgpod-Low-level-functions.html#itdb-write-file">itdb_write_file</a>                     (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         const gchar *filename,
-                                                         GError **error);
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a href="libgpod-Low-level-functions.html#itdb-duplicate">itdb_duplicate</a>                      (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir">itdb_get_control_dir</a>                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunes-dir">itdb_get_itunes_dir</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-music-dir">itdb_get_music_dir</a>                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-artwork-dir">itdb_get_artwork_dir</a>                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-device-dir">itdb_get_device_dir</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-photos-dir">itdb_get_photos_dir</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunesdb-path">itdb_get_itunesdb_path</a>              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunessd-path">itdb_get_itunessd_path</a>              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-artworkdb-path">itdb_get_artworkdb_path</a>             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-photodb-path">itdb_get_photodb_path</a>               (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir">itdb_get_photos_thumb_dir</a>           (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-path">itdb_get_path</a>                       (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dir,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *file);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-resolve-path">itdb_resolve_path</a>                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *root,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> * const *components);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-cp">itdb_cp</a>                             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *from_file,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *to_file,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename">itdb_cp_get_dest_filename</a>           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Low-level-functions.html#itdb-cp-finalize">itdb_cp_finalize</a>                    (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dest_filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-Low-level-functions.html#itdb-parse-file">itdb_parse_file</a>                     (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-write-file">itdb_write_file</a>                     (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-shuffle-write">itdb_shuffle_write</a>                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-shuffle-write-file">itdb_shuffle_write_file</a>             (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-Low-level-functions.html#itdb-duplicate">itdb_duplicate</a>                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2597297"></a><h2>Description</h2>
+<a name="id2800916"></a><h2>Description</h2>
 <p>
 These functions are not normally needed but are avalable to allow for finer
 control over the iPod database.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2597315"></a><h2>Details</h2>
+<a name="id2800933"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2597326"></a><h3>
+<a name="id2800944"></a><h3>
 <a name="itdb-get-control-dir"></a>itdb_get_control_dir ()</h3>
-<a class="indexterm" name="id2597337"></a><pre class="programlisting">gchar*              itdb_get_control_dir                (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2800957"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_control_dir                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Get the i*_Control directory. Observed values are 'iPod_Control'
 for standard iPods and 'iTunes/iTunes_Control' for mobile
@@ -107,27 +209,36 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the control dir or NULL of non-existent. Must
-<code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the control dir or NULL if non-existent. Must
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2595061"></a><h3>
+<a name="id2801037"></a><h3>
 <a name="itdb-get-itunes-dir"></a>itdb_get_itunes_dir ()</h3>
-<a class="indexterm" name="id2595073"></a><pre class="programlisting">gchar*              itdb_get_itunes_dir                 (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2801051"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_itunes_dir                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve the iTunes directory (containing the iTunesDB) by first
-calling <a href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'iTunes'</p>
+calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'iTunes'</p>
 <p>
 
 </p>
@@ -135,27 +246,36 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the iTunes directory or NULL of non-existent.
-Must <code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the iTunes directory or NULL if non-existent.
+Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2595153"></a><h3>
+<a name="id2810730"></a><h3>
 <a name="itdb-get-music-dir"></a>itdb_get_music_dir ()</h3>
-<a class="indexterm" name="id2595166"></a><pre class="programlisting">gchar*              itdb_get_music_dir                  (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2810743"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_music_dir                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve the Music directory (containing the Fnn dirs) by first
-calling <a href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Music'</p>
+calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Music'</p>
 <p>
 
 </p>
@@ -163,14 +283,16 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the Music directory or NULL of
-non-existent. Must <code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Music directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
 </td>
 </tr>
 </tbody>
@@ -178,12 +300,16 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2595246"></a><h3>
+<a name="id2810822"></a><h3>
 <a name="itdb-get-artwork-dir"></a>itdb_get_artwork_dir ()</h3>
-<a class="indexterm" name="id2595257"></a><pre class="programlisting">gchar*              itdb_get_artwork_dir                (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2810836"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_artwork_dir                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve the Artwork directory (containing the ArtworDB) by
-first calling <a href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Artwork'</p>
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Artwork'</p>
 <p>
 
 </p>
@@ -191,27 +317,36 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the Artwork directory or NULL of
-non-existent. Must <code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Artwork directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2602927"></a><h3>
+<a name="id2810923"></a><h3>
 <a name="itdb-get-device-dir"></a>itdb_get_device_dir ()</h3>
-<a class="indexterm" name="id2602937"></a><pre class="programlisting">gchar*              itdb_get_device_dir                 (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2810938"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_device_dir                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve the Device directory (containing the SysInfo file) by
-first calling <a href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Device'</p>
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Device'</p>
 <p>
 
 </p>
@@ -219,27 +354,36 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the Device directory or NULL of
-non-existent. Must <code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Device directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603010"></a><h3>
+<a name="id2811025"></a><h3>
 <a name="itdb-get-photos-dir"></a>itdb_get_photos_dir ()</h3>
-<a class="indexterm" name="id2603020"></a><pre class="programlisting">gchar*              itdb_get_photos_dir                 (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2811040"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_photos_dir                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve the Photo directory by
-first calling <a href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos'</p>
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos'</p>
 <p>
 
 </p>
@@ -247,24 +391,33 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> mountpoint of iPod
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the Artwork directory or NULL of
-non-existent. Must <code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Artwork directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603095"></a><h3>
+<a name="id2811126"></a><h3>
 <a name="itdb-get-itunesdb-path"></a>itdb_get_itunesdb_path ()</h3>
-<a class="indexterm" name="id2603106"></a><pre class="programlisting">gchar*              itdb_get_itunesdb_path              (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2811140"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_itunesdb_path              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve a path to the iTunesDB</p>
 <p>
@@ -274,24 +427,33 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the iTunesDB or NULL if non-existent. Must <code class="function">g_free()</code>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the iTunesDB or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
 after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603176"></a><h3>
+<a name="id2811217"></a><h3>
 <a name="itdb-get-itunessd-path"></a>itdb_get_itunessd_path ()</h3>
-<a class="indexterm" name="id2603187"></a><pre class="programlisting">gchar*              itdb_get_itunessd_path              (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2811230"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_itunessd_path              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve a path to the iTunesSD</p>
 <p>
@@ -301,24 +463,33 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the iTunesSD or NULL if non-existent. Must <code class="function">g_free()</code>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the iTunesSD or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
 after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603257"></a><h3>
+<a name="id2811307"></a><h3>
 <a name="itdb-get-artworkdb-path"></a>itdb_get_artworkdb_path ()</h3>
-<a class="indexterm" name="id2603268"></a><pre class="programlisting">gchar*              itdb_get_artworkdb_path             (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2811321"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_artworkdb_path             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve a path to the ArtworkDB</p>
 <p>
@@ -328,24 +499,33 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the ArtworkDB or NULL if non-existent. Must <code class="function">g_free()</code> 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the ArtworkDB or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
 after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603339"></a><h3>
+<a name="id2811398"></a><h3>
 <a name="itdb-get-photodb-path"></a>itdb_get_photodb_path ()</h3>
-<a class="indexterm" name="id2603350"></a><pre class="programlisting">gchar*              itdb_get_photodb_path               (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2811411"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_photodb_path               (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve a path to the Photo DB</p>
 <p>
@@ -355,27 +535,36 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> path to the PhotoDB or NULL if non-existent. Must
-<code class="function">g_free()</code> after use.
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603421"></a><h3>
+<a name="id2811489"></a><h3>
 <a name="itdb-get-photos-thumb-dir"></a>itdb_get_photos_thumb_dir ()</h3>
-<a class="indexterm" name="id2603433"></a><pre class="programlisting">gchar*              itdb_get_photos_thumb_dir           (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id2811503"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_photos_thumb_dir           (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
 Retrieve the Photo Thumbnail directory by
-first calling <a href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos/Thumbs'</p>
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos/Thumbs'</p>
 <p>
 
 </p>
@@ -383,25 +572,36 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
 <td> the iPod mountpoint
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the Artwork directory or NULL of
-non-existent. Must <code class="function">g_free()</code> after use.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Artwork directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603513"></a><h3>
+<a name="id2811590"></a><h3>
 <a name="itdb-get-path"></a>itdb_get_path ()</h3>
-<a class="indexterm" name="id2603525"></a><pre class="programlisting">gchar*              itdb_get_path                       (const gchar *dir,
-                                                         const gchar *file);</pre>
+<a class="indexterm" name="id2811605"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_path                       (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dir,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *file);</pre>
 <p>
 Retrieve a path to the <em class="parameter"><code>file</code></em> in <em class="parameter"><code>dir</code></em></p>
 <p>
@@ -411,36 +611,47 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>dir</code></em>&#160;:</span></td>
-<td> a directory
+<td><p><span class="term"><em class="parameter"><code>dir</code></em>&#160;:</span></p></td>
+<td>    a directory
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></td>
-<td> a file
+<td><p><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></p></td>
+<td>   a file
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> path to the <em class="parameter"><code>file</code></em> or NULL if non-existent. Must be <code class="function">g_free()</code>'d 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the <em class="parameter"><code>file</code></em> or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
 after use.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603634"></a><h3>
+<a name="id2811721"></a><h3>
 <a name="itdb-resolve-path"></a>itdb_resolve_path ()</h3>
-<a class="indexterm" name="id2603646"></a><pre class="programlisting">gchar*              itdb_resolve_path                   (const gchar *root,
-                                                         const gchar * const *components);</pre>
+<a class="indexterm" name="id2811733"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_resolve_path                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *root,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> * const *components);</pre>
 <p>
 Resolve the path to a track on the iPod
 </p>
 <p>
-We start by assuming that the ipod mount point exists.  Then, for
-each component c of track-&gt;ipod_path, we try to find an entry d in
+We start by assuming that the iPod mount point exists.  Then, for
+each component c of <em class="parameter"><code>track-&gt;ipod_path</code></em>, we try to find an entry d in
 good_path that is case-insensitively equal to c.  If we find d, we
 append d to good_path and make the result the new good_path.
 Otherwise, we quit and return NULL.</p>
@@ -451,17 +662,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>root</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>root</code></em>&#160;:</span></p></td>
 <td> in local encoding
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>components</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>components</code></em>&#160;:</span></p></td>
 <td> in utf8
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> path to track on the iPod or NULL.
 </td>
 </tr>
@@ -470,19 +681,21 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603736"></a><h3>
-<a name="itdb-shuffle-write"></a>itdb_shuffle_write ()</h3>
-<a class="indexterm" name="id2603748"></a><pre class="programlisting">gboolean            itdb_shuffle_write                  (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         GError **error);</pre>
+<a name="id2811828"></a><h3>
+<a name="itdb-cp"></a>itdb_cp ()</h3>
+<a class="indexterm" name="id2811840"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_cp                             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *from_file,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *to_file,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Write out an iTunesSD for the Shuffle.
-First reassigns unique IDs to all tracks.
-An existing "Play Counts" file is renamed to "Play Counts.bak" if
-the export was successful.
-An existing "OTGPlaylistInfo" file is removed if the export was
-successful.
-<em class="parameter"><code>itdb-&gt;mountpoint</code></em> must point to the mount point of the iPod,
-e.g. "/mnt/ipod" and be in local encoding.</p>
+Copy file <em class="parameter"><code>from_file</code></em> to <em class="parameter"><code>to_file</code></em>.</p>
 <p>
 
 </p>
@@ -490,17 +703,24 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
+<td><p><span class="term"><em class="parameter"><code>from_file</code></em>&#160;:</span></p></td>
+<td>  source file
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>to_file</code></em>&#160;:</span></p></td>
+<td>    destination file
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
 set accordingly.
 </td>
@@ -510,233 +730,291 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603862"></a><h3>
-<a name="itdb-shuffle-write-file"></a>itdb_shuffle_write_file ()</h3>
-<a class="indexterm" name="id2603873"></a><pre class="programlisting">gboolean            itdb_shuffle_write_file             (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         const gchar *filename,
-                                                         GError **error);</pre>
+<a name="id2811969"></a><h3>
+<a name="itdb-cp-get-dest-filename"></a>itdb_cp_get_dest_filename ()</h3>
+<a class="indexterm" name="id2811983"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_cp_get_dest_filename           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Do the actual writing to the iTunesSD</p>
+Creates a valid filename on the iPod where <em class="parameter"><code>filename</code></em> can be copied.
+</p>
 <p>
+You must provide either <em class="parameter"><code>track</code></em> or <em class="parameter"><code>mountpoint</code></em>. Providing <em class="parameter"><code>track</code></em> is
+not thread-safe (accesses track-&gt;itdb-&gt;device and may even write to
+track-&gt;itdb-&gt;device). Providing <em class="parameter"><code>mountpoint</code></em> is thread-safe but
+slightly slower because the number of music directories is counted
+each time the function is called.
+</p>
+<p>
+You can use <a class="link" href="libgpod-Low-level-functions.html#itdb-cp"><code class="function">itdb_cp()</code></a> to copy the track to the iPod or implement
+your own copy function. After the file was copied you have to call
+<a class="link" href="libgpod-Low-level-functions.html#itdb-cp-finalize"><code class="function">itdb_cp_finalize()</code></a> to obtain relevant update information for
+<a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>.</p>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>      track to transfer or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> file to write to, cannot be NULL
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> mountpoint of your iPod or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   the source file
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
-set accordingly.
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a valid filename on the iPod where <em class="parameter"><code>filename</code></em> can be
+copied or NULL in case of an error. In that case <em class="parameter"><code>error</code></em> is set
+accordingly. You must free the filename when it is no longer
+needed.
+
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603970"></a><h3>
-<a name="itdb-cp"></a>itdb_cp ()</h3>
-<a class="indexterm" name="id2603981"></a><pre class="programlisting">gboolean            itdb_cp                             (const gchar *from_file,
-                                                         const gchar *to_file,
-                                                         GError **error);</pre>
+<a name="id2812206"></a><h3>
+<a name="itdb-cp-finalize"></a>itdb_cp_finalize ()</h3>
+<a class="indexterm" name="id2812220"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_cp_finalize                    (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dest_filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Copy file "from_file" to "to_file".</p>
+Updates information in <em class="parameter"><code>track</code></em> necessary for the iPod.
+</p>
 <p>
+You must supply either <em class="parameter"><code>track</code></em> or <em class="parameter"><code>mountpoint</code></em>. If <em class="parameter"><code>track</code></em> == NULL, a
+new track structure is created that must be freed with
+<a class="link" href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when it is no longer needed.
+</p>
+<p>
+The following <em class="parameter"><code>track</code></em> fields are updated:
+</p>
+<p>
+</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+      ipod_path
+  </li>
+<li>
+      filetype_marker
+  </li>
+<li>
+      transferred
+  </li>
+<li>
+      size
+  </li>
+</ul></div>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>from_file</code></em>&#160;:</span></td>
-<td> source file
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>          track to update or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>to_file</code></em>&#160;:</span></td>
-<td> destination file
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td>     mountpoint of your iPod or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>dest_filename</code></em>&#160;:</span></p></td>
+<td>  the name of the file on the iPod copied to
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
-set accordingly.
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>          return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> on success a pointer to the <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> item passed
+or a new <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> item if <em class="parameter"><code>track</code></em> was NULL. In the latter case
+you must free the memory using <a class="link" href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when the item is
+no longer used. If an error occurs NULL is returned and <em class="parameter"><code>error</code></em> is
+set accordingly. Errors occur when <em class="parameter"><code>dest_filename</code></em> cannot be
+accessed or the mountpoint is not set.
+
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604086"></a><h3>
-<a name="itdb-cp-get-dest-filename"></a>itdb_cp_get_dest_filename ()</h3>
-<a class="indexterm" name="id2604097"></a><pre class="programlisting">gchar*              itdb_cp_get_dest_filename           (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *mountpoint,
-                                                         const gchar *filename,
-                                                         GError **error);</pre>
+<a name="id2812473"></a><h3>
+<a name="itdb-parse-file"></a>itdb_parse_file ()</h3>
+<a class="indexterm" name="id2812486"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_parse_file                     (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Creates a valid filename on the iPod where to copy <em class="parameter"><code>filename</code></em>.
-</p>
+Same as <code class="function">itunesdb_parse()</code>, but filename is specified directly.</p>
 <p>
-You must either provide <em class="parameter"><code>track</code></em> or <em class="parameter"><code>mountpoint</code></em>. Providing <em class="parameter"><code>track</code></em> is
-not thread-safe (accesses track-&gt;itdb-&gt;device and may even write to
-track-&gt;itdb-&gt;device). Providing <em class="parameter"><code>mountpoint</code></em> is thread-safe but
-slightly slower because the number of music directories is counted
-each time the function is called.
-</p>
-<p>
-You can use #<a href="libgpod-Low-level-functions.html#itdb-cp"><code class="function">itdb_cp()</code></a> to copy the track to the iPod or implement
-your own copy function. After the file was copied you have to call
-#<a href="libgpod-Low-level-functions.html#itdb-cp-finalize"><code class="function">itdb_cp_finalize()</code></a> to obtain relevant update information for
-<a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>.</p>
-<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> track to transfer or NULL
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   path to a file in iTunesDB format
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
-<td> mountpoint of your iPod or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> the source file
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
+the playlists present in <em class="parameter"><code>filename</code></em>, NULL if <em class="parameter"><code>filename</code></em> isn't a parsable 
+iTunesDB file. If non-NULL, the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with 
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a> when it's no longer needed
 </td>
 </tr>
-<tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
-</td>
-</tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a valid filename on the iPod to where <em class="parameter"><code>filename</code></em> can
-be copied or NULL in case of an error. In that case <em class="parameter"><code>error</code></em> is set
-accordingly. You must free the filename when it is no longer
-needed.
-</td>
-</tr>
 </tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604292"></a><h3>
-<a name="itdb-cp-finalize"></a>itdb_cp_finalize ()</h3>
-<a class="indexterm" name="id2604302"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_cp_finalize                    (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *mountpoint,
-                                                         const gchar *dest_filename,
-                                                         GError **error);</pre>
+<a name="id2812622"></a><h3>
+<a name="itdb-write-file"></a>itdb_write_file ()</h3>
+<a class="indexterm" name="id2812634"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_write_file                     (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Updates information in <em class="parameter"><code>track</code></em> necessary for the iPod. You must
-either supply <em class="parameter"><code>track</code></em> or <em class="parameter"><code>mountpoint</code></em>. If <em class="parameter"><code>track</code></em> == NULL, a new track
-structure is created that must be freed with #<a href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a>
-when it is no longer needed.
-</p>
+Write the content of <em class="parameter"><code>itdb</code></em> to <em class="parameter"><code>filename</code></em>. If <em class="parameter"><code>filename</code></em> is NULL, it attempts
+to write to <em class="parameter"><code>itdb-&gt;filename</code></em>.</p>
 <p>
-The following fields are updated:
-</p>
-<p>
-- ipod_path
-- filetype_marker
-- transferred
-- size</p>
-<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> track to update or NULL
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>       the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to save
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
-<td> mountpoint of your iPod or NULL
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   filename to save <em class="parameter"><code>itdb</code></em> to
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>dest_filename</code></em>&#160;:</span></td>
-<td> the name of the file on the iPod copied to
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if all went well, FALSE otherwise
 </td>
 </tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> on success a pointer to the <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> item passed
-or a new <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> item if <em class="parameter"><code>track</code></em> was NULL. In the latter case
-you must free the memory using #<a href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when the item is
-no longer used. If an error occurs NULL is returned and <em class="parameter"><code>error</code></em> is
-set accordingly. Errors occur when <em class="parameter"><code>dest_filename</code></em> cannot be
-accessed or the mountpoint is not set.
-</td>
-</tr>
 </tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604503"></a><h3>
-<a name="itdb-parse-file"></a>itdb_parse_file ()</h3>
-<a class="indexterm" name="id2604513"></a><pre class="programlisting"><a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_parse_file                     (const gchar *filename,
-                                                         GError **error);</pre>
+<a name="id2830003"></a><h3>
+<a name="itdb-shuffle-write"></a>itdb_shuffle_write ()</h3>
+<a class="indexterm" name="id2830013"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_shuffle_write                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Same as <code class="function">itunesdb_parse()</code>, but filename is specified directly.</p>
+Write out an iTunesSD for the Shuffle.
+</p>
 <p>
+First reassigns unique IDs to all tracks.  An existing "Play
+Counts" file is renamed to "Play Counts.bak" if the export was
+successful.  An existing "OTGPlaylistInfo" file is removed if the
+export was successful.  <em class="parameter"><code>itdb-&gt;mountpoint</code></em> must point to the mount
+point of the iPod, e.g. "/mnt/ipod" and be in local encoding.</p>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> path to a file in iTunesDB format
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly allocated <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
-the playlists present in <em class="parameter"><code>filename</code></em>, NULL if <em class="parameter"><code>filename</code></em> isn't a parsable 
-iTunesDB file. If non-NULL, the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with 
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a> when it's no longer needed
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
 </td>
 </tr>
 </tbody>
@@ -744,14 +1022,19 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604636"></a><h3>
-<a name="itdb-write-file"></a>itdb_write_file ()</h3>
-<a class="indexterm" name="id2604646"></a><pre class="programlisting">gboolean            itdb_write_file                     (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         const gchar *filename,
-                                                         GError **error);</pre>
+<a name="id2830118"></a><h3>
+<a name="itdb-shuffle-write-file"></a>itdb_shuffle_write_file ()</h3>
+<a class="indexterm" name="id2830128"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_shuffle_write_file             (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Write the content of <em class="parameter"><code>itdb</code></em> to <em class="parameter"><code>filename</code></em>. If <em class="parameter"><code>filename</code></em> is NULL, it attempts
-to write to itdb-&gt;filename.</p>
+Do the actual writing to the iTunesSD</p>
 <p>
 
 </p>
@@ -759,23 +1042,26 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to save
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>       the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> filename to save <em class="parameter"><code>itdb</code></em> to
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   file to write to, cannot be NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE if all went well, FALSE otherwise
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
 </td>
 </tr>
 </tbody>
@@ -783,9 +1069,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604773"></a><h3>
+<a name="id2830241"></a><h3>
 <a name="itdb-duplicate"></a>itdb_duplicate ()</h3>
-<a class="indexterm" name="id2604784"></a><pre class="programlisting"><a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_duplicate                      (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2830252"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_duplicate                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Duplicate <em class="parameter"><code>itdb</code></em> 
 FIXME: not implemented yet</p>
@@ -796,12 +1082,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> always return NULL since it's unimplemented
 </td>
 </tr>
@@ -809,6 +1095,11 @@
 </table></div>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2830319"></a><div class="refsect2" lang="en"><a name="id2830320"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2830321"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Photo-database.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Photo-database.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Photo-database.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,11 +3,11 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Photo database</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="photodb.html" title="Part&#160;II.&#160;Photo database">
 <link rel="prev" href="photodb.html" title="Part&#160;II.&#160;Photo database">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -22,16 +22,16 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td>&#160;</td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2565700" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2806096" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2612420" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2844658" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Photo-database"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2565700"></a><span class="refentrytitle">Photo database</span>
+<a name="id2806096"></a><span class="refentrytitle">Photo database</span>
 </h2>
 <p>Photo database &#8212; Functions to create, read, write the photo database</p>
 </td>
@@ -43,49 +43,95 @@
 
 
 
-                    <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>;
-                    <a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>;
-<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a href="libgpod-Photo-database.html#itdb-photodb-add-photo">itdb_photodb_add_photo</a>              (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const gchar *filename,
-                                                         gint position,
-                                                         gint rotation,
-                                                         GError **error);
-<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data">itdb_photodb_add_photo_from_data</a>    (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const guchar *image_data,
-                                                         gsize image_data_len,
-                                                         gint position,
-                                                         gint rotation,
-                                                         GError **error);
-<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf">itdb_photodb_add_photo_from_pixbuf</a>  (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         gpointer pixbuf,
-                                                         gint position,
-                                                         gint rotation,
-                                                         GError **error);
-<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       <a href="libgpod-Photo-database.html#itdb-photodb-create">itdb_photodb_create</a>                 (const gchar *mountpoint);
-void                <a href="libgpod-Photo-database.html#itdb-photodb-free">itdb_photodb_free</a>                   (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb);
-<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       <a href="libgpod-Photo-database.html#itdb-photodb-parse">itdb_photodb_parse</a>                  (const gchar *mp,
-                                                         GError **error);
-void                <a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo">itdb_photodb_photoalbum_add_photo</a>   (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
-                                                         <a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo,
-                                                         gint position);
-<a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    <a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name">itdb_photodb_photoalbum_by_name</a>     (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const gchar *albumname);
-<a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    <a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-create">itdb_photodb_photoalbum_create</a>      (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const gchar *albumname,
-                                                         gint pos);
-void                <a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove">itdb_photodb_photoalbum_remove</a>      (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
-                                                         gboolean remove_pics);
-void                <a href="libgpod-Photo-database.html#itdb-photodb-remove-photo">itdb_photodb_remove_photo</a>           (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
-                                                         <a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo);
-gboolean            <a href="libgpod-Photo-database.html#itdb-photodb-write">itdb_photodb_write</a>                  (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb,
-                                                         GError **error);
+                    <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>;
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-create">itdb_photodb_create</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-free">itdb_photodb_free</a>                   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb);
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-parse">itdb_photodb_parse</a>                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Photo-database.html#itdb-photodb-write">itdb_photodb_write</a>                  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo">itdb_photodb_add_photo</a>              (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data">itdb_photodb_add_photo_from_data</a>    (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf">itdb_photodb_add_photo_from_pixbuf</a>  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-remove-photo">itdb_photodb_remove_photo</a>           (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo);
+                    <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>;
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-create">itdb_photodb_photoalbum_create</a>      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo">itdb_photodb_photoalbum_add_photo</a>   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position);
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name">itdb_photodb_photoalbum_by_name</a>     (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove">itdb_photodb_photoalbum_remove</a>      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> remove_pics);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2612420"></a><h2>Description</h2>
+<a name="id2844658"></a><h2>Description</h2>
 <p>
 These functions are for creating, reading, and writing the photo
 database.
@@ -94,104 +140,82 @@
 Overview of using the Photo database:
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-parse"><code class="function">itdb_photodb_parse()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-parse"><code class="function">itdb_photodb_parse()</code></a>:
 Read an existing PhotoDB.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-create"><code class="function">itdb_photodb_create()</code></a>:
-Create a new <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> structure. The Photo Library Album is
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-create"><code class="function">itdb_photodb_create()</code></a>:
+Create a new <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> structure. The Photo Library Album is
 (first album) is created automatically.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-add-photo"><code class="function">itdb_photodb_add_photo()</code></a>, <a href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"><code class="function">itdb_photodb_add_photo_from_data()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo"><code class="function">itdb_photodb_add_photo()</code></a>, <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"><code class="function">itdb_photodb_add_photo_from_data()</code></a>:
 Add a photo to the PhotoDB (from file or from a chunk of
 memory). It is automatically added to the Photo Library Album
 (first album), which is created if it does not exist already.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"><code class="function">itdb_photodb_photoalbum_create()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"><code class="function">itdb_photodb_photoalbum_create()</code></a>:
 Create and add a new photoalbum.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo"><code class="function">itdb_photodb_photoalbum_add_photo()</code></a>:
-Add a photo (<a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>) to an existing photoalbum.
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo"><code class="function">itdb_photodb_photoalbum_add_photo()</code></a>:
+Add a photo (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>) to an existing photoalbum.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove"><code class="function">itdb_photodb_photoalbum_remove()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove"><code class="function">itdb_photodb_photoalbum_remove()</code></a>:
 Remove an existing photoalbum. Pictures can be kept in the
 Photo Library or automatically removed as well.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-remove-photo"><code class="function">itdb_photodb_remove_photo()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-remove-photo"><code class="function">itdb_photodb_remove_photo()</code></a>:
 Remove a photo either from a photoalbum or completely from the database.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-write"><code class="function">itdb_photodb_write()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-write"><code class="function">itdb_photodb_write()</code></a>:
 Write out your PhotoDB.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-free"><code class="function">itdb_photodb_free()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-free"><code class="function">itdb_photodb_free()</code></a>:
 Free all memory taken by the PhotoDB.
 </p>
 <p>
-<a href="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name"><code class="function">itdb_photodb_photoalbum_by_name()</code></a>:
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name"><code class="function">itdb_photodb_photoalbum_by_name()</code></a>:
 Find the first photoalbum with a given name or the Photo
 Library Album if called with no name.
 </p>
 <p>
 If you cannot add photos because your iPod is not recognized,
 you may have to set the iPod model by calling
+<a class="link" href="libgpod-Device.html#itdb-device-set-sysinfo"><code class="function">itdb_device_set_sysinfo()</code></a>, e.g. for an 80 GB 6th generation
+iPod Video, you would use:
 </p>
+<pre class="programlisting">
+itdb_device_set_sysinfo (db-&gt;device, "ModelNumStr", "MA450");
+</pre>
 <p>
-itdb_device_set_sysinfo (db-&gt;device, "ModelNumStr", model);
-</p>
-<p>
-For example, "MA450" would stand for an 80 GB 6th generation iPod Video. See
-<a href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c" target="_top">itdb_device.c</a>
+See <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c" target="_top">itdb_device.c</a>
 for a list of supported models.
 </p>
 <p>
-This information will be written to the iPod when the PhotoDB is
-saved (<a href="libgpod-Device.html#itdb-device-write-sysinfo"><code class="function">itdb_device_write_sysinfo()</code></a> is called).
+The model number will be saved on the iPod when the PhotoDB is
+written (<a class="link" href="libgpod-Photo-database.html#itdb-photodb-write"><code class="function">itdb_photodb_write()</code></a> calls <a class="link" href="libgpod-Device.html#itdb-device-write-sysinfo"><code class="function">itdb_device_write_sysinfo()</code></a>).
 </p>
 <p>
-Have a look at the <a href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/test-photos.c" target="_top">test-photos</a>
-test program in the <a href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/" target="_top">tests/</a>
+Have a look at the <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/test-photos.c" target="_top">test-photos</a>
+test program in the <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/" target="_top">tests/</a>
 directory of the libgpod source for an example of how to use the interface.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2608144"></a><h2>Details</h2>
+<a name="id2856407"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2608155"></a><h3>
-<a name="Itdb-PhotoAlbum"></a>Itdb_PhotoAlbum</h3>
-<a class="indexterm" name="id2608167"></a><pre class="programlisting">typedef struct {
-    gchar *name;                 /* name of photoalbum in UTF8            */
-    GList *members;              /* photos in album (Itdb_Artwork *)      */
-    guint8 album_type;           /* 0x01 for master (Photo Library),
-				    0x02 otherwise (sometimes 4 and 5)    */
-    guint8 playmusic;            /* play music during slideshow (from
-				    iPhoto setting)                       */
-    guint8 repeat;               /* repeat the slideshow (from iPhoto
-				    setting)                              */
-    guint8 random;               /* show the slides in random order
-			            (from iPhoto setting)                 */
-    guint8 show_titles;          /* show slide captions (from iPhoto
-				    setting)                              */
-    guint8 transition_direction; /* 0=none, 1=left-to-right,
-				    2=right-to-left, 3=top-to-bottom,
-				    4=bottom-to-top (from iPhoto setting) */
-    gint32 slide_duration;       /* in seconds (from iPhoto setting)      */
-    gint32 transition_duration;  /* in milliseconds (from iPhoto setting) */
-    gint64 song_id;              /* dbid2 of track in iTunesDB to play
-				    during slideshow (from iPhoto setting)*/
-    gint32 unk024;               /* unknown, seems to be always 0         */
-    gint16 unk028;               /* unknown, seems to be always 0         */
-    gint32 unk044;               /* unknown, seems to always be 0         */
-    gint32 unk048;               /* unknown, seems to always be 0         */
-    /* set automatically at time of writing the PhotoDB */
-    gint32  album_id;
-    gint32  prev_album_id;
+<a name="id2856418"></a><h3>
+<a name="Itdb-PhotoDB"></a>Itdb_PhotoDB</h3>
+<a class="indexterm" name="id2856433"></a><pre class="programlisting">typedef struct {
+    GList *photos;
+    GList *photoalbums;
+    Itdb_Device *device;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -203,55 +227,159 @@
     /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
     ItdbUserDataDestroyFunc userdata_destroy;
-} Itdb_PhotoAlbum;
+} Itdb_PhotoDB;
 </pre>
 <p>
+Structure representing an iTunes Photo database</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>photos</code></em>;</span></p></td>
+<td>             A list of photos in the database (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>photoalbums</code></em>;</span></p></td>
+<td>        A list of albums in the database (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum"><span class="type">Itdb_PhotoAlbum</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>&#160;*<em class="structfield"><code>device</code></em>;</span></p></td>
+<td>             iPod device info (<a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2567883"></a><h3>
-<a name="Itdb-PhotoDB"></a>Itdb_PhotoDB</h3>
-<a class="indexterm" name="id2595939"></a><pre class="programlisting">typedef struct {
-    GList *photos;      /* (Itdb_Artwork *)     */
-    GList *photoalbums; /* (Itdb_PhotoAlbum *)  */
-    Itdb_Device *device;/* iPod device info     */
-    /* reserved for future use */
-    gint32 reserved_int1;
-    gint32 reserved_int2;
-    gpointer reserved1;
-    gpointer reserved2;
-    /* below is for use by application */
-    guint64 usertype;
-    gpointer userdata;
-    /* functions called to duplicate/free userdata */
-    ItdbUserDataDuplicateFunc userdata_duplicate;
-    ItdbUserDataDestroyFunc userdata_destroy;
-} Itdb_PhotoDB;
-</pre>
+<a name="id2856738"></a><h3>
+<a name="itdb-photodb-create"></a>itdb_photodb_create ()</h3>
+<a class="indexterm" name="id2856752"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       itdb_photodb_create                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
 <p>
+Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
+set it manually later by calling <a class="link" href="libgpod-Device.html#itdb-device-set-mountpoint"><code class="function">itdb_device_set_mountpoint()</code></a>.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> mountpoint or NULL.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly created Itdb_PhotoDB to be freed with
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-free"><code class="function">itdb_photodb_free()</code></a> when it's no longer needed. The Photo Library
+Album is created automatically.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.2
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597951"></a><h3>
-<a name="itdb-photodb-add-photo"></a>itdb_photodb_add_photo ()</h3>
-<a class="indexterm" name="id2608223"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo              (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const gchar *filename,
-                                                         gint position,
-                                                         gint rotation,
-                                                         GError **error);</pre>
+<a name="id2856842"></a><h3>
+<a name="itdb-photodb-free"></a>itdb_photodb_free ()</h3>
+<a class="indexterm" name="id2856857"></a><pre class="programlisting">void                itdb_photodb_free                   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb);</pre>
 <p>
-Add a photo to the PhotoDB. The photo is automatically added to the
-first Photoalbum, which by default contains a list of all photos in
-the database. If no Photoalbums exist one is created automatically.
+Free the memory taken by <em class="parameter"><code>photodb</code></em>.</p>
+<p>
+
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>photodb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2856927"></a><h3>
+<a name="itdb-photodb-parse"></a>itdb_photodb_parse ()</h3>
+<a class="indexterm" name="id2856941"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       itdb_photodb_parse                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</p>
+Parses the photo database of an iPod mounted at <em class="parameter"><code>mp</code></em>.</p>
 <p>
 
 </p>
@@ -259,50 +387,88 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to.
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     mountpoint of the iPod
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
-<td> file with the photo to add.
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  will contain the error description when an error occured.
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
-<td> position where to insert the new photo (-1 to append at
-the end)
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the imported PhotoDB or NULL in case of an error.
+
 </td>
 </tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2857039"></a><h3>
+<a name="itdb-photodb-write"></a>itdb_photodb_write ()</h3>
+<a class="indexterm" name="id2857053"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_photodb_write                  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Write out a PhotoDB.
+</p>
+<p>
+FIXME: error is not set yet.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></td>
-<td> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<td><p><span class="term"><em class="parameter"><code>photodb</code></em>&#160;:</span></p></td>
+<td>    the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to write to disk
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a pointer to the added photo.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2617875"></a><h3>
-<a name="itdb-photodb-add-photo-from-data"></a>itdb_photodb_add_photo_from_data ()</h3>
-<a class="indexterm" name="id2617885"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo_from_data    (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const guchar *image_data,
-                                                         gsize image_data_len,
-                                                         gint position,
-                                                         gint rotation,
-                                                         GError **error);</pre>
+<a name="id2857167"></a><h3>
+<a name="itdb-photodb-add-photo"></a>itdb_photodb_add_photo ()</h3>
+<a class="indexterm" name="id2857181"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo              (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Add a photo to the PhotoDB. The photo is automatically added to the
 first Photoalbum, which by default contains a list of all photos in
@@ -310,8 +476,8 @@
 </p>
 <p>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</p>
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
 <p>
 
 </p>
@@ -319,55 +485,65 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to.
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></td>
-<td> chunk of memory containing the image data (for example
-a jpg file)
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   path of the photo to add.
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></td>
-<td> length of above chunk of memory
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>   position where to insert the new photo (-1 to append
+             at the end)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
-<td> position where to insert the new photo (-1 to append at
-the end)
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></td>
-<td> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
-</td>
-</tr>
-<tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> a pointer to the added photo.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618062"></a><h3>
-<a name="itdb-photodb-add-photo-from-pixbuf"></a>itdb_photodb_add_photo_from_pixbuf ()</h3>
-<a class="indexterm" name="id2618075"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo_from_pixbuf  (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         gpointer pixbuf,
-                                                         gint position,
-                                                         gint rotation,
-                                                         GError **error);</pre>
+<a name="id2857398"></a><h3>
+<a name="itdb-photodb-add-photo-from-data"></a>itdb_photodb_add_photo_from_data ()</h3>
+<a class="indexterm" name="id2857413"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo_from_data    (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Add a photo to the PhotoDB. The photo is automatically added to the
 first Photoalbum, which by default contains a list of all photos in
@@ -375,8 +551,8 @@
 </p>
 <p>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</p>
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
 <p>
 
 </p>
@@ -384,134 +560,212 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to.
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>             the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
-<td> a <span class="type">GdkPixbuf</span> to use as the image data
+<td><p><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></p></td>
+<td>     chunk of memory containing the image data (for
+                 example a jpg file)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
-<td> position where to insert the new photo (-1 to append at
-the end)
+<td><p><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></p></td>
+<td> length of above chunk of memory
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></td>
-<td> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>       position where to insert the new photo (-1 to
+                 append at the end)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>          return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> a pointer to the added photo.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618236"></a><h3>
-<a name="itdb-photodb-create"></a>itdb_photodb_create ()</h3>
-<a class="indexterm" name="id2618247"></a><pre class="programlisting"><a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       itdb_photodb_create                 (const gchar *mountpoint);</pre>
+<a name="id2857654"></a><h3>
+<a name="itdb-photodb-add-photo-from-pixbuf"></a>itdb_photodb_add_photo_from_pixbuf ()</h3>
+<a class="indexterm" name="id2857669"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo_from_pixbuf  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
-Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
-set it manually later by calling <a href="libgpod-Device.html#itdb-device-set-mountpoint"><code class="function">itdb_device_set_mountpoint()</code></a>.</p>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</p>
 <p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
-<td> mountpoint or NULL.
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly created Itdb_PhotoDB to be freed with
-<a href="libgpod-Photo-database.html#itdb-photodb-free"><code class="function">itdb_photodb_free()</code></a> when it's no longer needed. The Photo Library
-Album is created automatically.
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td>
+<td>     a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> to use as the image data
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>   position where to insert the new photo (-1 to append
+             at the end)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the added photo.
+
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618322"></a><h3>
-<a name="itdb-photodb-free"></a>itdb_photodb_free ()</h3>
-<a class="indexterm" name="id2618332"></a><pre class="programlisting">void                itdb_photodb_free                   (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb);</pre>
+<a name="id2857893"></a><h3>
+<a name="itdb-photodb-remove-photo"></a>itdb_photodb_remove_photo ()</h3>
+<a class="indexterm" name="id2857907"></a><pre class="programlisting">void                itdb_photodb_remove_photo           (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo);</pre>
 <p>
-Free the memory taken by <em class="parameter"><code>photodb</code></em>.</p>
+Removes a photo. If <em class="parameter"><code>album</code></em> is not the first photoalbum, the photo
+will be removed from that album only. If <em class="parameter"><code>album</code></em> is NULL or the
+first photoalbum (Photo Library), the photo will be removed from
+all albums and the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a>.
+</p>
 <p>
-
 </p>
-<div class="variablelist"><table border="0">
-<col align="left" valign="top">
-<tbody><tr>
-<td><span class="term"><em class="parameter"><code>photodb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a>
-</td>
-</tr></tbody>
-</table></div>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+<em class="parameter"><code>photo</code></em> will be freed and can no longer be used if removed from the
+first photoalbum.
 </div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2618388"></a><h3>
-<a name="itdb-photodb-parse"></a>itdb_photodb_parse ()</h3>
-<a class="indexterm" name="id2618398"></a><pre class="programlisting"><a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       itdb_photodb_parse                  (const gchar *mp,
-                                                         GError **error);</pre>
 <p>
-Parses the photo database of an iPod mounted at <em class="parameter"><code>mp</code></em>.</p>
-<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
-<td> mountpoint of the iPod
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>     the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to remove the photo from
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> will contain the error description when an error occured.
+<td><p><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></p></td>
+<td>  the album to remove the photo from. If album is NULL, then
+         it will first be removed from all photoalbums and then
+         from the photo database as well.
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the imported PhotoDB or NULL in case of an error.
+<td><p><span class="term"><em class="parameter"><code>photo</code></em>&#160;:</span></p></td>
+<td>  <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> (photo) to remove.
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618479"></a><h3>
-<a name="itdb-photodb-photoalbum-add-photo"></a>itdb_photodb_photoalbum_add_photo ()</h3>
-<a class="indexterm" name="id2618492"></a><pre class="programlisting">void                itdb_photodb_photoalbum_add_photo   (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
-                                                         <a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo,
-                                                         gint position);</pre>
+<a name="id2858058"></a><h3>
+<a name="Itdb-PhotoAlbum"></a>Itdb_PhotoAlbum</h3>
+<a class="indexterm" name="id2858073"></a><pre class="programlisting">typedef struct {
+    Itdb_PhotoDB *photodb;
+    gchar *name;
+    GList *members;
+    guint8 album_type;
+    guint8 playmusic;
+    guint8 repeat;
+    guint8 random;
+    guint8 show_titles;
+    guint8 transition_direction;
+    gint32 slide_duration;
+    gint32 transition_duration;
+    gint64 song_id;
+    gint32 unk024;
+    gint16 unk028;
+    gint32 unk044;
+    gint32 unk048;
+    /* set automatically at time of writing the PhotoDB */
+    gint32  album_id;
+    gint32  prev_album_id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_PhotoAlbum;
+</pre>
 <p>
-Adds a photo already in the library to the specified album
-<em class="parameter"><code>album</code></em>. Photos are automatically added to the first album (Photo
-Library) when calling <a href="libgpod-Photo-database.html#itdb-photodb-add-photo"><code class="function">itdb_photodb_add_photo()</code></a> or
-<a href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"><code class="function">itdb_photodb_add_photo_from_data()</code></a>, so you don't have to use this
-function to add them there.</p>
+Structure representing an iTunes Photo Album</p>
 <p>
 
 </p>
@@ -519,71 +773,202 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to act on
+<td><p><span class="term"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>&#160;*<em class="structfield"><code>photodb</code></em>;</span></p></td>
+<td>              A pointer to the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> (for convenience)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum"><span class="type">Itdb_PhotoAlbum</span></a> to add the photo to
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>name</code></em>;</span></p></td>
+<td>                 The name of photoalbum in UTF8
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>photo</code></em>&#160;:</span></td>
-<td> a pointer to the photo (<a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>) to add to the album
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>members</code></em>;</span></p></td>
+<td>              A list of photos in album (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
-<td> position where to insert the new photo (-1 to append at
-the end)
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>album_type</code></em>;</span></p></td>
+<td>           The album type.  0x01 for master (Photo Library),
+                       0x02 for a normal album.  (4 and 5 have also been
+                       seen.)
 </td>
 </tr>
-</tbody>
-</table></div>
-</div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2618640"></a><h3>
-<a name="itdb-photodb-photoalbum-by-name"></a>itdb_photodb_photoalbum_by_name ()</h3>
-<a class="indexterm" name="id2618652"></a><pre class="programlisting"><a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    itdb_photodb_photoalbum_by_name     (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const gchar *albumname);</pre>
-<p>
-Find the first photoalbum with a given name or the Photo Library
-Album if called with no name.</p>
-<p>
-
-</p>
-<div class="variablelist"><table border="0">
-<col align="left" valign="top">
-<tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to retrieve the album from
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>playmusic</code></em>;</span></p></td>
+<td>            Play music during slideshow
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>albumname</code></em>&#160;:</span></td>
-<td> the name of the photoalbum to get or NULL for the
-master photoalbum.
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>repeat</code></em>;</span></p></td>
+<td>               Repeat the slideshow
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a pointer to the first photoalbum named <em class="parameter"><code>albumname</code></em>,
-else NULL
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>random</code></em>;</span></p></td>
+<td>               Show slides in random order
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>show_titles</code></em>;</span></p></td>
+<td>          Show slide captions
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>transition_direction</code></em>;</span></p></td>
+<td> Transition direction.  0=none, 1=left-to-right,
+                       2=right-to-left, 3=top-to-bottom, 4=bottom-to-top
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>slide_duration</code></em>;</span></p></td>
+<td>       Slide duration in seconds
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>transition_duration</code></em>;</span></p></td>
+<td>  Transition duration, in milliseconds
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
+>gint64</a>&#160;<em class="structfield"><code>song_id</code></em>;</span></p></td>
+<td>              The <em class="parameter"><code>dbid2</code></em> of a track to play during slideshow
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk024</code></em>;</span></p></td>
+<td>               Unknown, seems to be always 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"
+>gint16</a>&#160;<em class="structfield"><code>unk028</code></em>;</span></p></td>
+<td>               Unknown, seems to be always 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk044</code></em>;</span></p></td>
+<td>               Unknown, seems to always be 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk048</code></em>;</span></p></td>
+<td>               Unknown, seems to always be 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>album_id</code></em>;</span></p></td>
+<td>             The id of the album.  This is set automatically when
+                       the PhotoDB is written.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>prev_album_id</code></em>;</span></p></td>
+<td>        The id of the previous playlist.  This is set
+                       automatically when the PhotoDB is written.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>        Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>        Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>            Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>            Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>             For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>             For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td>   A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>     A function to free <span class="type">userdata</span>
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618742"></a><h3>
+<a name="id2859140"></a><h3>
 <a name="itdb-photodb-photoalbum-create"></a>itdb_photodb_photoalbum_create ()</h3>
-<a class="indexterm" name="id2618754"></a><pre class="programlisting"><a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    itdb_photodb_photoalbum_create      (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         const gchar *albumname,
-                                                         gint pos);</pre>
+<a class="indexterm" name="id2859154"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    itdb_photodb_photoalbum_create      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);</pre>
 <p>
 Create and add a new photoalbum.</p>
 <p>
@@ -593,121 +978,141 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> The database to create a new album in
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         The database to create a new album in
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>albumname</code></em>&#160;:</span></td>
-<td> the name of the new album
+<td><p><span class="term"><em class="parameter"><code>albumname</code></em>&#160;:</span></p></td>
+<td>  the name of the new album
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> position where to insert the newly created album (-1 for
-append to end).
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>        position where to insert the newly created album (-1
+             to append at the end).
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> the album which was created and added.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.2
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618850"></a><h3>
-<a name="itdb-photodb-photoalbum-remove"></a>itdb_photodb_photoalbum_remove ()</h3>
-<a class="indexterm" name="id2618862"></a><pre class="programlisting">void                itdb_photodb_photoalbum_remove      (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
-                                                         gboolean remove_pics);</pre>
+<a name="id2859258"></a><h3>
+<a name="itdb-photodb-photoalbum-add-photo"></a>itdb_photodb_photoalbum_add_photo ()</h3>
+<a class="indexterm" name="id2859273"></a><pre class="programlisting">void                itdb_photodb_photoalbum_add_photo   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position);</pre>
 <p>
-Remove <em class="parameter"><code>album</code></em> from the Photo Database. If remove_pics is TRUE,
-remove all photos contained in <em class="parameter"><code>album</code></em> from the Photo Database.
-</p>
+Adds a photo already in the library to the specified album
+<em class="parameter"><code>album</code></em>. Photos are automatically added to the first album (Photo
+Library) when calling <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo"><code class="function">itdb_photodb_add_photo()</code></a> or
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"><code class="function">itdb_photodb_add_photo_from_data()</code></a>, so you don't have to use this
+function to add them there.</p>
 <p>
-Memory used by the removed album will be freed and the album cannot
-be accessed any more.</p>
-<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to apply changes to
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to act on
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></td>
-<td> the album to be removed from the database
+<td><p><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></p></td>
+<td>      the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum"><span class="type">Itdb_PhotoAlbum</span></a> to add the photo to
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>remove_pics</code></em>&#160;:</span></td>
-<td> TRUE to remove pics in that album permanently from
-the database.
+<td><p><span class="term"><em class="parameter"><code>photo</code></em>&#160;:</span></p></td>
+<td>      a pointer to the photo (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>) to add to the
+             album
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>   position where to insert the new photo (-1 to append
+             at the end)
+</td>
+</tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.2
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2618970"></a><h3>
-<a name="itdb-photodb-remove-photo"></a>itdb_photodb_remove_photo ()</h3>
-<a class="indexterm" name="id2618981"></a><pre class="programlisting">void                itdb_photodb_remove_photo           (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
-                                                         <a href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
-                                                         <a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo);</pre>
+<a name="id2859429"></a><h3>
+<a name="itdb-photodb-photoalbum-by-name"></a>itdb_photodb_photoalbum_by_name ()</h3>
+<a class="indexterm" name="id2859443"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    itdb_photodb_photoalbum_by_name     (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname);</pre>
 <p>
-Remove photo. If <em class="parameter"><code>album</code></em> is not the first photoalbum, the photo will
-be removed from that album only. If <em class="parameter"><code>album</code></em> is NULL or the first
-photoalbum (Photo Library), the photo will be removed from all
-albums and the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a>.
-</p>
+Find the first photoalbum with a given name or the Photo Library
+Album if called with no name.</p>
 <p>
-<em class="parameter"><code>photo</code></em> will be freed and can no longer be used if removed from the
-first photoalbum.</p>
-<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to remove the photo from
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to retrieve the album from
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></td>
-<td> the album to remove the photo from. If album is NULL, then
-it will first be removed from all photoalbums and then from the
-photo database as well.
+<td><p><span class="term"><em class="parameter"><code>albumname</code></em>&#160;:</span></p></td>
+<td>  the name of the photoalbum to get or NULL for the
+             master photoalbum.
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>photo</code></em>&#160;:</span></td>
-<td> <a href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> (photo) to remove.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the first photoalbum named <em class="parameter"><code>albumname</code></em>,
+else NULL
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.2
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2619108"></a><h3>
-<a name="itdb-photodb-write"></a>itdb_photodb_write ()</h3>
-<a class="indexterm" name="id2619119"></a><pre class="programlisting">gboolean            itdb_photodb_write                  (<a href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb,
-                                                         GError **error);</pre>
+<a name="id2859539"></a><h3>
+<a name="itdb-photodb-photoalbum-remove"></a>itdb_photodb_photoalbum_remove ()</h3>
+<a class="indexterm" name="id2859553"></a><pre class="programlisting">void                itdb_photodb_photoalbum_remove      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> remove_pics);</pre>
 <p>
-Write out a PhotoDB.
+Remove <em class="parameter"><code>album</code></em> from the Photo Database. If <em class="parameter"><code>remove_pics</code></em> is TRUE,
+remove all photos contained in <em class="parameter"><code>album</code></em> from the Photo Database.
 </p>
 <p>
-FIXME: error is not set yet.</p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+Memory used by the removed album will be freed and the album cannot
+be accessed any more.
+</div>
 <p>
 
 </p>
@@ -715,25 +1120,32 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>photodb</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to write to disk
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>             the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to apply changes to
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></p></td>
+<td>          the album to be removed from the database
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
-set accordingly.
+<td><p><span class="term"><em class="parameter"><code>remove_pics</code></em>&#160;:</span></p></td>
+<td>    TRUE to remove pics in that album permanently
+                 from the database.
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.2
+</p>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2859676"></a><div class="refsect2" lang="en"><a name="id2859677"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2859678"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Playlists.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Playlists.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Playlists.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Playlists</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="ch01.html" title="iPod database components">
 <link rel="prev" href="libgpod-Tracks.html" title="Tracks">
 <link rel="next" href="libgpod-Smart-Playlists.html" title="Smart Playlists">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,16 +23,16 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="libgpod-Smart-Playlists.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2591319" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2798685" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2601642" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2786592" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Playlists"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2591319"></a><span class="refentrytitle">Playlists</span>
+<a name="id2798685"></a><span class="refentrytitle">Playlists</span>
 </h2>
 <p>Playlists &#8212; Data structure to represent an iPod playlist</p>
 </td>
@@ -44,47 +44,75 @@
 
 
 
-                    <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>;
-enum                <a href="libgpod-Playlists.html#ItdbPlaylistSortOrder">ItdbPlaylistSortOrder</a>;
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-new">itdb_playlist_new</a>                   (const gchar *title,
-                                                         gboolean spl);
-void                <a href="libgpod-Playlists.html#itdb-playlist-free">itdb_playlist_free</a>                  (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-duplicate">itdb_playlist_duplicate</a>             (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-void                <a href="libgpod-Playlists.html#itdb-playlist-add">itdb_playlist_add</a>                   (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         gint32 pos);
-void                <a href="libgpod-Playlists.html#itdb-playlist-move">itdb_playlist_move</a>                  (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         guint32 pos);
-void                <a href="libgpod-Playlists.html#itdb-playlist-remove">itdb_playlist_remove</a>                (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-void                <a href="libgpod-Playlists.html#itdb-playlist-unlink">itdb_playlist_unlink</a>                (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-void                <a href="libgpod-Playlists.html#itdb-playlist-add-track">itdb_playlist_add_track</a>             (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         gint32 pos);
-void                <a href="libgpod-Playlists.html#itdb-playlist-remove-track">itdb_playlist_remove_track</a>          (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-gboolean            <a href="libgpod-Playlists.html#itdb-playlist-contains-track">itdb_playlist_contains_track</a>        (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-guint32             <a href="libgpod-Playlists.html#itdb-playlist-contain-track-number">itdb_playlist_contain_track_number</a>  (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);
-guint32             <a href="libgpod-Playlists.html#itdb-playlist-tracks-number">itdb_playlist_tracks_number</a>         (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-mpl">itdb_playlist_mpl</a>                   (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-gboolean            <a href="libgpod-Playlists.html#itdb-playlist-is-mpl">itdb_playlist_is_mpl</a>                (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-void                <a href="libgpod-Playlists.html#itdb-playlist-set-mpl">itdb_playlist_set_mpl</a>               (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-podcasts">itdb_playlist_podcasts</a>              (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-gboolean            <a href="libgpod-Playlists.html#itdb-playlist-is-podcasts">itdb_playlist_is_podcasts</a>           (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-void                <a href="libgpod-Playlists.html#itdb-playlist-set-podcasts">itdb_playlist_set_podcasts</a>          (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-gboolean            <a href="libgpod-Playlists.html#itdb-playlist-exists">itdb_playlist_exists</a>                (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-by-id">itdb_playlist_by_id</a>                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         guint64 id);
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-by-nr">itdb_playlist_by_nr</a>                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         guint32 num);
-<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a href="libgpod-Playlists.html#itdb-playlist-by-name">itdb_playlist_by_name</a>               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         gchar *name);
-void                <a href="libgpod-Playlists.html#itdb-playlist-randomize">itdb_playlist_randomize</a>             (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+                    <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>;
+enum                <a class="link" href="libgpod-Playlists.html#ItdbPlaylistSortOrder">ItdbPlaylistSortOrder</a>;
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-new">itdb_playlist_new</a>                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *title,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> spl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-free">itdb_playlist_free</a>                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-duplicate">itdb_playlist_duplicate</a>             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-add">itdb_playlist_add</a>                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-move">itdb_playlist_move</a>                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> pos);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-remove">itdb_playlist_remove</a>                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-unlink">itdb_playlist_unlink</a>                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-add-track">itdb_playlist_add_track</a>             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-remove-track">itdb_playlist_remove_track</a>          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-contains-track">itdb_playlist_contains_track</a>        (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-Playlists.html#itdb-playlist-contain-track-number">itdb_playlist_contain_track_number</a>  (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-Playlists.html#itdb-playlist-tracks-number">itdb_playlist_tracks_number</a>         (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-mpl">itdb_playlist_mpl</a>                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-is-mpl">itdb_playlist_is_mpl</a>                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-set-mpl">itdb_playlist_set_mpl</a>               (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-podcasts">itdb_playlist_podcasts</a>              (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-is-podcasts">itdb_playlist_is_podcasts</a>           (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-set-podcasts">itdb_playlist_set_podcasts</a>          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-exists">itdb_playlist_exists</a>                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-by-id">itdb_playlist_by_id</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a> id);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-by-nr">itdb_playlist_by_nr</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> num);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-by-name">itdb_playlist_by_name</a>               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *name);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-randomize">itdb_playlist_randomize</a>             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2601642"></a><h2>Description</h2>
+<a name="id2786592"></a><h2>Description</h2>
 <p>
 These functions and structures allow for adding and removing playlists,
 adding and removing tracks from playlists, sorting playlists, finding tracks in
@@ -92,28 +120,28 @@
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2601660"></a><h2>Details</h2>
+<a name="id2786610"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2601671"></a><h3>
+<a name="id2786621"></a><h3>
 <a name="Itdb-Playlist"></a>Itdb_Playlist</h3>
-<a class="indexterm" name="id2601684"></a><pre class="programlisting">typedef struct {
-    Itdb_iTunesDB *itdb;  /* pointer to iTunesDB (for convenience) */
-    gchar *name;          /* name of playlist in UTF8              */
-    guint8 type;          /* ITDB_PL_TYPE_NORM/_MPL                */
-    guint8 flag1;         /* unknown, usually set to 0             */
-    guint8 flag2;         /* unknown, always set to 0              */
-    guint8 flag3;         /* unknown, always set to 0              */
-    gint  num;            /* number of tracks in playlist          */
-    GList *members;       /* tracks in playlist (Track *)          */
-    gboolean is_spl;      /* smart playlist?                       */
-    time_t timestamp;     /* timestamp of playlist creation        */
-    guint64 id;           /* playlist ID                           */
-    guint32 sortorder;    /* How to sort playlist -- see below     */
-    guint32 podcastflag;  /* ITDB_PL_FLAG_NORM/_PODCAST            */
-    Itdb_SPLPref splpref;      /* smart playlist prefs                  */
-    Itdb_SPLRules splrules;    /* rules for smart playlists             */
-    gpointer reserved100; /* reserved for MHOD100 implementation   */
-    gpointer reserved101; /* reserved for MHOD100 implementation   */
+<a class="indexterm" name="id2786633"></a><pre class="programlisting">typedef struct {
+    Itdb_iTunesDB *itdb;
+    gchar *name;
+    guint8 type;
+    guint8 flag1;
+    guint8 flag2;
+    guint8 flag3;
+    gint  num;
+    GList *members;
+    gboolean is_spl;
+    time_t timestamp;
+    guint64 id;
+    guint32 sortorder;
+    guint32 podcastflag;
+    Itdb_SPLPref splpref;
+    Itdb_SPLRules splrules;
+    gpointer reserved100;
+    gpointer reserved101;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -128,14 +156,190 @@
 } Itdb_Playlist;
 </pre>
 <p>
+Structure representing an iTunes Playlist</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>&#160;*<em class="structfield"><code>itdb</code></em>;</span></p></td>
+<td>               A pointer to the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> (for convenience)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>name</code></em>;</span></p></td>
+<td>               The name of the playlist in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>type</code></em>;</span></p></td>
+<td>               The playlist type (normal or master)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag1</code></em>;</span></p></td>
+<td>              Unknown, usually set to 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag2</code></em>;</span></p></td>
+<td>              Unknown, always set to 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag3</code></em>;</span></p></td>
+<td>              Unknown, always set to 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>num</code></em>;</span></p></td>
+<td>                The number of tracks in the playlist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>members</code></em>;</span></p></td>
+<td>            A list of tracks in the playlist (<a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>is_spl</code></em>;</span></p></td>
+<td>             True if the playlist is a smart playlist, otherwise
+                     false
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>timestamp</code></em>;</span></p></td>
+<td>          When the playlist was created
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                 The playlist ID
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>sortorder</code></em>;</span></p></td>
+<td>          The playlist sort order (<a class="link" href="libgpod-Playlists.html#ItdbPlaylistSortOrder"><span class="type">ItdbPlaylistSortOrder</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>podcastflag</code></em>;</span></p></td>
+<td>        This is set to 0 on normal playlists and to 1 for the
+                     Podcast playlist. If set to 1, the playlist will not be
+                     shown under 'Playlists' on the iPod, but as 'Podcasts'
+                     under the Music menu. The actual title of the Playlist
+                     does not matter. If more than one playlist is set to 1,
+                     they don't show up at all.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLPref">Itdb_SPLPref</a>&#160;<em class="structfield"><code>splpref</code></em>;</span></p></td>
+<td>            Smart playlist preferences (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLPref"><span class="type">Itdb_SPLPref</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRules">Itdb_SPLRules</a>&#160;<em class="structfield"><code>splrules</code></em>;</span></p></td>
+<td>           Smart playlist rules (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRules"><span class="type">Itdb_SPLRules</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved100</code></em>;</span></p></td>
+<td>        Reserved for MHOD100 implementation
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved101</code></em>;</span></p></td>
+<td>        Reserved for MHOD100 implementation
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2580316"></a><h3>
+<a name="id2832173"></a><h3>
 <a name="ItdbPlaylistSortOrder"></a>enum ItdbPlaylistSortOrder</h3>
-<a class="indexterm" name="id2582485"></a><pre class="programlisting">typedef enum
+<a class="indexterm" name="id2832186"></a><pre class="programlisting">typedef enum
 {
     ITDB_PSO_MANUAL = 1,
 /*    ITDB_PSO_UNKNOWN = 2, */
@@ -168,19 +372,162 @@
 } ItdbPlaylistSortOrder;
 </pre>
 <p>
+Playlist Sort Order</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-MANUAL:CAPS"></a><code class="literal">ITDB_PSO_MANUAL</code></span></p></td>
+<td>        Sort by playlist order (manual sort)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TITLE:CAPS"></a><code class="literal">ITDB_PSO_TITLE</code></span></p></td>
+<td>         Sort by track title
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-ALBUM:CAPS"></a><code class="literal">ITDB_PSO_ALBUM</code></span></p></td>
+<td>         Sort by album
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-ARTIST:CAPS"></a><code class="literal">ITDB_PSO_ARTIST</code></span></p></td>
+<td>        Sort by artist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-BIRATE:CAPS"></a><code class="literal">ITDB_PSO_BIRATE</code></span></p></td>
+<td>        Sort by bitrate
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-GENRE:CAPS"></a><code class="literal">ITDB_PSO_GENRE</code></span></p></td>
+<td>         Sort by genre
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-FILETYPE:CAPS"></a><code class="literal">ITDB_PSO_FILETYPE</code></span></p></td>
+<td>      Sort by filetype
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME-MODIFIED:CAPS"></a><code class="literal">ITDB_PSO_TIME_MODIFIED</code></span></p></td>
+<td> Sort by date modified
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TRACK-NR:CAPS"></a><code class="literal">ITDB_PSO_TRACK_NR</code></span></p></td>
+<td>      Sort by track number
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-SIZE:CAPS"></a><code class="literal">ITDB_PSO_SIZE</code></span></p></td>
+<td>          Sort by track size
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME:CAPS"></a><code class="literal">ITDB_PSO_TIME</code></span></p></td>
+<td>          Sort by track time
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-YEAR:CAPS"></a><code class="literal">ITDB_PSO_YEAR</code></span></p></td>
+<td>          Sort by year
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-SAMPLERATE:CAPS"></a><code class="literal">ITDB_PSO_SAMPLERATE</code></span></p></td>
+<td>    Sort by samplerate
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-COMMENT:CAPS"></a><code class="literal">ITDB_PSO_COMMENT</code></span></p></td>
+<td>       Sort by comments
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME-ADDED:CAPS"></a><code class="literal">ITDB_PSO_TIME_ADDED</code></span></p></td>
+<td>    Sort by date added
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-EQUALIZER:CAPS"></a><code class="literal">ITDB_PSO_EQUALIZER</code></span></p></td>
+<td>     Sort by equilizer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-COMPOSER:CAPS"></a><code class="literal">ITDB_PSO_COMPOSER</code></span></p></td>
+<td>      Sort by composer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-PLAYCOUNT:CAPS"></a><code class="literal">ITDB_PSO_PLAYCOUNT</code></span></p></td>
+<td>     Sort by playcount
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME-PLAYED:CAPS"></a><code class="literal">ITDB_PSO_TIME_PLAYED</code></span></p></td>
+<td>   Sort by date last played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-CD-NR:CAPS"></a><code class="literal">ITDB_PSO_CD_NR</code></span></p></td>
+<td>         Sort by disc number
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-RATING:CAPS"></a><code class="literal">ITDB_PSO_RATING</code></span></p></td>
+<td>        Sort by rating
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-RELEASE-DATE:CAPS"></a><code class="literal">ITDB_PSO_RELEASE_DATE</code></span></p></td>
+<td>  Sort by release date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-BPM:CAPS"></a><code class="literal">ITDB_PSO_BPM</code></span></p></td>
+<td>           Sort by beats per minute
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-GROUPING:CAPS"></a><code class="literal">ITDB_PSO_GROUPING</code></span></p></td>
+<td>      Sort by grouping
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-CATEGORY:CAPS"></a><code class="literal">ITDB_PSO_CATEGORY</code></span></p></td>
+<td>      Sort by category
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-DESCRIPTION:CAPS"></a><code class="literal">ITDB_PSO_DESCRIPTION</code></span></p></td>
+<td>   Sort by description
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.3
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2591832"></a><h3>
+<a name="id2832781"></a><h3>
 <a name="itdb-playlist-new"></a>itdb_playlist_new ()</h3>
-<a class="indexterm" name="id2559650"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_new                   (const gchar *title,
-                                                         gboolean spl);</pre>
+<a class="indexterm" name="id2832793"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_new                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *title,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> spl);</pre>
 <p>
-Creates a new playlist. If <em class="parameter"><code>spl</code></em> is TRUE, a smart
-playlist is generated. pl-&gt;id is set by <a href="libgpod-Playlists.html#itdb-playlist-add"><code class="function">itdb_playlist_add()</code></a> when the 
-playlist is added to an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a></p>
+Creates a new playlist. If <em class="parameter"><code>spl</code></em> is TRUE, a smart playlist is
+generated. pl-&gt;id is set by <a class="link" href="libgpod-Playlists.html#itdb-playlist-add"><code class="function">itdb_playlist_add()</code></a> when the playlist
+is added to an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a></p>
 <p>
 
 </p>
@@ -188,19 +535,19 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></td>
-<td> playlist title
+<td><p><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></p></td>
+<td>  playlist title
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></td>
-<td> smart playlist flag
+<td><p><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></p></td>
+<td>    smart playlist flag
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a new <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> which must be freed with 
-<a href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a> after use
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> which must be freed with
+<a class="link" href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a> after use
 </td>
 </tr>
 </tbody>
@@ -208,9 +555,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2559769"></a><h3>
+<a name="id2832914"></a><h3>
 <a name="itdb-playlist-free"></a>itdb_playlist_free ()</h3>
-<a class="indexterm" name="id2559782"></a><pre class="programlisting">void                itdb_playlist_free                  (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2832926"></a><pre class="programlisting">void                itdb_playlist_free                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Frees the memory used by playlist <em class="parameter"><code>pl</code></em>.</p>
 <p>
@@ -219,21 +566,22 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2559844"></a><h3>
+<a name="id2832990"></a><h3>
 <a name="itdb-playlist-duplicate"></a>itdb_playlist_duplicate ()</h3>
-<a class="indexterm" name="id2559856"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_duplicate             (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2833001"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_duplicate             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
-Duplicates an existing playlist. pl_dup-&gt;id is set to zero, so that
-it will be set to a unique value when adding it to an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>. The
-returned playlist won't be associated with an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>.</p>
+Duplicates an existing playlist. <em class="parameter"><code>pl_dup-&gt;id</code></em> is set to zero, so
+that it will be set to a unique value when adding it to an
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>. The returned playlist won't be associated with an
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>.</p>
 <p>
 
 </p>
@@ -241,14 +589,14 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly allocated <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> that you'll have to free
-with <a href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a> when you no longer need it. 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> that you'll have to
+free with <a class="link" href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a> when you no longer need it.
 </td>
 </tr>
 </tbody>
@@ -256,16 +604,19 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608512"></a><h3>
+<a name="id2833109"></a><h3>
 <a name="itdb-playlist-add"></a>itdb_playlist_add ()</h3>
-<a class="indexterm" name="id2608522"></a><pre class="programlisting">void                itdb_playlist_add                   (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         gint32 pos);</pre>
+<a class="indexterm" name="id2833122"></a><pre class="programlisting">void                itdb_playlist_add                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);</pre>
 <p>
 Adds playlist <em class="parameter"><code>pl</code></em> to the database <em class="parameter"><code>itdb</code></em> at position <em class="parameter"><code>pos</code></em> (-1 for
-"append to end"). A unique id is created if pl-&gt;id is equal to
-zero. After calling this function, <em class="parameter"><code>itdb</code></em> manages the memory of <em class="parameter"><code>pl</code></em>, which
-means you no longer need to explicitly call <a href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a></p>
+"append to end"). A unique id is created if <em class="parameter"><code>pl-&gt;id</code></em> is equal to
+zero. After calling this function, <em class="parameter"><code>itdb</code></em> manages the memory of <em class="parameter"><code>pl</code></em>,
+which means you no longer need to explicitly call
+<a class="link" href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a></p>
 <p>
 
 </p>
@@ -273,18 +624,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> position to insert <em class="parameter"><code>pl</code></em> at
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position to insert <em class="parameter"><code>pl</code></em> at
 </td>
 </tr>
 </tbody>
@@ -292,10 +643,12 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608658"></a><h3>
+<a name="id2833281"></a><h3>
 <a name="itdb-playlist-move"></a>itdb_playlist_move ()</h3>
-<a class="indexterm" name="id2608668"></a><pre class="programlisting">void                itdb_playlist_move                  (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         guint32 pos);</pre>
+<a class="indexterm" name="id2833293"></a><pre class="programlisting">void                itdb_playlist_move                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> pos);</pre>
 <p>
 Moves playlist <em class="parameter"><code>pl</code></em> to position <em class="parameter"><code>pos</code></em></p>
 <p>
@@ -305,13 +658,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> new position
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    new position
 </td>
 </tr>
 </tbody>
@@ -319,11 +672,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608747"></a><h3>
+<a name="id2833383"></a><h3>
 <a name="itdb-playlist-remove"></a>itdb_playlist_remove ()</h3>
-<a class="indexterm" name="id2608757"></a><pre class="programlisting">void                itdb_playlist_remove                (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2833394"></a><pre class="programlisting">void                itdb_playlist_remove                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
-Removes <em class="parameter"><code>pl</code></em> from the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with 
+Removes <em class="parameter"><code>pl</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with
 and frees memory</p>
 <p>
 
@@ -331,42 +684,43 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608819"></a><h3>
+<a name="id2833464"></a><h3>
 <a name="itdb-playlist-unlink"></a>itdb_playlist_unlink ()</h3>
-<a class="indexterm" name="id2608830"></a><pre class="programlisting">void                itdb_playlist_unlink                (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2833475"></a><pre class="programlisting">void                itdb_playlist_unlink                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
-Remove <em class="parameter"><code>pl</code></em> from the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with but do not free 
-memory. pl-&gt;itdb is set to NULL after this function returns</p>
+Remove <em class="parameter"><code>pl</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with but do not
+free memory. <em class="parameter"><code>pl-&gt;itdb</code></em> is set to NULL after this function returns</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608893"></a><h3>
+<a name="id2833552"></a><h3>
 <a name="itdb-playlist-add-track"></a>itdb_playlist_add_track ()</h3>
-<a class="indexterm" name="id2608903"></a><pre class="programlisting">void                itdb_playlist_add_track             (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         gint32 pos);</pre>
+<a class="indexterm" name="id2833563"></a><pre class="programlisting">void                itdb_playlist_add_track             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);</pre>
 <p>
-Adds <em class="parameter"><code>track</code></em> to <em class="parameter"><code>pl</code></em> at position <em class="parameter"><code>pos</code></em> (-1 for "append to
-end")</p>
+Adds <em class="parameter"><code>track</code></em> to <em class="parameter"><code>pl</code></em> at position <em class="parameter"><code>pos</code></em> (-1 to append at the end)</p>
 <p>
 
 </p>
@@ -374,18 +728,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> position to insert <em class="parameter"><code>track</code></em> at
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position to insert <em class="parameter"><code>track</code></em> at
 </td>
 </tr>
 </tbody>
@@ -393,15 +747,15 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609019"></a><h3>
+<a name="id2840036"></a><h3>
 <a name="itdb-playlist-remove-track"></a>itdb_playlist_remove_track ()</h3>
-<a class="indexterm" name="id2609029"></a><pre class="programlisting">void                itdb_playlist_remove_track          (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2840046"></a><pre class="programlisting">void                itdb_playlist_remove_track          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
 Removes <em class="parameter"><code>track</code></em> from <em class="parameter"><code>pl</code></em>. If <em class="parameter"><code>pl</code></em> is NULL, removes <em class="parameter"><code>track</code></em> from the
-master playlist. If <em class="parameter"><code>track</code></em> can't be found in <em class="parameter"><code>pl</code></em>, nothing happens. If after
-removing <em class="parameter"><code>track</code></em>, <em class="parameter"><code>pl</code></em> is empty, it's not removed from the database
-The memory used by <em class="parameter"><code>track</code></em> isn't freed.</p>
+master playlist. If <em class="parameter"><code>track</code></em> can't be found in <em class="parameter"><code>pl</code></em>, nothing happens.
+If after removing <em class="parameter"><code>track</code></em>, <em class="parameter"><code>pl</code></em> is empty, it's not removed from the
+database The memory used by <em class="parameter"><code>track</code></em> isn't freed.</p>
 <p>
 
 </p>
@@ -409,13 +763,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 </tbody>
@@ -423,12 +777,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609153"></a><h3>
+<a name="id2840172"></a><h3>
 <a name="itdb-playlist-contains-track"></a>itdb_playlist_contains_track ()</h3>
-<a class="indexterm" name="id2609165"></a><pre class="programlisting">gboolean            itdb_playlist_contains_track        (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2840184"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_contains_track        (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
-Checks if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em>.</p>
+Checks if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em></p>
 <p>
 
 </p>
@@ -436,17 +792,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em>, FALSE otherwise
 </td>
 </tr>
@@ -455,12 +811,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609271"></a><h3>
+<a name="id2840289"></a><h3>
 <a name="itdb-playlist-contain-track-number"></a>itdb_playlist_contain_track_number ()</h3>
-<a class="indexterm" name="id2609284"></a><pre class="programlisting">guint32             itdb_playlist_contain_track_number  (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);</pre>
+<a class="indexterm" name="id2840303"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_playlist_contain_track_number  (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);</pre>
 <p>
-Counts the number of playlist <em class="parameter"><code>track</code></em> is a member of (not including the 
-master playlist)</p>
+Counts the number of playlist <em class="parameter"><code>track</code></em> is a member of (not including
+the master playlist)</p>
 <p>
 
 </p>
@@ -468,13 +826,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> number of playlist containing <em class="parameter"><code>track</code></em>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of playlist containing <em class="parameter"><code>track</code></em>
 </td>
 </tr>
 </tbody>
@@ -482,9 +840,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609356"></a><h3>
+<a name="id2840375"></a><h3>
 <a name="itdb-playlist-tracks-number"></a>itdb_playlist_tracks_number ()</h3>
-<a class="indexterm" name="id2609367"></a><pre class="programlisting">guint32             itdb_playlist_tracks_number         (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2840386"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_playlist_tracks_number         (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Counts the number of tracks in <em class="parameter"><code>pl</code></em></p>
 <p>
@@ -494,13 +854,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> track count
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of tracks in <em class="parameter"><code>pl</code></em>
 </td>
 </tr>
 </tbody>
@@ -508,9 +868,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609432"></a><h3>
+<a name="id2840456"></a><h3>
 <a name="itdb-playlist-mpl"></a>itdb_playlist_mpl ()</h3>
-<a class="indexterm" name="id2609442"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_mpl                   (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2840466"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_mpl                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Gets the master playlist of <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -520,13 +880,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the master playlist of <em class="parameter"><code>itdb</code></em> 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the master playlist of <em class="parameter"><code>itdb</code></em>
 </td>
 </tr>
 </tbody>
@@ -534,9 +894,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609512"></a><h3>
+<a name="id2840536"></a><h3>
 <a name="itdb-playlist-is-mpl"></a>itdb_playlist_is_mpl ()</h3>
-<a class="indexterm" name="id2609522"></a><pre class="programlisting">gboolean            itdb_playlist_is_mpl                (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2840548"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_is_mpl                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Checks if <em class="parameter"><code>pl</code></em> is the master playlist</p>
 <p>
@@ -546,23 +908,26 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE if <em class="parameter"><code>pl</code></em> is the master playlist, FALSE otherwise 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>pl</code></em> is the master playlist, FALSE otherwise
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.1.6
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609593"></a><h3>
+<a name="id2840625"></a><h3>
 <a name="itdb-playlist-set-mpl"></a>itdb_playlist_set_mpl ()</h3>
-<a class="indexterm" name="id2609604"></a><pre class="programlisting">void                itdb_playlist_set_mpl               (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2840638"></a><pre class="programlisting">void                itdb_playlist_set_mpl               (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Sets <em class="parameter"><code>pl</code></em> to be a master playlist</p>
 <p>
@@ -571,17 +936,19 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.2.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609659"></a><h3>
+<a name="id2840699"></a><h3>
 <a name="itdb-playlist-podcasts"></a>itdb_playlist_podcasts ()</h3>
-<a class="indexterm" name="id2609669"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_podcasts              (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2840712"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_podcasts              (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Gets the podcasts playlist of <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -591,23 +958,29 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the podcasts playlist of <em class="parameter"><code>itdb</code></em>, or NULL if it's there is none
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the podcasts playlist of <em class="parameter"><code>itdb</code></em>, or NULL if there is
+not one
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.1.6
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609740"></a><h3>
+<a name="id2840788"></a><h3>
 <a name="itdb-playlist-is-podcasts"></a>itdb_playlist_is_podcasts ()</h3>
-<a class="indexterm" name="id2609751"></a><pre class="programlisting">gboolean            itdb_playlist_is_podcasts           (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2840801"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_is_podcasts           (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Checks if <em class="parameter"><code>pl</code></em> is the podcasts playlist</p>
 <p>
@@ -617,23 +990,26 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE if <em class="parameter"><code>pl</code></em> is the podcasts playlist, FALSE otherwise 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>pl</code></em> is the podcasts playlist, FALSE otherwise
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.1.6
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609822"></a><h3>
+<a name="id2840879"></a><h3>
 <a name="itdb-playlist-set-podcasts"></a>itdb_playlist_set_podcasts ()</h3>
-<a class="indexterm" name="id2609833"></a><pre class="programlisting">void                itdb_playlist_set_podcasts          (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2840892"></a><pre class="programlisting">void                itdb_playlist_set_podcasts          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Set <em class="parameter"><code>pl</code></em> to be a podcasts playlist</p>
 <p>
@@ -642,20 +1018,24 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.2.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2609888"></a><h3>
+<a name="id2840953"></a><h3>
 <a name="itdb-playlist-exists"></a>itdb_playlist_exists ()</h3>
-<a class="indexterm" name="id2609899"></a><pre class="programlisting">gboolean            itdb_playlist_exists                (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2840964"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_exists                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
-Checks if <em class="parameter"><code>pl</code></em> is present in <em class="parameter"><code>db</code></em></p>
+Checks if <em class="parameter"><code>pl</code></em> is present in <em class="parameter"><code>itdb</code></em></p>
 <p>
 
 </p>
@@ -663,18 +1043,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> TRUE if <em class="parameter"><code>pl</code></em> exists in <em class="parameter"><code>db</code></em>, FALSE otherwise 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>pl</code></em> exists in <em class="parameter"><code>itdb</code></em>, FALSE otherwise
 </td>
 </tr>
 </tbody>
@@ -682,10 +1062,12 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610004"></a><h3>
+<a name="id2841068"></a><h3>
 <a name="itdb-playlist-by-id"></a>itdb_playlist_by_id ()</h3>
-<a class="indexterm" name="id2610014"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_id                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         guint64 id);</pre>
+<a class="indexterm" name="id2841079"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_id                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a> id);</pre>
 <p>
 Looks up a playlist whose ID is <em class="parameter"><code>id</code></em></p>
 <p>
@@ -695,19 +1077,19 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
-<td> ID of the playlist to look for
+<td><p><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></p></td>
+<td>     ID of the playlist to look for
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> with ID <em class="parameter"><code>id</code></em> or NULL if there is no such
-playlist.
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> with ID <em class="parameter"><code>id</code></em> or NULL if there is no
+such playlist.
 </td>
 </tr>
 </tbody>
@@ -715,10 +1097,12 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610111"></a><h3>
+<a name="id2841176"></a><h3>
 <a name="itdb-playlist-by-nr"></a>itdb_playlist_by_nr ()</h3>
-<a class="indexterm" name="id2610121"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_nr                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         guint32 num);</pre>
+<a class="indexterm" name="id2841186"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_nr                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> num);</pre>
 <p>
 Gets the playlist at the given position in <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -728,18 +1112,19 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>num</code></em>&#160;:</span></td>
-<td> the position of the playlist, counting from 0
+<td><p><span class="term"><em class="parameter"><code>num</code></em>&#160;:</span></p></td>
+<td>    the position of the playlist, counting from 0
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>, or NULL if there is no playlist at <em class="parameter"><code>pos</code></em>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>, or NULL if there is no playlist
+at <em class="parameter"><code>pos</code></em>
 </td>
 </tr>
 </tbody>
@@ -747,10 +1132,12 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610218"></a><h3>
+<a name="id2841283"></a><h3>
 <a name="itdb-playlist-by-name"></a>itdb_playlist_by_name ()</h3>
-<a class="indexterm" name="id2610228"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_name               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         gchar *name);</pre>
+<a class="indexterm" name="id2841293"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_name               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *name);</pre>
 <p>
 Searches a playlist whose name is <em class="parameter"><code>name</code></em> in <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -760,19 +1147,19 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
-<td> name of the playlist to look for
+<td><p><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></p></td>
+<td>   name of the playlist to look for
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the first <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> with name <em class="parameter"><code>name</code></em>, NULL if there is no
-such playlist
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the first <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> with name <em class="parameter"><code>name</code></em>, NULL if
+there is no such playlist
 </td>
 </tr>
 </tbody>
@@ -780,9 +1167,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610330"></a><h3>
+<a name="id2841395"></a><h3>
 <a name="itdb-playlist-randomize"></a>itdb_playlist_randomize ()</h3>
-<a class="indexterm" name="id2610341"></a><pre class="programlisting">void                itdb_playlist_randomize             (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id2841406"></a><pre class="programlisting">void                itdb_playlist_randomize             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Randomizes <em class="parameter"><code>pl</code></em></p>
 <p>
@@ -791,13 +1178,18 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> to randomize
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> to randomize
 </td>
 </tr></tbody>
 </table></div>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2841461"></a><div class="refsect2" lang="en"><a name="id2841462"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2841463"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Smart-Playlists.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Smart-Playlists.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Smart-Playlists.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Smart Playlists</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="ch01.html" title="iPod database components">
 <link rel="prev" href="libgpod-Playlists.html" title="Playlists">
 <link rel="next" href="libgpod-Artwork.html" title="Artwork">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,16 +23,16 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="libgpod-Artwork.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2556657" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2825385" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2599424" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2809307" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Smart-Playlists"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2556657"></a><span class="refentrytitle">Smart Playlists</span>
+<a name="id2825385"></a><span class="refentrytitle">Smart Playlists</span>
 </h2>
 <p>Smart Playlists &#8212; Data structure to represent an iPod smart playlist</p>
 </td>
@@ -44,61 +44,64 @@
 
 
 
-                    <a href="libgpod-Smart-Playlists.html#Itdb-SPLPref">Itdb_SPLPref</a>;
-                    <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>;
-                    <a href="libgpod-Smart-Playlists.html#Itdb-SPLRules">Itdb_SPLRules</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbLimitSort">ItdbLimitSort</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbLimitType">ItdbLimitType</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbSPLAction">ItdbSPLAction</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbSPLActionLast">ItdbSPLActionLast</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbSPLField">ItdbSPLField</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>;
-enum                <a href="libgpod-Smart-Playlists.html#ItdbSPLMatch">ItdbSPLMatch</a>;
-#define             <a href="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS">ITDB_SPL_DATE_IDENTIFIER</a>
-#define             <a href="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS">ITDB_SPL_STRING_MAXLEN</a>
-<a href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>    <a href="libgpod-Smart-Playlists.html#itdb-splr-get-field-type">itdb_splr_get_field_type</a>            (const <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
-<a href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>   <a href="libgpod-Smart-Playlists.html#itdb-splr-get-action-type">itdb_splr_get_action_type</a>           (const <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
-void                <a href="libgpod-Smart-Playlists.html#itdb-splr-validate">itdb_splr_validate</a>                  (<a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
-void                <a href="libgpod-Smart-Playlists.html#itdb-splr-remove">itdb_splr_remove</a>                    (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
-<a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       <a href="libgpod-Smart-Playlists.html#itdb-splr-new">itdb_splr_new</a>                       (void);
-void                <a href="libgpod-Smart-Playlists.html#itdb-splr-add">itdb_splr_add</a>                       (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
-                                                         gint pos);
-<a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       <a href="libgpod-Smart-Playlists.html#itdb-splr-add-new">itdb_splr_add_new</a>                   (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         gint pos);
-void                <a href="libgpod-Smart-Playlists.html#itdb-spl-copy-rules">itdb_spl_copy_rules</a>                 (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *dest,
-                                                         <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *src);
-gboolean            <a href="libgpod-Smart-Playlists.html#itdb-splr-eval">itdb_splr_eval</a>                      (<a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-void                <a href="libgpod-Smart-Playlists.html#itdb-spl-update">itdb_spl_update</a>                     (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *spl);
-void                <a href="libgpod-Smart-Playlists.html#itdb-spl-update-all">itdb_spl_update_all</a>                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-void                <a href="libgpod-Smart-Playlists.html#itdb-spl-update-live">itdb_spl_update_live</a>                (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+                    <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLPref">Itdb_SPLPref</a>;
+                    <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>;
+                    <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRules">Itdb_SPLRules</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitSort">ItdbLimitSort</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitType">ItdbLimitType</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLAction">ItdbSPLAction</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionLast">ItdbSPLActionLast</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLField">ItdbSPLField</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLMatch">ItdbSPLMatch</a>;
+#define             <a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS">ITDB_SPL_DATE_IDENTIFIER</a>
+#define             <a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS">ITDB_SPL_STRING_MAXLEN</a>
+<a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>    <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-get-field-type">itdb_splr_get_field_type</a>            (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+<a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>   <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-get-action-type">itdb_splr_get_action_type</a>           (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-validate">itdb_splr_validate</a>                  (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-remove">itdb_splr_remove</a>                    (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-new">itdb_splr_new</a>                       (void);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-add">itdb_splr_add</a>                       (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);
+<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-add-new">itdb_splr_add_new</a>                   (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-copy-rules">itdb_spl_copy_rules</a>                 (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *dest,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *src);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-eval">itdb_splr_eval</a>                      (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-update">itdb_spl_update</a>                     (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *spl);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-update-all">itdb_spl_update_all</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-update-live">itdb_spl_update_live</a>                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2599424"></a><h2>Description</h2>
+<a name="id2809307"></a><h2>Description</h2>
 <p>
 These functions and structures are for dealing with smart playlists.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2599440"></a><h2>Details</h2>
+<a name="id2809324"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2599451"></a><h3>
+<a name="id2809334"></a><h3>
 <a name="Itdb-SPLPref"></a>Itdb_SPLPref</h3>
-<a class="indexterm" name="id2599464"></a><pre class="programlisting">typedef struct {
-    guint8  liveupdate;        /* "live Updating" check box */
-    guint8  checkrules;        /* "Match X of the following
-				  conditions" check box */
-    guint8  checklimits;       /* "Limit To..." check box */
-    guint32 limittype;         /* See types defined above */
-    guint32 limitsort;         /* See types defined above */
-    guint32 limitvalue;        /* The value typed next to "Limit
-				  type" */
-    guint8  matchcheckedonly;  /* "Match only checked songs" check box */
-    /* reserved for future use */
+<a class="indexterm" name="id2834578"></a><pre class="programlisting">typedef struct {
+    guint8  liveupdate;
+    guint8  checkrules;
+    guint8  checklimits;
+    guint32 limittype;
+    guint32 limitsort;
+    guint32 limitvalue;
+    guint8  matchcheckedonly;
     gint32 reserved_int1;
     gint32 reserved_int2;
     gpointer reserved1;
@@ -106,27 +109,104 @@
 } Itdb_SPLPref;
 </pre>
 <p>
+Smart Playlist preferences are for various flags that are not strictly smart
+playlist "rules."</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>liveupdate</code></em>;</span></p></td>
+<td>         Live Updating
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>checkrules</code></em>;</span></p></td>
+<td>         Match this number of rules.  If set to 0, ignore rules.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>checklimits</code></em>;</span></p></td>
+<td>        Limit to this number of <em class="parameter"><code>limittype</code></em>.  If 0, no limits.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>limittype</code></em>;</span></p></td>
+<td>          an <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitType"><span class="type">ItdbLimitType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>limitsort</code></em>;</span></p></td>
+<td>          an <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitSort"><span class="type">ItdbLimitSort</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>limitvalue</code></em>;</span></p></td>
+<td>         The value typed next to "Limit type"
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>matchcheckedonly</code></em>;</span></p></td>
+<td>   Match only checked songs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2509809"></a><h3>
+<a name="id2841494"></a><h3>
 <a name="Itdb-SPLRule"></a>Itdb_SPLRule</h3>
-<a class="indexterm" name="id2563419"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id2841509"></a><pre class="programlisting">typedef struct {
     guint32 field;
     guint32 action;
-    gchar *string;             /* data in UTF8  */
-    /* from and to are pretty stupid.. if it's a date type of field,
-       then
-         value = 0x2dae2dae2dae2dae,
-         date = some number, like 2 or -2
-         units = unit in seconds, like 604800 = a week
-       but if this is actually some kind of integer comparison, like
-       rating = 60 (3 stars)
-         value = the value we care about
-	 date = 0
-	 units = 1 */
+    gchar *string;
     guint64 fromvalue;
     gint64 fromdate;
     guint64 fromunits;
@@ -146,17 +226,163 @@
 } Itdb_SPLRule;
 </pre>
 <p>
+Smart Playlist Rule
+</p>
+<p>
+The from and to fields require some explanation.  If <em class="parameter"><code>field</code></em> is a date type,
+then <em class="parameter"><code>value</code></em> would be set to 0x2dae2dae2dae2dae, <em class="parameter"><code>date</code></em> would be a number,
+(e.g. 2 or -2), and <em class="parameter"><code>units</code></em> would be a time unit in seconds (e.g. one week
+would be 604800).  If <em class="parameter"><code>field</code></em> is an integer comparison, like rating = 60 (i.e.
+3 stars), then <em class="parameter"><code>value</code></em> would be the value we care about (e.g. 60), <em class="parameter"><code>date</code></em> would
+be 0, and <em class="parameter"><code>units</code></em> would be 1.  Binary AND types are similar, <em class="parameter"><code>value</code></em> is the
+important part, with <em class="parameter"><code>date</code></em> = 0 and <em class="parameter"><code>units</code></em> = 1.  Clear as mud, right?
+</p>
+<p>
+For more details see <a class="ulink" href="http://ipodlinux.org/ITunesDB.html#Smart_Playlist_Rule_Values" target="_top">ipodlinux.org</a>.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>field</code></em>;</span></p></td>
+<td>          an <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType"><span class="type">ItdbSPLFieldType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>action</code></em>;</span></p></td>
+<td>         an <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType"><span class="type">ItdbSPLActionType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>string</code></em>;</span></p></td>
+<td>         data in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>fromvalue</code></em>;</span></p></td>
+<td>      from value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
+>gint64</a>&#160;<em class="structfield"><code>fromdate</code></em>;</span></p></td>
+<td>       from date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>fromunits</code></em>;</span></p></td>
+<td>      from units
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>tovalue</code></em>;</span></p></td>
+<td>        to value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
+>gint64</a>&#160;<em class="structfield"><code>todate</code></em>;</span></p></td>
+<td>         to date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>tounits</code></em>;</span></p></td>
+<td>        to units
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk052</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk056</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk060</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk064</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk068</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2578281"></a><h3>
+<a name="id2842020"></a><h3>
 <a name="Itdb-SPLRules"></a>Itdb_SPLRules</h3>
-<a class="indexterm" name="id2599502"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id2842035"></a><pre class="programlisting">typedef struct {
     guint32 unk004;
-    guint32 match_operator;  /* "All" (logical AND): Itdb_SPLMATCH_AND,
-				"Any" (logical OR): Itdb_SPLMATCH_OR */
+    guint32 match_operator;
     GList *rules;
     /* reserved for future use */
     gint32 reserved_int1;
@@ -166,14 +392,73 @@
 } Itdb_SPLRules;
 </pre>
 <p>
+Smart Playlist Rules</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk004</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>match_operator</code></em>;</span></p></td>
+<td> Whether all rules must match (<a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPLMATCH-AND:CAPS"><span class="type">ITDB_SPLMATCH_AND</span></a>) or any
+                 rules may match (<a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPLMATCH-OR:CAPS"><span class="type">ITDB_SPLMATCH_OR</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>rules</code></em>;</span></p></td>
+<td>          list of <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>'s
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599523"></a><h3>
+<a name="id2842237"></a><h3>
 <a name="ItdbLimitSort"></a>enum ItdbLimitSort</h3>
-<a class="indexterm" name="id2599536"></a><pre class="programlisting">typedef enum {
+<a class="indexterm" name="id2842251"></a><pre class="programlisting">typedef enum {
     ITDB_LIMITSORT_RANDOM = 0x02,
     ITDB_LIMITSORT_SONG_NAME = 0x03,
     ITDB_LIMITSORT_ALBUM = 0x04,
@@ -190,14 +475,103 @@
 } ItdbLimitSort;
 </pre>
 <p>
+Which songs to pick when using a limit type
+</p>
+<p>
+Note: the values for <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</span></a>,
+<a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</span></a>, <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</span></a>,
+and <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LOWEST-RATING:CAPS"><span class="type">ITDB_LIMITSORT_LOWEST_RATING</span></a> are really 0x10, 0x14, 0x15, 0x17, with the
+'limitsort_opposite' flag set.  This is the same value as the "positive"
+value (i.e. <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</span></a>), and is really very
+terribly awfully weird, so we map the values to iPodDB specific values with
+the high bit set.
+</p>
+<p>
+On writing, we check the high bit and write the limitsort_opposite from that.
+That way, we don't have to deal with programs using the class needing to set
+the wrong limit and then make it into the "opposite", which would be frickin'
+annoying.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-RANDOM:CAPS"></a><code class="literal">ITDB_LIMITSORT_RANDOM</code></span></p></td>
+<td>                Sort randomly
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-SONG-NAME:CAPS"></a><code class="literal">ITDB_LIMITSORT_SONG_NAME</code></span></p></td>
+<td>             Sort by track name
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-ALBUM:CAPS"></a><code class="literal">ITDB_LIMITSORT_ALBUM</code></span></p></td>
+<td>                 Sort by album name
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-ARTIST:CAPS"></a><code class="literal">ITDB_LIMITSORT_ARTIST</code></span></p></td>
+<td>                Sort by artist name
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-GENRE:CAPS"></a><code class="literal">ITDB_LIMITSORT_GENRE</code></span></p></td>
+<td>                 Sort by genre
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS"></a><code class="literal">ITDB_LIMITSORT_MOST_RECENTLY_ADDED</code></span></p></td>
+<td>   Sort by most recently added
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"></a><code class="literal">ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</code></span></p></td>
+<td>  Sort by least recently added
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_MOST_OFTEN_PLAYED</code></span></p></td>
+<td>     Sort by most often played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</code></span></p></td>
+<td>    Sort by least often played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_MOST_RECENTLY_PLAYED</code></span></p></td>
+<td>  Sort by most recently played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</code></span></p></td>
+<td> Sort by least recently played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-HIGHEST-RATING:CAPS"></a><code class="literal">ITDB_LIMITSORT_HIGHEST_RATING</code></span></p></td>
+<td>        Sort by highest rating
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LOWEST-RATING:CAPS"></a><code class="literal">ITDB_LIMITSORT_LOWEST_RATING</code></span></p></td>
+<td>         Sort by lowest rating
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599563"></a><h3>
+<a name="id2842631"></a><h3>
 <a name="ItdbLimitType"></a>enum ItdbLimitType</h3>
-<a class="indexterm" name="id2599575"></a><pre class="programlisting">typedef enum {
+<a class="indexterm" name="id2842645"></a><pre class="programlisting">typedef enum {
     ITDB_LIMITTYPE_MINUTES = 0x01,
     ITDB_LIMITTYPE_MB      = 0x02,
     ITDB_LIMITTYPE_SONGS   = 0x03,
@@ -206,17 +580,51 @@
 } ItdbLimitType;
 </pre>
 <p>
+The type of unit to use when limiting a playlist</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-MINUTES:CAPS"></a><code class="literal">ITDB_LIMITTYPE_MINUTES</code></span></p></td>
+<td> Limit in minutes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-MB:CAPS"></a><code class="literal">ITDB_LIMITTYPE_MB</code></span></p></td>
+<td>      Limit in megabytes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-SONGS:CAPS"></a><code class="literal">ITDB_LIMITTYPE_SONGS</code></span></p></td>
+<td>   Limit in number of songs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-HOURS:CAPS"></a><code class="literal">ITDB_LIMITTYPE_HOURS</code></span></p></td>
+<td>   Limit in hours
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-GB:CAPS"></a><code class="literal">ITDB_LIMITTYPE_GB</code></span></p></td>
+<td>      Limit in gigabytes
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599594"></a><h3>
+<a name="id2842785"></a><h3>
 <a name="ItdbSPLAction"></a>enum ItdbSPLAction</h3>
-<a class="indexterm" name="id2599607"></a><pre class="programlisting">typedef enum {
-    ITDB_SPLACTION_IS_INT = 0x00000001,          /* "Is Set" in iTunes */
-    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010, /* "Is After" in iTunes */
-    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,    /* "Is Before" in iTunes */
+<a class="indexterm" name="id2842800"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLACTION_IS_INT = 0x00000001,
+    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010,
+    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,
     ITDB_SPLACTION_IS_IN_THE_RANGE = 0x00000100,
     ITDB_SPLACTION_IS_IN_THE_LAST = 0x00000200,
     ITDB_SPLACTION_BINARY_AND = 0x00000400,
@@ -226,49 +634,193 @@
     ITDB_SPLACTION_STARTS_WITH = 0x01000004,
     ITDB_SPLACTION_ENDS_WITH = 0x01000008,
 
-    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,     /* "Is Not Set" in iTunes */
-
-    /* Note: Not available in iTunes 4.5 (untested on iPod) */
+    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,
     ITDB_SPLACTION_IS_NOT_GREATER_THAN = 0x02000010,
-    /* Note: Not available in iTunes 4.5 (untested on iPod) */
     ITDB_SPLACTION_IS_NOT_LESS_THAN = 0x02000040,
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_IS_NOT_IN_THE_RANGE = 0x02000100,
+    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
 
-    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
     ITDB_SPLACTION_IS_NOT = 0x03000001,
     ITDB_SPLACTION_DOES_NOT_CONTAIN = 0x03000002,
-
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_DOES_NOT_START_WITH = 0x03000004,
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_DOES_NOT_END_WITH = 0x03000008,
 } ItdbSPLAction;
 </pre>
 <p>
+Smartlist Actions used in smart playlist rules.
+</p>
+<p>
+Note by Otto (Samuel Wood):
+</p>
+<div class="informalexample"><pre class="programlisting">
+ really this is a bitmapped field...
+ high byte
+ bit 0 = "string" values if set, "int" values if not set
+ bit 1 = "not", or to negate the check.
+ lower 2 bytes
+ bit 0 = simple "IS" query
+ bit 1 = contains
+ bit 2 = begins with
+ bit 3 = ends with
+ bit 4 = greater than
+ bit 5 = unknown, but probably greater than or equal to
+ bit 6 = less than
+ bit 7 = unknown, but probably less than or equal to
+ bit 8 = a range selection
+ bit 9 = "in the last"
+ </pre></div>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-INT:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_INT</code></span></p></td>
+<td>              is integer ("Is Set" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-GREATER-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_GREATER_THAN</code></span></p></td>
+<td>     is greater than ("Is after" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-LESS-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_LESS_THAN</code></span></p></td>
+<td>        is less than ("Is Before" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_IN_THE_RANGE</code></span></p></td>
+<td>     is in the range
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-IN-THE-LAST:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_IN_THE_LAST</code></span></p></td>
+<td>      is in the last
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-BINARY-AND:CAPS"></a><code class="literal">ITDB_SPLACTION_BINARY_AND</code></span></p></td>
+<td>          binary AND
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-STRING:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_STRING</code></span></p></td>
+<td>           is a string
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-CONTAINS:CAPS"></a><code class="literal">ITDB_SPLACTION_CONTAINS</code></span></p></td>
+<td>            contains
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-STARTS-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_STARTS_WITH</code></span></p></td>
+<td>         starts with
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-ENDS-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_ENDS_WITH</code></span></p></td>
+<td>           ends with
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-INT:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_INT</code></span></p></td>
+<td>          is not an integer ("Is Not Set" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_GREATER_THAN</code></span></p></td>
+<td> is not greater than (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_LESS_THAN</code></span></p></td>
+<td>    is not less than (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_IN_THE_RANGE</code></span></p></td>
+<td> is not in the range (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_IN_THE_LAST</code></span></p></td>
+<td>  is not in the last
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT</code></span></p></td>
+<td>              is not
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS"></a><code class="literal">ITDB_SPLACTION_DOES_NOT_CONTAIN</code></span></p></td>
+<td>    does not contain
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_DOES_NOT_START_WITH</code></span></p></td>
+<td> does not start with (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_DOES_NOT_END_WITH</code></span></p></td>
+<td>   does not end with (not in iTunes)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2599645"></a><h3>
+<a name="id2843293"></a><h3>
 <a name="ItdbSPLActionLast"></a>enum ItdbSPLActionLast</h3>
-<a class="indexterm" name="id2599658"></a><pre class="programlisting">typedef enum {
+<a class="indexterm" name="id2843308"></a><pre class="programlisting">typedef enum {
     ITDB_SPLACTION_LAST_DAYS_VALUE = 86400,    /* nr of secs in 24 hours */
     ITDB_SPLACTION_LAST_WEEKS_VALUE = 604800,  /* nr of secs in 7 days   */
     ITDB_SPLACTION_LAST_MONTHS_VALUE = 2628000,/* nr of secs in 30.4167
-					     days ~= 1 month */
+						  days ~= 1 month */
 } ItdbSPLActionLast;
 </pre>
 <p>
+These are to pass to <code class="function">AddRule()</code> when you need a unit for the two "in the last"
+action types.  In theory, you can use any time range.  iTunes might not
+like it, but the iPod shouldn't care.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS"></a><code class="literal">ITDB_SPLACTION_LAST_DAYS_VALUE</code></span></p></td>
+<td>   Seconds in 24 hours
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS"></a><code class="literal">ITDB_SPLACTION_LAST_WEEKS_VALUE</code></span></p></td>
+<td>  Seconds in 7 days
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS"></a><code class="literal">ITDB_SPLACTION_LAST_MONTHS_VALUE</code></span></p></td>
+<td> Seconds in 1 month (approximately)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601192"></a><h3>
+<a name="id2843424"></a><h3>
 <a name="ItdbSPLActionType"></a>enum ItdbSPLActionType</h3>
-<a class="indexterm" name="id2601205"></a><pre class="programlisting">typedef enum
+<a class="indexterm" name="id2843438"></a><pre class="programlisting">typedef enum
 {
     ITDB_SPLAT_STRING = 1,
     ITDB_SPLAT_INT,
@@ -284,66 +836,284 @@
 } ItdbSPLActionType;
 </pre>
 <p>
+Smart Playlist Action Types</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-STRING:CAPS"></a><code class="literal">ITDB_SPLAT_STRING</code></span></p></td>
+<td>      string
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-INT:CAPS"></a><code class="literal">ITDB_SPLAT_INT</code></span></p></td>
+<td>         from integer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-DATE:CAPS"></a><code class="literal">ITDB_SPLAT_DATE</code></span></p></td>
+<td>        from date ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-RANGE-INT:CAPS"></a><code class="literal">ITDB_SPLAT_RANGE_INT</code></span></p></td>
+<td>   an integer range ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-RANGE-DATE:CAPS"></a><code class="literal">ITDB_SPLAT_RANGE_DATE</code></span></p></td>
+<td>  a date range ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-INTHELAST:CAPS"></a><code class="literal">ITDB_SPLAT_INTHELAST</code></span></p></td>
+<td>   in the last ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-PLAYLIST:CAPS"></a><code class="literal">ITDB_SPLAT_PLAYLIST</code></span></p></td>
+<td>    in playlist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-NONE:CAPS"></a><code class="literal">ITDB_SPLAT_NONE</code></span></p></td>
+<td>        none
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-INVALID:CAPS"></a><code class="literal">ITDB_SPLAT_INVALID</code></span></p></td>
+<td>     invalid
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-UNKNOWN:CAPS"></a><code class="literal">ITDB_SPLAT_UNKNOWN</code></span></p></td>
+<td>     unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-BINARY-AND:CAPS"></a><code class="literal">ITDB_SPLAT_BINARY_AND</code></span></p></td>
+<td>  is / is not (binary AND)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601225"></a><h3>
+<a name="id2845696"></a><h3>
 <a name="ItdbSPLField"></a>enum ItdbSPLField</h3>
-<a class="indexterm" name="id2601237"></a><pre class="programlisting">typedef enum {
-    ITDB_SPLFIELD_SONG_NAME = 0x02,    /* String */
-    ITDB_SPLFIELD_ALBUM = 0x03,        /* String */
-    ITDB_SPLFIELD_ARTIST = 0x04,       /* String */
-    ITDB_SPLFIELD_BITRATE = 0x05,      /* Int (e.g. from/to = 128) */
-    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,  /* Int  (e.g. from/to = 44100) */
-    ITDB_SPLFIELD_YEAR = 0x07,         /* Int  (e.g. from/to = 2004) */
-    ITDB_SPLFIELD_GENRE = 0x08,        /* String */
-    ITDB_SPLFIELD_KIND = 0x09,         /* String */
-    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,/* Int (e.g. from/to = bcf93280 ==
-				     is before 6/19/2004)*/
-    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,  /* Int (e.g. from = 1, to = 2) */
-    ITDB_SPLFIELD_SIZE = 0x0c,         /* Int (e.g. from/to = 0x00600000
-				     for 6MB) */
-    ITDB_SPLFIELD_TIME = 0x0d,         /* Int (e.g. from/to = 83999 for
-				     1:23/83 seconds) */
-    ITDB_SPLFIELD_COMMENT = 0x0e,      /* String */
-    ITDB_SPLFIELD_DATE_ADDED = 0x10,   /* Int (e.g. from/to = bcfa83ff ==
-				     is after 6/19/2004) */
-    ITDB_SPLFIELD_COMPOSER = 0x12,     /* String */
-    ITDB_SPLFIELD_PLAYCOUNT = 0x16,    /* Int  (e.g. from/to = 1) */
-    ITDB_SPLFIELD_LAST_PLAYED = 0x17,  /* Int/ (e.g. from = bcfa83ff (6/19/2004)
-				     to = 0xbcfbd57f (6/20/2004)) */
-    ITDB_SPLFIELD_DISC_NUMBER = 0x18,  /* Int  (e.g. from/to = 1) */
-    ITDB_SPLFIELD_RATING = 0x19,       /* Int/Stars Rating (e.g. from/to =
-                                     60 (3 stars)) */
-    ITDB_SPLFIELD_COMPILATION = 0x1f,  /* Int (e.g. is set -&gt;
-				     ITDB_SPLACTION_IS_INT/from=1,
-				     is not set -&gt;
-				     ITDB_SPLACTION_IS_NOT_INT/from=1) */
-    ITDB_SPLFIELD_BPM = 0x23,          /* Int  (e.g. from/to = 60) */
-    ITDB_SPLFIELD_GROUPING = 0x27,     /* String */
-    ITDB_SPLFIELD_PLAYLIST = 0x28,     /* FIXME - Unknown...not parsed
-				     correctly...from/to = 0xb6fbad5f
-				     for "Purchased Music".  Extra
-				     data after "to"... */
-    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,   /* Logic Int */
-    ITDB_SPLFIELD_TVSHOW = 0x3e,       /* String */
-    ITDB_SPLFIELD_SEASON_NR = 0x3f,    /* Int */
-    ITDB_SPLFIELD_SKIPCOUNT = 0x44,    /* Int */
-    ITDB_SPLFIELD_LAST_SKIPPED = 0x45, /* Int */
-    ITDB_SPLFIELD_ALBUMARTIST = 0x47   /* String */
+<a class="indexterm" name="id2845708"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLFIELD_SONG_NAME = 0x02,
+    ITDB_SPLFIELD_ALBUM = 0x03,
+    ITDB_SPLFIELD_ARTIST = 0x04,
+    ITDB_SPLFIELD_BITRATE = 0x05,
+    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,
+    ITDB_SPLFIELD_YEAR = 0x07,
+    ITDB_SPLFIELD_GENRE = 0x08,
+    ITDB_SPLFIELD_KIND = 0x09,
+    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,
+    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,
+    ITDB_SPLFIELD_SIZE = 0x0c,
+    ITDB_SPLFIELD_TIME = 0x0d,
+    ITDB_SPLFIELD_COMMENT = 0x0e,
+    ITDB_SPLFIELD_DATE_ADDED = 0x10,
+    ITDB_SPLFIELD_COMPOSER = 0x12,
+    ITDB_SPLFIELD_PLAYCOUNT = 0x16,
+    ITDB_SPLFIELD_LAST_PLAYED = 0x17,
+    ITDB_SPLFIELD_DISC_NUMBER = 0x18,
+    ITDB_SPLFIELD_RATING = 0x19,
+    ITDB_SPLFIELD_COMPILATION = 0x1f,
+    ITDB_SPLFIELD_BPM = 0x23,
+    ITDB_SPLFIELD_GROUPING = 0x27,
+    ITDB_SPLFIELD_PLAYLIST = 0x28,
+    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,
+    ITDB_SPLFIELD_TVSHOW = 0x3e,
+    ITDB_SPLFIELD_SEASON_NR = 0x3f,
+    ITDB_SPLFIELD_SKIPCOUNT = 0x44,
+    ITDB_SPLFIELD_LAST_SKIPPED = 0x45,
+    ITDB_SPLFIELD_ALBUMARTIST = 0x47
 } ItdbSPLField;
 </pre>
 <p>
+Smart Playlist Fields, used for Smart Playlist Rules (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>).</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SONG-NAME:CAPS"></a><code class="literal">ITDB_SPLFIELD_SONG_NAME</code></span></p></td>
+<td>        Song name (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-ALBUM:CAPS"></a><code class="literal">ITDB_SPLFIELD_ALBUM</code></span></p></td>
+<td>            Album (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-ARTIST:CAPS"></a><code class="literal">ITDB_SPLFIELD_ARTIST</code></span></p></td>
+<td>           Artist (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-BITRATE:CAPS"></a><code class="literal">ITDB_SPLFIELD_BITRATE</code></span></p></td>
+<td>          Bitrate (integer, e.g. from/to = 128)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SAMPLE-RATE:CAPS"></a><code class="literal">ITDB_SPLFIELD_SAMPLE_RATE</code></span></p></td>
+<td>      Sample rate (integer, e.g. from/to = 44100)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-YEAR:CAPS"></a><code class="literal">ITDB_SPLFIELD_YEAR</code></span></p></td>
+<td>             Year (integer, e.g. from/to = 2004)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-GENRE:CAPS"></a><code class="literal">ITDB_SPLFIELD_GENRE</code></span></p></td>
+<td>            Genre (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-KIND:CAPS"></a><code class="literal">ITDB_SPLFIELD_KIND</code></span></p></td>
+<td>             File type (string, e.g. MP3-File)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-DATE-MODIFIED:CAPS"></a><code class="literal">ITDB_SPLFIELD_DATE_MODIFIED</code></span></p></td>
+<td>    Date modified (integer, e.g.
+                                 from/to = bcf93280 == is before 6/19/2004)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-TRACKNUMBER:CAPS"></a><code class="literal">ITDB_SPLFIELD_TRACKNUMBER</code></span></p></td>
+<td>      Track number (integer, e.g. from/to = 2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SIZE:CAPS"></a><code class="literal">ITDB_SPLFIELD_SIZE</code></span></p></td>
+<td>             Size (integer, e.g.
+                                 from/to = 0x00600000 for 6MB)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-TIME:CAPS"></a><code class="literal">ITDB_SPLFIELD_TIME</code></span></p></td>
+<td>             Time (integer, e.g.
+                                 from/to = 83999 for 1:23/83 seconds)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-COMMENT:CAPS"></a><code class="literal">ITDB_SPLFIELD_COMMENT</code></span></p></td>
+<td>          Comment (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-DATE-ADDED:CAPS"></a><code class="literal">ITDB_SPLFIELD_DATE_ADDED</code></span></p></td>
+<td>       Date added (integer, e.g.
+                                 from/to = bcfa83ff == is after 6/19/2004)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-COMPOSER:CAPS"></a><code class="literal">ITDB_SPLFIELD_COMPOSER</code></span></p></td>
+<td>         Composer (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-PLAYCOUNT:CAPS"></a><code class="literal">ITDB_SPLFIELD_PLAYCOUNT</code></span></p></td>
+<td>        Playcount (integer, e.g. from/to = 1)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-LAST-PLAYED:CAPS"></a><code class="literal">ITDB_SPLFIELD_LAST_PLAYED</code></span></p></td>
+<td>      Date last played (integer, e.g.
+                                 from = bcfa83ff (6/19/2004)
+                                 to = 0xbcfbd57f (6/20/2004))
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-DISC-NUMBER:CAPS"></a><code class="literal">ITDB_SPLFIELD_DISC_NUMBER</code></span></p></td>
+<td>      Disc number (integer, e.g. from/to = 1)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-RATING:CAPS"></a><code class="literal">ITDB_SPLFIELD_RATING</code></span></p></td>
+<td>           Rating (integer, e.g.
+                                 from/to = 60 (3 stars))
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-COMPILATION:CAPS"></a><code class="literal">ITDB_SPLFIELD_COMPILATION</code></span></p></td>
+<td>      Compilation (integer, e.g.
+                                 is set -&gt; ITDB_SPLACTION_IS_INT/from=1,
+                                 not set -&gt; ITDB_SPLACTION_IS_NOT_INT/from=1)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-BPM:CAPS"></a><code class="literal">ITDB_SPLFIELD_BPM</code></span></p></td>
+<td>              Beats per minute (integer, e.g.
+                                 from/to = 60)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-GROUPING:CAPS"></a><code class="literal">ITDB_SPLFIELD_GROUPING</code></span></p></td>
+<td>         Grouping (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-PLAYLIST:CAPS"></a><code class="literal">ITDB_SPLFIELD_PLAYLIST</code></span></p></td>
+<td>         FIXME Unknown...not parsed correctly...
+                                 from/to = 0xb6fbad5f for "Purchased Music".
+                                 Extra data after "to"...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-VIDEO-KIND:CAPS"></a><code class="literal">ITDB_SPLFIELD_VIDEO_KIND</code></span></p></td>
+<td>       Logical integer (works on mediatype)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-TVSHOW:CAPS"></a><code class="literal">ITDB_SPLFIELD_TVSHOW</code></span></p></td>
+<td>           TV Show (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SEASON-NR:CAPS"></a><code class="literal">ITDB_SPLFIELD_SEASON_NR</code></span></p></td>
+<td>        Season number (integer)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SKIPCOUNT:CAPS"></a><code class="literal">ITDB_SPLFIELD_SKIPCOUNT</code></span></p></td>
+<td>        Skipcount (integer)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-LAST-SKIPPED:CAPS"></a><code class="literal">ITDB_SPLFIELD_LAST_SKIPPED</code></span></p></td>
+<td>     Last skipped (integer)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-ALBUMARTIST:CAPS"></a><code class="literal">ITDB_SPLFIELD_ALBUMARTIST</code></span></p></td>
+<td>      Album artist (string)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601288"></a><h3>
+<a name="id2846355"></a><h3>
 <a name="ItdbSPLFieldType"></a>enum ItdbSPLFieldType</h3>
-<a class="indexterm" name="id2601301"></a><pre class="programlisting">typedef enum
+<a class="indexterm" name="id2846367"></a><pre class="programlisting">typedef enum
 {
     ITDB_SPLFT_STRING = 1,
     ITDB_SPLFT_INT,
@@ -355,48 +1125,117 @@
 } ItdbSPLFieldType;
 </pre>
 <p>
+Smart Playlist Field Types</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-STRING:CAPS"></a><code class="literal">ITDB_SPLFT_STRING</code></span></p></td>
+<td>      string
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-INT:CAPS"></a><code class="literal">ITDB_SPLFT_INT</code></span></p></td>
+<td>         integer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-BOOLEAN:CAPS"></a><code class="literal">ITDB_SPLFT_BOOLEAN</code></span></p></td>
+<td>     boolean
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-DATE:CAPS"></a><code class="literal">ITDB_SPLFT_DATE</code></span></p></td>
+<td>        date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-PLAYLIST:CAPS"></a><code class="literal">ITDB_SPLFT_PLAYLIST</code></span></p></td>
+<td>    playlist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-UNKNOWN:CAPS"></a><code class="literal">ITDB_SPLFT_UNKNOWN</code></span></p></td>
+<td>     unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-BINARY-AND:CAPS"></a><code class="literal">ITDB_SPLFT_BINARY_AND</code></span></p></td>
+<td>  binary AND
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601319"></a><h3>
+<a name="id2846529"></a><h3>
 <a name="ItdbSPLMatch"></a>enum ItdbSPLMatch</h3>
-<a class="indexterm" name="id2601332"></a><pre class="programlisting">typedef enum { /* types for match_operator */
-    ITDB_SPLMATCH_AND = 0, /* AND rule - all of the rules must be true in
-			 order for the combined rule to be applied */
-    ITDB_SPLMATCH_OR = 1   /* OR rule */
+<a class="indexterm" name="id2846540"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLMATCH_AND = 0,
+    ITDB_SPLMATCH_OR = 1
 } ItdbSPLMatch;
 </pre>
 <p>
+Types for smart playlist rules match_operator</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLMATCH-AND:CAPS"></a><code class="literal">ITDB_SPLMATCH_AND</code></span></p></td>
+<td> Logical AND - all of the rules must be true in order for
+                    the combined rule to be applied
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLMATCH-OR:CAPS"></a><code class="literal">ITDB_SPLMATCH_OR</code></span></p></td>
+<td>  Logical OR - any of the rules may be true
+</td>
+</tr>
+</tbody>
+</table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601351"></a><h3>
+<a name="id2846604"></a><h3>
 <a name="ITDB-SPL-DATE-IDENTIFIER:CAPS"></a>ITDB_SPL_DATE_IDENTIFIER</h3>
-<a class="indexterm" name="id2601362"></a><pre class="programlisting">#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
+<a class="indexterm" name="id2846618"></a><pre class="programlisting">#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
 </pre>
 <p>
+Identifier for smart playlist date fields</p>
+<p>
 
 </p>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601379"></a><h3>
+<a name="id2846643"></a><h3>
 <a name="ITDB-SPL-STRING-MAXLEN:CAPS"></a>ITDB_SPL_STRING_MAXLEN</h3>
-<a class="indexterm" name="id2601390"></a><pre class="programlisting">#define ITDB_SPL_STRING_MAXLEN 255
+<a class="indexterm" name="id2846656"></a><pre class="programlisting">#define ITDB_SPL_STRING_MAXLEN 255
 </pre>
 <p>
+Maximum string length for smart playlists</p>
+<p>
 
 </p>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601405"></a><h3>
+<a name="id2846679"></a><h3>
 <a name="itdb-splr-get-field-type"></a>itdb_splr_get_field_type ()</h3>
-<a class="indexterm" name="id2601416"></a><pre class="programlisting"><a href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>    itdb_splr_get_field_type            (const <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<a class="indexterm" name="id2846690"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>    itdb_splr_get_field_type            (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
 <p>
 Gets the type of the field of the <em class="parameter"><code>splr</code></em> rule</p>
 <p>
@@ -406,14 +1245,14 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> an <span class="type">Itdb_SPLFieldType</span> corresponding to <em class="parameter"><code>splr</code></em> field type 
-(string, int, date, ...)
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> an <span class="type">Itdb_SPLFieldType</span> corresponding to <em class="parameter"><code>splr</code></em> field
+type (string, int, date, ...)
 </td>
 </tr>
 </tbody>
@@ -421,9 +1260,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610726"></a><h3>
+<a name="id2846768"></a><h3>
 <a name="itdb-splr-get-action-type"></a>itdb_splr_get_action_type ()</h3>
-<a class="indexterm" name="id2610736"></a><pre class="programlisting"><a href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>   itdb_splr_get_action_type           (const <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<a class="indexterm" name="id2846779"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>   itdb_splr_get_action_type           (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
 <p>
 Gets the type of the action associated with <em class="parameter"><code>splr</code></em>.</p>
 <p>
@@ -433,13 +1272,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> type (range, date, string...) of the action field 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> type (range, date, string...) of the action field
 </td>
 </tr>
 </tbody>
@@ -447,32 +1286,32 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610803"></a><h3>
+<a name="id2846845"></a><h3>
 <a name="itdb-splr-validate"></a>itdb_splr_validate ()</h3>
-<a class="indexterm" name="id2610814"></a><pre class="programlisting">void                itdb_splr_validate                  (<a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<a class="indexterm" name="id2846856"></a><pre class="programlisting">void                itdb_splr_validate                  (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
 <p>
-Validates a rule</p>
+Validates a smart playlist rule</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610864"></a><h3>
+<a name="id2846907"></a><h3>
 <a name="itdb-splr-remove"></a>itdb_splr_remove ()</h3>
-<a class="indexterm" name="id2610874"></a><pre class="programlisting">void                itdb_splr_remove                    (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<a class="indexterm" name="id2846917"></a><pre class="programlisting">void                itdb_splr_remove                    (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
 <p>
-Removes the smart playlist rule <em class="parameter"><code>splr</code></em> from playlist <em class="parameter"><code>pl</code></em>. The memory used by
-<em class="parameter"><code>splr</code></em> is freed.</p>
+Removes the smart playlist rule <em class="parameter"><code>splr</code></em> from playlist <em class="parameter"><code>pl</code></em>. The memory
+used by <em class="parameter"><code>splr</code></em> is freed.</p>
 <p>
 
 </p>
@@ -480,12 +1319,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
 <td> an Itdb_SPLRule
 </td>
 </tr>
@@ -494,9 +1333,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2610959"></a><h3>
+<a name="id2847003"></a><h3>
 <a name="itdb-splr-new"></a>itdb_splr_new ()</h3>
-<a class="indexterm" name="id2610970"></a><pre class="programlisting"><a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       itdb_splr_new                       (void);</pre>
+<a class="indexterm" name="id2847013"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       itdb_splr_new                       (void);</pre>
 <p>
 Creates a new default smart rule</p>
 <p>
@@ -505,8 +1344,8 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a new <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a> that must be freed with <code class="function">itdb_splr_free()</code> when 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a> that must be freed with <code class="function">itdb_splr_free()</code> when
 no longer needed
 </td>
 </tr></tbody>
@@ -514,15 +1353,17 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611020"></a><h3>
+<a name="id2847064"></a><h3>
 <a name="itdb-splr-add"></a>itdb_splr_add ()</h3>
-<a class="indexterm" name="id2611030"></a><pre class="programlisting">void                itdb_splr_add                       (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
-                                                         gint pos);</pre>
+<a class="indexterm" name="id2847074"></a><pre class="programlisting">void                itdb_splr_add                       (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);</pre>
 <p>
-Adds the smart rule <em class="parameter"><code>splr</code></em> to <em class="parameter"><code>pl</code></em> at position <em class="parameter"><code>pos</code></em>. If <em class="parameter"><code>pos</code></em> is -1, <em class="parameter"><code>splr</code></em> gets
-appended to the end. After this call, <em class="parameter"><code>splr</code></em> memory is managed by <em class="parameter"><code>pl</code></em>, so 
-you no longer need to call <code class="function">itdb_splr_free()</code></p>
+Adds the smart rule <em class="parameter"><code>splr</code></em> to <em class="parameter"><code>pl</code></em> at position <em class="parameter"><code>pos</code></em>. If <em class="parameter"><code>pos</code></em> is -1,
+<em class="parameter"><code>splr</code></em> gets appended to the end. After this call, <em class="parameter"><code>splr</code></em> memory is
+managed by <em class="parameter"><code>pl</code></em>, so you no longer need to call <code class="function">itdb_splr_free()</code></p>
 <p>
 
 </p>
@@ -530,18 +1371,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> position of the rule
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position of the rule
 </td>
 </tr>
 </tbody>
@@ -549,13 +1390,15 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611169"></a><h3>
+<a name="id2847214"></a><h3>
 <a name="itdb-splr-add-new"></a>itdb_splr_add_new ()</h3>
-<a class="indexterm" name="id2611180"></a><pre class="programlisting"><a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       itdb_splr_add_new                   (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
-                                                         gint pos);</pre>
+<a class="indexterm" name="id2847225"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       itdb_splr_add_new                   (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);</pre>
 <p>
-Creates a new smart rule and inserts it at position <em class="parameter"><code>pos</code></em> in <em class="parameter"><code>pl</code></em>. If <em class="parameter"><code>pos</code></em> is
--1, the new rule gets appended to the end.</p>
+Creates a new smart rule and inserts it at position <em class="parameter"><code>pos</code></em> in <em class="parameter"><code>pl</code></em>. If
+<em class="parameter"><code>pos</code></em> is -1, the new rule gets appended to the end.</p>
 <p>
 
 </p>
@@ -563,19 +1406,20 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> position to insert the rule at
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position to insert the rule at
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> pointer to the newly created <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>. Its memory is handled 
-by <em class="parameter"><code>pl</code></em> though, so you don't need to explicitly call <code class="function">itdb_splr_free()</code> on it
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> pointer to the newly created <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>. Its
+memory is handled by <em class="parameter"><code>pl</code></em> though, so you don't need to explicitly
+call <code class="function">itdb_splr_free()</code> on it
 </td>
 </tr>
 </tbody>
@@ -583,14 +1427,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611297"></a><h3>
+<a name="id2847343"></a><h3>
 <a name="itdb-spl-copy-rules"></a>itdb_spl_copy_rules ()</h3>
-<a class="indexterm" name="id2611307"></a><pre class="programlisting">void                itdb_spl_copy_rules                 (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *dest,
-                                                         <a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *src);</pre>
+<a class="indexterm" name="id2847353"></a><pre class="programlisting">void                itdb_spl_copy_rules                 (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *dest,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *src);</pre>
 <p>
 Copy all relevant information for smart playlist from playlist <em class="parameter"><code>src</code></em>
-to playlist <em class="parameter"><code>dest</code></em>. If <em class="parameter"><code>dest</code></em> is already a smart playlist, the existing data
-is overwritten/deleted.</p>
+to playlist <em class="parameter"><code>dest</code></em>. If <em class="parameter"><code>dest</code></em> is already a smart playlist, the
+existing data is overwritten/deleted.</p>
 <p>
 
 </p>
@@ -598,13 +1442,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></td>
-<td> destination <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
+<td>   destination <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></td>
-<td> source <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
+<td>    source <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr>
 </tbody>
@@ -612,12 +1456,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611401"></a><h3>
+<a name="id2847447"></a><h3>
 <a name="itdb-splr-eval"></a>itdb_splr_eval ()</h3>
-<a class="indexterm" name="id2611411"></a><pre class="programlisting">gboolean            itdb_splr_eval                      (<a href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2847458"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_splr_eval                      (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
-Evaluates <em class="parameter"><code>splr</code></em>'s truth against <em class="parameter"><code>track</code></em>. track-&gt;itdb must be set.</p>
+Evaluates <em class="parameter"><code>splr</code></em>'s truth against <em class="parameter"><code>track</code></em>. <em class="parameter"><code>track-&gt;itdb</code></em> must be set.</p>
 <p>
 
 </p>
@@ -625,17 +1471,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if <em class="parameter"><code>track</code></em> matches <em class="parameter"><code>splr</code></em>, FALSE otherwise.
 </td>
 </tr>
@@ -644,31 +1490,32 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611517"></a><h3>
+<a name="id2847569"></a><h3>
 <a name="itdb-spl-update"></a>itdb_spl_update ()</h3>
-<a class="indexterm" name="id2611528"></a><pre class="programlisting">void                itdb_spl_update                     (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *spl);</pre>
+<a class="indexterm" name="id2847579"></a><pre class="programlisting">void                itdb_spl_update                     (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *spl);</pre>
 <p>
-Updates the content of the smart playlist <em class="parameter"><code>spl</code></em> (meant to be called if the 
-tracks stored in the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> associated with <em class="parameter"><code>spl</code></em> have changed 
-somehow and you want spl-&gt;members to be accurate with regards to those 
-changes. Does nothing if <em class="parameter"><code>spl</code></em> isn't a smart playlist.</p>
+Updates the content of the smart playlist <em class="parameter"><code>spl</code></em> (meant to be called
+if the tracks stored in the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> associated with <em class="parameter"><code>spl</code></em>
+have changed somehow and you want <em class="parameter"><code>spl-&gt;members</code></em> to be accurate
+with regards to those changes. Does nothing if <em class="parameter"><code>spl</code></em> isn't a smart
+playlist.</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+<td><p><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611603"></a><h3>
+<a name="id2847660"></a><h3>
 <a name="itdb-spl-update-all"></a>itdb_spl_update_all ()</h3>
-<a class="indexterm" name="id2611613"></a><pre class="programlisting">void                itdb_spl_update_all                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2847670"></a><pre class="programlisting">void                itdb_spl_update_all                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Updates all smart playlists contained in <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -677,39 +1524,46 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2611668"></a><h3>
+<a name="id2847726"></a><h3>
 <a name="itdb-spl-update-live"></a>itdb_spl_update_live ()</h3>
-<a class="indexterm" name="id2611678"></a><pre class="programlisting">void                itdb_spl_update_live                (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2847738"></a><pre class="programlisting">void                itdb_spl_update_live                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
-Updates all 'live' smart playlists contained in <em class="parameter"><code>itdb</code></em>, ie those which have 
-the 'live updating' flag set</p>
+Updates all smart playlists contained in <em class="parameter"><code>itdb</code></em> which have the
+<em class="parameter"><code>liveupdate</code></em> flag set.</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.2.0
+</p>
 </div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2611736"></a><h2>See Also</h2>
+<a name="id2847807"></a><h2>See Also</h2>
 <p>
-<a href="libgpod-Playlists.html" title="Playlists">Playlists</a>
+<a class="link" href="libgpod-Playlists.html" title="Playlists">Playlists</a>
 </p>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2847821"></a><div class="refsect2" lang="en"><a name="id2847822"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2847824"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>iPod database reading/writing</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="prev" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="next" href="libgpod-File-handling-functions.html" title="File handling functions">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,18 +23,18 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="libgpod-File-handling-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2571596" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2801740" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2510630" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2734714" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-The-Itdb-iTunesDB-structure"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2571596"></a><span class="refentrytitle">iPod database reading/writing</span>
+<a name="id2801740"></a><span class="refentrytitle">iPod database reading/writing</span>
 </h2>
-<p>iPod database reading/writing &#8212; Functions to create, read, write the iPod database</p>
+<p>iPod database reading/writing &#8212; Functions to read, write, and create an iPod database</p>
 </td>
 <td valign="top" align="right"></td>
 </tr></table></div>
@@ -44,120 +44,139 @@
 
 
 
-                    <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>;
-void                (<a href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">*ItdbUserDataDestroyFunc</a>)          (gpointer userdata);
-gpointer            (<a href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">*ItdbUserDataDuplicateFunc</a>)        (gpointer userdata);
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new">itdb_new</a>                            (void);
-void                <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free">itdb_free</a>                           (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse">itdb_parse</a>                          (const gchar *mp,
-                                                         GError **error);
-gboolean            <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write">itdb_write</a>                          (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         GError **error);
-void                <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint">itdb_set_mountpoint</a>                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         const gchar *mp);
-const gchar*        <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint">itdb_get_mountpoint</a>                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-guint32             <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number">itdb_tracks_number</a>                  (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-guint32             <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred">itdb_tracks_number_nontransferred</a>   (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-guint32             <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number">itdb_playlists_number</a>               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+                    <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>;
+enum                <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError">ItdbFileError</a>;
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new">itdb_new</a>                            (void);
+void                <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free">itdb_free</a>                           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse">itdb_parse</a>                          (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write">itdb_write</a>                          (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint">itdb_set_mountpoint</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);
+const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint">itdb_get_mountpoint</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number">itdb_tracks_number</a>                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred">itdb_tracks_number_nontransferred</a>   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number">itdb_playlists_number</a>               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+void                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">*ItdbUserDataDestroyFunc</a>)          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">*ItdbUserDataDuplicateFunc</a>)        (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2510630"></a><h2>Description</h2>
+<a name="id2734714"></a><h2>Description</h2>
 <p>
-These functions are for creating, reading, writing, and deleting the iPod
+These functions are for reading, writing, creating, and deleting an iPod
 database and getting the total number of tracks and playlists.
 </p>
 <p>
-Overview of using the iPod database:
+Overview of using an iPod database:
 </p>
 <p>
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"><code class="function">itdb_parse()</code></a>: read the iTunesDB and ArtworkDB
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"><code class="function">itdb_parse()</code></a>: read the iTunesDB and ArtworkDB
 </p>
 <p>
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write"><code class="function">itdb_write()</code></a>: write the iTunesDB and ArtworkDB
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write"><code class="function">itdb_write()</code></a>: write the iTunesDB and ArtworkDB
 </p>
 <p>
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"><code class="function">itdb_parse()</code></a> will return a <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> structure with GLists
-containing all tracks (each track is represented by a <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
-structure) and the playlists (each playlist is represented by a
-<a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> structure).
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"><code class="function">itdb_parse()</code></a> will return a <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> structure with GLists
+containing all tracks the playlists in the database.  Each track is
+represented by an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>.   Each playlist is represented by an
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>.  See the <a class="link" href="libgpod-Tracks.html" title="Tracks">Tracks</a>
+and <a class="link" href="libgpod-Playlists.html" title="Playlists">Playlists</a> sections for
+details on tracks and playlists, respectively.
 </p>
 <p>
-A number of functions for adding, removing, duplicating tracks
-are available.  Please see
-<a href="libgpod-Tracks.html" title="Tracks">Tracks</a> for details.
+Each <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> has a GList called <em class="parameter"><code>members</code></em> which contains all of
+the tracks in the playlist.  Tracks referenced in a playlist must also
+be present in the <em class="parameter"><code>tracks</code></em> GList of the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>.
 </p>
 <p>
-In each <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> structure you can find a GList called
-'members' with listing all member tracks. Each track referenced
-in a playlist must also be present in the tracks GList of the
-iTunesDB.
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the Music-&gt;Tracks/Albums/Artists/etc.
+menu.  In addition to the MPL there can be a number of normal
+playlists accessible through the Music-&gt;Playlists menu on the iPod.
+Tracks that are a member of one of these normal playlists must also be
+a member of the MPL.
 </p>
 <p>
-The iPod must contain one master playlist (MPL) containing all
-tracks accessible on the iPod through the
-Music-&gt;Tracks/Albums/Artists... menu. Besides the MPL there can
-be a number of normal playlists accessible through the
-Music-&gt;Playlists menu on the iPod. Tracks that are a member of
-one of these normal playlists must also be a member of the MPL.
+The Podcasts playlist is just another playlist with some internal
+flags set differently.  Tracks in the Podcasts playlist are not
+normally members of the MPL (so on the iPod they will only show up
+under the Podcasts menu). All tracks referenced must be in the
+<em class="parameter"><code>tracks</code></em> GList of the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>, however.
 </p>
 <p>
-The Podcasts playlist is just another playlist with some
-internal flags set differently. Also, member tracks in the
-Podcasts playlist are not normally members of the MPL (so on the
-iPod they will only show up under the Podcasts menu). All tracks
-referenced must be in the tracklist of the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>,
-however.
+Each track may have a thumbnail associated with it. You can retrieve a
+<a
+href="/usr/share/gtk-doc/html/gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
+><span class="type">GdkPixmap</span></a> of the thumbnail using <a class="link" href="libgpod-Artwork.html#itdb-artwork-get-pixbuf"><code class="function">itdb_artwork_get_pixbuf()</code></a>.  A
+thumbnail can be added with <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails"><code class="function">itdb_track_set_thumbnails()</code></a>.  A thumbnail
+can be removed with <a class="link" href="libgpod-Tracks.html#itdb-track-remove-thumbnails"><code class="function">itdb_track_remove_thumbnails()</code></a>.  Please see the
+<a class="link" href="libgpod-Artwork.html" title="Artwork">Artwork</a> section for more
+details on artwork related functions and structures.
 </p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
 <p>
-A number of functions to add/remove playlists, or add/remove
-tracks are available. Please see
-<a href="libgpod-Playlists.html" title="Playlists">Playlists</a> for details.
-</p>
-<p>
-Each track can have a thumbnail associated with it. You can
-retrieve a GdkPixmap of the thumbnail using
-<a href="libgpod-Artwork.html#itdb-thumb-get-gdk-pixbuf"><code class="function">itdb_thumb_get_gdk_pixbuf()</code></a> (tracks have thumbnails of the
-following types associated: <em class="parameter"><code>ITDB_THUMB_COVER_SMALL</code></em> and
-<em class="parameter"><code>ITDB_THUMB_COVER_LARGE</code></em>).  You can remove a thumbnail with
-<a href="libgpod-Tracks.html#itdb-track-remove-thumbnails"><code class="function">itdb_track_remove_thumbnails()</code></a>.  And finally, you can set a
-new thumbnail using <a href="libgpod-Tracks.html#itdb-track-set-thumbnails"><code class="function">itdb_track_set_thumbnails()</code></a>.
-</p>
-<p>
-Please note that iTunes additionally stores the artwork as tags
+Be aware that iTunes additionally stores the artwork as tags
 in the original music file. That's also from where the data is
 read when artwork is displayed in iTunes, and there can be more
 than one piece of artwork. libgpod does not store the artwork as
 tags in the original music file. As a consequence, if iTunes
 attempts to access the artwork, it will find none, and remove
 libgpod's artwork. Luckily, iTunes will only attempt to access
-the artwork if you select a track in iTunes. (To work around
+the artwork if you select a track in iTunes.  To work around
 this, gtkpod keeps a list of the original filename of all
 artwork and silently adds the thumbnails if they were 'lost'.
 Your application might want to do something similar, or you can
 supply patches for (optionally!) adding tags to the original music
-files.)
+files.
 </p>
+</div>
 <p>
-The <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>, <a href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> and <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> structures each
-have a userdata and a usertype field that can be used by the
-application to store application-specific additional data. If
-userdata is a pointer to an external structure, you can supply a
-<a href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"><span class="type">ItdbUserDataDuplicateFunc</span></a> and a <a href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"><span class="type">ItdbUserDataDestroyFunc</span></a> so that
-this data can be duplicated or freed automatically with a call
-to the library <code class="function">_duplicate()</code>/<code class="function">_free()</code> functions.
+The <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>, <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> and <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> structures each
+have <em class="parameter"><code>userdata</code></em> and <em class="parameter"><code>usertype</code></em> fields that can be used by the
+application to store additional application-specific data. If
+<em class="parameter"><code>userdata</code></em> is a pointer to an external structure, you can supply a
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"><span class="type">ItdbUserDataDuplicateFunc</span></a> and a <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"><span class="type">ItdbUserDataDestroyFunc</span></a> so that this
+data can be duplicated or freed automatically with a call to the
+library <code class="function">_duplicate()</code>/<code class="function">_free()</code> functions.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2575267"></a><h2>Details</h2>
+<a name="id2739470"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2575278"></a><h3>
+<a name="id2739481"></a><h3>
 <a name="Itdb-iTunesDB"></a>Itdb_iTunesDB</h3>
-<a class="indexterm" name="id2575290"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id2739493"></a><pre class="programlisting">typedef struct {
     GList *tracks;
     GList *playlists;
-    gchar *filename;    /* filename of iTunesDB */
-    Itdb_Device *device;/* iPod device info     */
+    gchar *filename;
+    Itdb_Device *device;
     guint32 version;
     guint64 id;
     /* reserved for future use */
@@ -174,59 +193,162 @@
 } Itdb_iTunesDB;
 </pre>
 <p>
-
-</p>
-</div>
-<hr>
-<div class="refsect2" lang="en">
-<a name="id2584447"></a><h3>
-<a name="ItdbUserDataDestroyFunc"></a>ItdbUserDataDestroyFunc ()</h3>
-<a class="indexterm" name="id2575316"></a><pre class="programlisting">void                (*ItdbUserDataDestroyFunc)          (gpointer userdata);</pre>
+Structure representing an iTunes database</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
-<tbody><tr>
-<td><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></td>
-<td>
-
-
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>tracks</code></em>;</span></p></td>
+<td>             A list of tracks in the database (<a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>)
 </td>
-</tr></tbody>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>playlists</code></em>;</span></p></td>
+<td>          A list of playlists in the database (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>filename</code></em>;</span></p></td>
+<td>           The filename of the iTunesDB
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>&#160;*<em class="structfield"><code>device</code></em>;</span></p></td>
+<td>             iPod device info (<a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>version</code></em>;</span></p></td>
+<td>            The version number of the iTunesDB
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                 A 64 bit id value for the iTunesDB
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2575362"></a><h3>
-<a name="ItdbUserDataDuplicateFunc"></a>ItdbUserDataDuplicateFunc ()</h3>
-<a class="indexterm" name="id2575373"></a><pre class="programlisting">gpointer            (*ItdbUserDataDuplicateFunc)        (gpointer userdata);</pre>
+<a name="id2783350"></a><h3>
+<a name="ItdbFileError"></a>enum ItdbFileError</h3>
+<a class="indexterm" name="id2783362"></a><pre class="programlisting">typedef enum
+{
+    ITDB_FILE_ERROR_SEEK,
+    ITDB_FILE_ERROR_CORRUPT,
+    ITDB_FILE_ERROR_NOTFOUND,
+    ITDB_FILE_ERROR_RENAME,
+    ITDB_FILE_ERROR_ITDB_CORRUPT
+} ItdbFileError;
+</pre>
 <p>
+Error codes for iTunesDB file</p>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></td>
-<td>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-SEEK:CAPS"></a><code class="literal">ITDB_FILE_ERROR_SEEK</code></span></p></td>
+<td>         file corrupt: illegal seek occured
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td>
-
-
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-CORRUPT:CAPS"></a><code class="literal">ITDB_FILE_ERROR_CORRUPT</code></span></p></td>
+<td>      file corrupt
 </td>
 </tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-NOTFOUND:CAPS"></a><code class="literal">ITDB_FILE_ERROR_NOTFOUND</code></span></p></td>
+<td>     file not found
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-RENAME:CAPS"></a><code class="literal">ITDB_FILE_ERROR_RENAME</code></span></p></td>
+<td>       file could not be renamed
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS"></a><code class="literal">ITDB_FILE_ERROR_ITDB_CORRUPT</code></span></p></td>
+<td> iTunesDB in memory corrupt
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2515071"></a><h3>
+<a name="id2783499"></a><h3>
 <a name="itdb-new"></a>itdb_new ()</h3>
-<a class="indexterm" name="id2515083"></a><pre class="programlisting"><a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_new                            (void);</pre>
+<a class="indexterm" name="id2783511"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_new                            (void);</pre>
 <p>
 Creates a new Itdb_iTunesDB with the unknowns filled in to reasonable
 values.</p>
@@ -236,8 +358,8 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly created Itdb_iTunesDB to be freed with <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly created Itdb_iTunesDB to be freed with <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a>
 when it's no longer needed
 </td>
 </tr></tbody>
@@ -245,9 +367,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2515135"></a><h3>
+<a name="id2783563"></a><h3>
 <a name="itdb-free"></a>itdb_free ()</h3>
-<a class="indexterm" name="id2515147"></a><pre class="programlisting">void                itdb_free                           (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2783575"></a><pre class="programlisting">void                itdb_free                           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Free the memory taken by <em class="parameter"><code>itdb</code></em>.</p>
 <p>
@@ -256,18 +378,22 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2515210"></a><h3>
+<a name="id2783638"></a><h3>
 <a name="itdb-parse"></a>itdb_parse ()</h3>
-<a class="indexterm" name="id2515222"></a><pre class="programlisting"><a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_parse                          (const gchar *mp,
-                                                         GError **error);</pre>
+<a class="indexterm" name="id2783650"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_parse                          (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Parse the Itdb_iTunesDB of the iPod located at <em class="parameter"><code>mp</code></em></p>
 <p>
@@ -277,20 +403,22 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
-<td> mount point of the iPod (eg "/mnt/ipod) in local encoding
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     mount point of the iPod (eg "/mnt/ipod") in local encoding
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly allocated <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
 the playlists present on the iPod at <em class="parameter"><code>mp</code></em>, NULL if <em class="parameter"><code>mp</code></em> isn't an iPod mount
-point. If non-NULL, the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with <a href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a> when
+point. If non-NULL, the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a> when
 it's no longer needed
 </td>
 </tr>
@@ -299,10 +427,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598461"></a><h3>
+<a name="id2783783"></a><h3>
 <a name="itdb-write"></a>itdb_write ()</h3>
-<a class="indexterm" name="id2598472"></a><pre class="programlisting">gboolean            itdb_write                          (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         GError **error);</pre>
+<a class="indexterm" name="id2783795"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_write                          (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
 <p>
 Write out an iTunesDB. It reassigns unique IDs to all tracks. 
 An existing "Play Counts" file is renamed to "Play Counts.bak" if
@@ -316,17 +448,19 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
-<td> return location for a <span class="type">GError</span> or NULL
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
 set accordingly.
 </td>
@@ -336,15 +470,17 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598567"></a><h3>
+<a name="id2783901"></a><h3>
 <a name="itdb-set-mountpoint"></a>itdb_set_mountpoint ()</h3>
-<a class="indexterm" name="id2598577"></a><pre class="programlisting">void                itdb_set_mountpoint                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         const gchar *mp);</pre>
+<a class="indexterm" name="id2783916"></a><pre class="programlisting">void                itdb_set_mountpoint                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);</pre>
 <p>
-Sets the mountpoint of <em class="parameter"><code>db</code></em>. Always use this function to set the mountpoint
-of an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> as it will reset the number of available 
-/iPod_Control/Music/F.. dirs. It doesn't attempt to parse an iPod database
-that may be present on the iPod at <em class="parameter"><code>mp</code></em></p>
+Sets the mountpoint of <em class="parameter"><code>itdb</code></em>. Always use this function to set the
+mountpoint of an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> as it will reset the number of
+available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
+an iPod database that may be present on the iPod at <em class="parameter"><code>mp</code></em>.</p>
 <p>
 
 </p>
@@ -352,23 +488,27 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
-<td> new mount point
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     new mount point
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.1.3
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598666"></a><h3>
+<a name="id2784023"></a><h3>
 <a name="itdb-get-mountpoint"></a>itdb_get_mountpoint ()</h3>
-<a class="indexterm" name="id2598676"></a><pre class="programlisting">const gchar*        itdb_get_mountpoint                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2784038"></a><pre class="programlisting">const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        itdb_get_mountpoint                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Retrieve a reference to the mountpoint of <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -378,24 +518,29 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the <em class="parameter"><code>itdb</code></em> mountpoint, this string shouldn't be freed nor 
-modified
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <em class="parameter"><code>itdb</code></em> mountpoint, this string shouldn't be freed
+nor modified
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598748"></a><h3>
+<a name="id2784125"></a><h3>
 <a name="itdb-tracks-number"></a>itdb_tracks_number ()</h3>
-<a class="indexterm" name="id2598758"></a><pre class="programlisting">guint32             itdb_tracks_number                  (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2784138"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_tracks_number                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Counts the number of tracks stored in <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -405,12 +550,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> the number of tracks in <em class="parameter"><code>itdb</code></em>
 </td>
 </tr>
@@ -419,9 +564,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598827"></a><h3>
+<a name="id2784215"></a><h3>
 <a name="itdb-tracks-number-nontransferred"></a>itdb_tracks_number_nontransferred ()</h3>
-<a class="indexterm" name="id2598840"></a><pre class="programlisting">guint32             itdb_tracks_number_nontransferred   (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2784229"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_tracks_number_nontransferred   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Counts the number of non-transferred tracks in <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -431,14 +578,14 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> the number of tracks in <em class="parameter"><code>itdb</code></em> that haven't been transferred
-to the iPod yet (ie the number of <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> in which the transferred field
+to the iPod yet (ie the number of <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> in which the transferred field
 is false)
 </td>
 </tr>
@@ -447,9 +594,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598919"></a><h3>
+<a name="id2784315"></a><h3>
 <a name="itdb-playlists-number"></a>itdb_playlists_number ()</h3>
-<a class="indexterm" name="id2598929"></a><pre class="programlisting">guint32             itdb_playlists_number               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2784326"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_playlists_number               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Counts the number of playlists stored in <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -459,12 +608,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> the number of playlists in <em class="parameter"><code>itdb</code></em> (including the master 
 playlist)
 </td>
@@ -472,7 +621,69 @@
 </tbody>
 </table></div>
 </div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2784405"></a><h3>
+<a name="ItdbUserDataDestroyFunc"></a>ItdbUserDataDestroyFunc ()</h3>
+<a class="indexterm" name="id2784416"></a><pre class="programlisting">void                (*ItdbUserDataDestroyFunc)          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);</pre>
+<p>
+Function called to free userdata</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></p></td>
+<td> A <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+><span class="type">gpointer</span></a> to user data
+</td>
+</tr></tbody>
+</table></div>
 </div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2784473"></a><h3>
+<a name="ItdbUserDataDuplicateFunc"></a>ItdbUserDataDuplicateFunc ()</h3>
+<a class="indexterm" name="id2784485"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            (*ItdbUserDataDuplicateFunc)        (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);</pre>
+<p>
+Function called to duplicate userdata</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></p></td>
+<td> A <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+><span class="type">gpointer</span></a> to user data
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> A <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+><span class="type">gpointer</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
 </div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2784560"></a><div class="refsect2" lang="en"><a name="id2784562"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2784563"></a></div>
+</div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Time-handling.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Time-handling.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Time-handling.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Time handling</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="prev" href="libgpod-File-handling-functions.html" title="File handling functions">
 <link rel="next" href="libgpod-Low-level-functions.html" title="Low-level functions">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,18 +23,19 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="libgpod-Low-level-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2595954" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2823514" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2590936" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2820492" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Time-handling"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2595954"></a><span class="refentrytitle">Time handling</span>
+<a name="id2823514"></a><span class="refentrytitle">Time handling</span>
 </h2>
-<p>Time handling &#8212; Helper functions to convert between Epoch time and Mac (iPod) time</p>
+<p>Time handling &#8212; [DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</p>
 </td>
 <td valign="top" align="right"></td>
 </tr></table></div>
@@ -44,30 +45,36 @@
 
 
 
-time_t              <a href="libgpod-Time-handling.html#itdb-time-get-mac-time">itdb_time_get_mac_time</a>              (void);
-time_t              <a href="libgpod-Time-handling.html#itdb-time-mac-to-host">itdb_time_mac_to_host</a>               (time_t time);
-time_t              <a href="libgpod-Time-handling.html#itdb-time-host-to-mac">itdb_time_host_to_mac</a>               (time_t time);
+time_t              <a class="link" href="libgpod-Time-handling.html#itdb-time-get-mac-time">itdb_time_get_mac_time</a>              (void);
+time_t              <a class="link" href="libgpod-Time-handling.html#itdb-time-mac-to-host">itdb_time_mac_to_host</a>               (time_t time);
+time_t              <a class="link" href="libgpod-Time-handling.html#itdb-time-host-to-mac">itdb_time_host_to_mac</a>               (time_t time);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2590936"></a><h2>Description</h2>
+<a name="id2820492"></a><h2>Description</h2>
 <p>
-The functions provide conversion between Epoch time and Mac (iPod) time. These 
-functions are now obsolete and should no longer be used, libgpod automatically
-converts to/from Epoch time and iPod time when writing/reading the iPod 
-databases
+The functions provide conversion between Epoch time and Mac (iPod)
+time.
 </p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+These functions are now obsolete and should no longer be used, libgpod
+automatically converts to/from Epoch time and iPod time when
+writing/reading the iPod databases.
 </div>
+</div>
 <div class="refsect1" lang="en">
-<a name="id2590955"></a><h2>Details</h2>
+<a name="id2819215"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2590966"></a><h3>
+<a name="id2818412"></a><h3>
 <a name="itdb-time-get-mac-time"></a>itdb_time_get_mac_time ()</h3>
-<a class="indexterm" name="id2590980"></a><pre class="programlisting">time_t              itdb_time_get_mac_time              (void);</pre>
+<a class="indexterm" name="id2818425"></a><pre class="programlisting">time_t              itdb_time_get_mac_time              (void);</pre>
 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 <h3 class="title">Warning</h3>
-<p><code class="literal">itdb_time_get_mac_time</code> is deprecated and should not be used in newly-written code. kept for compatibility with older code, directly use 
-<code class="function">g_get_current_time()</code> or time(NULL) instead</p>
+<p><code class="literal">itdb_time_get_mac_time</code> is deprecated and should not be used in newly-written code. kept for compatibility with older code, directly use
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#g-get-current-time"
+><code class="function">g_get_current_time()</code></a> or time(NULL) instead</p>
 </div>
 <p>
 Gets the current time in a format appropriate for storing in the libgpod
@@ -78,7 +85,7 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> current time
 
 </td>
@@ -87,9 +94,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2591043"></a><h3>
+<a name="id2818488"></a><h3>
 <a name="itdb-time-mac-to-host"></a>itdb_time_mac_to_host ()</h3>
-<a class="indexterm" name="id2572856"></a><pre class="programlisting">time_t              itdb_time_mac_to_host               (time_t time);</pre>
+<a class="indexterm" name="id2818502"></a><pre class="programlisting">time_t              itdb_time_mac_to_host               (time_t time);</pre>
 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 <h3 class="title">Warning</h3>
 <p><code class="literal">itdb_time_mac_to_host</code> is deprecated and should not be used in newly-written code. It's been kept for compatibility with older code, but this
@@ -104,12 +111,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></p></td>
 <td> time expressed in libgpod format
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> timestamp for the host system
 
 </td>
@@ -119,9 +126,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2572930"></a><h3>
+<a name="id2805315"></a><h3>
 <a name="itdb-time-host-to-mac"></a>itdb_time_host_to_mac ()</h3>
-<a class="indexterm" name="id2572943"></a><pre class="programlisting">time_t              itdb_time_host_to_mac               (time_t time);</pre>
+<a class="indexterm" name="id2805329"></a><pre class="programlisting">time_t              itdb_time_host_to_mac               (time_t time);</pre>
 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 <h3 class="title">Warning</h3>
 <p><code class="literal">itdb_time_host_to_mac</code> is deprecated and should not be used in newly-written code. It's been kept for compatibility with older code, but this
@@ -136,12 +143,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></p></td>
 <td> time expressed in host unit
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> a libgpod timestamp
 
 </td>
@@ -150,6 +157,11 @@
 </table></div>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2805404"></a><div class="refsect2" lang="en"><a name="id2805405"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2805406"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Tracks.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Tracks.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod-Tracks.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Tracks</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="ch01.html" title="iPod database components">
 <link rel="prev" href="ch01.html" title="iPod database components">
 <link rel="next" href="libgpod-Playlists.html" title="Playlists">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -23,16 +23,16 @@
 <th width="100%" align="center">libgpod Reference Manual</th>
 <td><a accesskey="n" href="libgpod-Playlists.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr>
-<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2578583" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2787730" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2558664" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id2831503" class="shortcut">Description</a></nobr></td></tr>
 </table>
 <div class="refentry" lang="en">
 <a name="libgpod-Tracks"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2>
-<a name="id2578583"></a><span class="refentrytitle">Tracks</span>
+<a name="id2787730"></a><span class="refentrytitle">Tracks</span>
 </h2>
 <p>Tracks &#8212; Data structure to store metadata about an iPod track</p>
 </td>
@@ -44,70 +44,107 @@
 
 
 
-                    <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>;
-enum                <a href="libgpod-Tracks.html#Itdb-Mediatype">Itdb_Mediatype</a>;
-#define             <a href="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">ITDB_RATING_STEP</a>
-<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a href="libgpod-Tracks.html#itdb-track-new">itdb_track_new</a>                      (void);
-void                <a href="libgpod-Tracks.html#itdb-track-free">itdb_track_free</a>                     (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-void                <a href="libgpod-Tracks.html#itdb-track-add">itdb_track_add</a>                      (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         gint32 pos);
-void                <a href="libgpod-Tracks.html#itdb-track-remove">itdb_track_remove</a>                   (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-void                <a href="libgpod-Tracks.html#itdb-track-unlink">itdb_track_unlink</a>                   (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
-<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a href="libgpod-Tracks.html#itdb-track-duplicate">itdb_track_duplicate</a>                (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);
-<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a href="libgpod-Tracks.html#itdb-track-by-id">itdb_track_by_id</a>                    (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         guint32 id);
-GTree*              <a href="libgpod-Tracks.html#itdb-track-id-tree-create">itdb_track_id_tree_create</a>           (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
-void                <a href="libgpod-Tracks.html#itdb-track-id-tree-destroy">itdb_track_id_tree_destroy</a>          (GTree *idtree);
-<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a href="libgpod-Tracks.html#itdb-track-id-tree-by-id">itdb_track_id_tree_by_id</a>            (GTree *idtree,
-                                                         guint32 id);
-gboolean            <a href="libgpod-Tracks.html#itdb-track-set-thumbnails">itdb_track_set_thumbnails</a>           (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *filename);
-gboolean            <a href="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data">itdb_track_set_thumbnails_from_data</a> (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const guchar *image_data,
-                                                         gsize image_data_len);
-gboolean            <a href="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf">itdb_track_set_thumbnails_from_pixbuf</a>
-                                                        (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         gpointer pixbuf);
-void                <a href="libgpod-Tracks.html#itdb-track-remove-thumbnails">itdb_track_remove_thumbnails</a>        (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+                    <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>;
+enum                <a class="link" href="libgpod-Tracks.html#Itdb-Mediatype">Itdb_Mediatype</a>;
+#define             <a class="link" href="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">ITDB_RATING_STEP</a>
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-new">itdb_track_new</a>                      (void);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-free">itdb_track_free</a>                     (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-add">itdb_track_add</a>                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-remove">itdb_track_remove</a>                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-unlink">itdb_track_unlink</a>                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-duplicate">itdb_track_duplicate</a>                (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-by-id">itdb_track_by_id</a>                    (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a>*              <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-create">itdb_track_id_tree_create</a>           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-destroy">itdb_track_id_tree_destroy</a>          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-by-id">itdb_track_id_tree_by_id</a>            (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-get-thumbnail">itdb_track_get_thumbnail</a>            (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-has-thumbnails">itdb_track_has_thumbnails</a>           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails">itdb_track_set_thumbnails</a>           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data">itdb_track_set_thumbnails_from_data</a> (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf">itdb_track_set_thumbnails_from_pixbuf</a>
+                                                        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-remove-thumbnails">itdb_track_remove_thumbnails</a>        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2558664"></a><h2>Description</h2>
+<a name="id2831503"></a><h2>Description</h2>
 <p>
 These functions and structures are for storing and retrieving
 information about an iPod track.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2558685"></a><h2>Details</h2>
+<a name="id2831520"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2558696"></a><h3>
+<a name="id2831531"></a><h3>
 <a name="Itdb-Track"></a>Itdb_Track</h3>
-<a class="indexterm" name="id2558708"></a><pre class="programlisting">typedef struct {
-  Itdb_iTunesDB *itdb;       /* pointer to iTunesDB (for convenience)   */
-  gchar   *title;            /* title (utf8)                            */
-  gchar   *ipod_path;        /* name of file on iPod: uses ":" instead
-				of "/" and is relative to mountpoint    */
-  gchar   *album;            /* album (utf8)                            */
-  gchar   *artist;           /* artist (utf8)                           */
-  gchar   *genre;            /* genre (utf8)                            */
-  gchar   *filetype;         /* eg. "MP3-File"...(utf8)                 */
-  gchar   *comment;          /* comment (utf8)                          */
-  gchar   *category;         /* Category for podcast                    */
-  gchar   *composer;         /* Composer (utf8)                         */
-  gchar   *grouping;         /* ? (utf8)                                */
-  gchar   *description;      /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *podcasturl;       /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *podcastrss;       /* see note for MHOD_ID in itdb_itunesdb.c */
-  gpointer chapterdata;      /* not yet supported. Help welcome.        */
-  gchar   *subtitle;         /* see note for MHOD_ID in itdb_itunesdb.c */
-/* the following 6 are new in libgpod 0.4.2... */
-  gchar   *tvshow;           /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *tvepisode;        /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *tvnetwork;        /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *albumartist;      /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *keywords;         /* see note for MHOD_ID in itdb_itunesdb.c */
+<a class="indexterm" name="id2831543"></a><pre class="programlisting">typedef struct {
+  Itdb_iTunesDB *itdb;
+  gchar   *title;
+  gchar   *ipod_path;
+  gchar   *album;
+  gchar   *artist;
+  gchar   *genre;
+  gchar   *filetype;
+  gchar   *comment;
+  gchar   *category;
+  gchar   *composer;
+  gchar   *grouping;
+  gchar   *description;
+  gchar   *podcasturl;
+  gchar   *podcastrss;
+  Itdb_Chapterdata *chapterdata;
+  gchar   *subtitle;
+/* the following 5 are new in libgpod 0.4.2... */
+  gchar   *tvshow;
+  gchar   *tvepisode;
+  gchar   *tvnetwork;
+  gchar   *albumartist;
+  gchar   *keywords;
 /* the following 6 are new in libgpod 0.5.0... */
   /* You can set these strings to override the standard
      sortorder. When set they take precedence over the default
@@ -122,205 +159,93 @@
      the lists displayed by the iPod according to "Artist, The",
      without setting the field.
   */
-  gchar   *sort_artist;      /* artist (for sorting)                    */
-  gchar   *sort_title;       /* title (for sorting)                     */
-  gchar   *sort_album;       /* album (for sorting)                     */
-  gchar   *sort_albumartist; /* album artist (for sorting)              */
-  gchar   *sort_composer;    /* composer (for sorting)                  */
-  gchar   *sort_tvshow;      /* tv show (for sorting)                   */
-/* new fields in libgpod 0.5.0 up to here */
-  guint32 id;                /* unique ID of track                      */
-  gint32  size;              /* size of file in bytes                   */
-  gint32  tracklen;          /* Length of track in ms                   */
-  gint32  cd_nr;             /* CD number                               */
-  gint32  cds;               /* number of CDs                           */
-  gint32  track_nr;          /* track number                            */
-  gint32  tracks;            /* number of tracks                        */
-  gint32  bitrate;           /* bitrate                                 */
-  guint16 samplerate;        /* samplerate (CD: 44100)                  */
-  guint16 samplerate_low;    /* in the iTunesDB the samplerate is
-                                multiplied by 0x10000 -- these are the
-				lower 16 bit, which are usually 0       */
-  gint32  year;              /* year                                    */
-  gint32  volume;            /* volume adjustment                       */
-  guint32 soundcheck;        /* volume adjustment "soundcheck"          */
-  time_t  time_added;        /* time when added                         */
-  time_t  time_modified;     /* time of last modification               */
-  time_t  time_played;       /* time of last play                       */
-  guint32 bookmark_time;     /* bookmark set for (AudioBook) in ms      */
-  guint32 rating;            /* star rating (stars * RATING_STEP (20))  */
-  guint32 playcount;         /* number of times track was played        */
-  guint32 playcount2;        /* Also stores the play count of the
-				song.  Don't know if it ever differs
-				from the above value. During sync itdb
-				sets playcount2 to the same value as
-				playcount.                              */
-  guint32 recent_playcount;  /* times track was played since last sync  */
-  gboolean transferred;      /* has file been transferred to iPod?      */
-  gint16  BPM;               /* BPM (beats per minute) of this track    */
-  guint8  app_rating;        /* star rating set by appl. (not
-			      * iPod). If the rating set on the iPod
-			        and the rating field above differ, the
-				original rating is copied here and the
-				new rating is stored above. */
-  guint8  type1;             /* CBR MP3s and AAC are 0x00, VBR MP3s are
-			        0x01                                    */
-  guint8  type2;             /* MP3s are 0x01, AAC are 0x00             */
+  gchar   *sort_artist;
+  gchar   *sort_title;
+  gchar   *sort_album;
+  gchar   *sort_albumartist;
+  gchar   *sort_composer;
+  gchar   *sort_tvshow;
+/* end of new fields in libgpod 0.5.0 */
+  guint32 id;
+  gint32  size;
+  gint32  tracklen;
+  gint32  cd_nr;
+  gint32  cds;
+  gint32  track_nr;
+  gint32  tracks;
+  gint32  bitrate;
+  guint16 samplerate;
+  guint16 samplerate_low;
+  gint32  year;
+  gint32  volume;
+  guint32 soundcheck;
+  time_t  time_added;
+  time_t  time_modified;
+  time_t  time_played;
+  guint32 bookmark_time;
+  guint32 rating;
+  guint32 playcount;
+  guint32 playcount2;
+  guint32 recent_playcount;
+  gboolean transferred;
+  gint16  BPM;
+  guint8  app_rating;
+  guint8  type1;
+  guint8  type2;
   guint8  compilation;
   guint32 starttime;
   guint32 stoptime;
-  guint8  checked;           /* 0x0: checkmark on track is set 0x1: not set */
-  guint64 dbid;              /* unique database ID                      */
-  guint32 drm_userid;        /* Apple Store/Audible User ID (for DRM'ed
-				files only, set to 0 otherwise).        */
-  guint32 visible;           /*  If this value is 1, the song is visible
-				 on the iPod. All other values cause
-				 the file to be hidden.                 */
-  guint32 filetype_marker;   /* This appears to always be 0 on hard
-                                drive based iPods, but for the
-                                iTunesDB that is written to an iPod
-                                Shuffle, iTunes 4.7.1 writes out the
-                                file's type as an ANSI string(!). For
-                                example, a MP3 file has a filetype of
-                                0x4d503320 -&gt; 0x4d = 'M', 0x50 = 'P',
-                                0x33 = '3', 0x20 = &lt;space&gt;. (set to
-				the filename extension by itdb when
-				copying track to iPod)                  */
-  guint16 artwork_count;     /* The number of album artwork items
-				associated with this song. libgpod
-				updates this value when syncing */
-  guint32 artwork_size;      /* The total size of artwork (in bytes)
-				attached to this song, when it is
-				converted to JPEG format. Observed in
-				iPodDB version 0x0b and with an iPod
-				Photo. libgpod updates this value when
-				syncing                                 */
-  float samplerate2;         /* The sample rate of the song expressed
-				as an IEEE 32 bit floating point
-				number.  It's uncertain why this is
-				here.  itdb will set this when adding
-				a track                                 */
-
-  guint16 unk126;     /* unknown, but always seems to be 0xffff for
-			 MP3/AAC songs, 0x0 for uncompressed songs
-			 (like WAVE format), 0x1 for Audible. itdb
-			 will try to set this when adding a new track */
-  guint32 unk132;     /* unknown */
-  time_t  time_released;/* date/time added to music store? 
-			   For podcasts: release date as displayed next to the 
-			   title in the Podcast playlist */
-  guint16 unk144;     /* unknown, but MP3 songs appear to be always
-			 0x000c, AAC songs are always 0x0033, Audible
-			 files are 0x0029, WAV files are 0x0. itdb
-			 will attempt to set this value when adding a
-			 track. */ 
-  guint16 unk146;     /* unknown, but appears to be 1 if played at
-			 least once in iTunes and 0 otherwise. */
-  guint32 unk148;     /* unknown - used for Apple Store DRM songs
-			 (always 0x01010100?), zero otherwise */
-  guint32 unk152;     /* unknown */
-  guint32 skipcount;  /* Number of times the track has been skipped.
-			 Formerly unk156 (added in dbversion 0x0c) */
-  guint32 recent_skipcount; /* number of times track was skipped since
-			       last sync */
-  guint32 last_skipped;/* Date/time last skipped. Formerly unk160
-			 (added in dbversion 0x0c) */
-  guint8 has_artwork; /* 0x01: artwork is present. 0x02: no artwork is
-			 present for this track (used by the iPod to
-			 decide whether to display Artwork or not) */
-  guint8 skip_when_shuffling;/* "Skip when shuffling" when set to
-			 0x01, set to 0x00 otherwise. .m4b and .aa
-			 files always seem to be skipped when
-			 shuffling, however */
-  guint8 remember_playback_position;/* "Remember playback position"
-			 when set to 0x01, set to 0x00 otherwise. .m4b
-			 and .aa files always seem to remember the
-			 playback position, however. */
-  guint8 flag4;       /* Used for podcasts, 0x00 otherwise.  If set to
-			 0x01 the "Now Playing" page will show
-			 Title/Album, when set to 0x00 it will also
-			 show the Artist. When set to 0x02 a sub-page
-			 (middle button) with further information
-			 about the track will be shown. */
-  guint64 dbid2;      /* not clear. if not set, itdb will set this to
-			 the same value as dbid when adding a
-			 track. (With iTunes, since V0x12, this field
-			 value differs from the dbid one.) */
-  guint8 lyrics_flag; /* set to 0x01 if lyrics are present in MP3 tag
-			 ("ULST"), 0x00 otherwise */
-  guint8 movie_flag;  /* set to 0x01 if it's a movie file, 0x00
-		         otherwise */
-  guint8 mark_unplayed; /* A value of 0x02 marks a podcast as unplayed
-			   on the iPod (bullet) once played it is set to
-			   0x01. Non-podcasts have this set to 0x01. */
-  guint8 unk179;      /* unknown (always 0x00 so far) */
+  guint8  checked;
+  guint64 dbid;
+  guint32 drm_userid;
+  guint32 visible;
+  guint32 filetype_marker;
+  guint16 artwork_count;
+  guint32 artwork_size;
+  float samplerate2;
+  guint16 unk126;
+  guint32 unk132;
+  time_t  time_released;
+  guint16 unk144;
+  guint16 explicit_flag;
+  guint32 unk148;
+  guint32 unk152;
+  guint32 skipcount;
+  guint32 recent_skipcount;
+  guint32 last_skipped;
+  guint8 has_artwork;
+  guint8 skip_when_shuffling;
+  guint8 remember_playback_position;
+  guint8 flag4;
+  guint64 dbid2;
+  guint8 lyrics_flag;
+  guint8 movie_flag;
+  guint8 mark_unplayed;
+  guint8 unk179;
   guint32 unk180;
-  guint32 pregap;     /* Number of samples of silence before the songs
-			 starts (for gapless playback). */
-  guint64 samplecount;/* Number of samples in the song. First observed
-			 in dbversion 0x0d, and only for AAC and WAV
-			 files (for gapless playback). */
+  guint32 pregap;
+  guint64 samplecount;
   guint32 unk196;
-  guint32 postgap;    /* Number of samples of silence at the end of
-			 the song (for gapless playback). */
-  guint32 unk204;     /* unknown - added in dbversion 0x0c, first
-			 values observed in 0x0d. Observed to be 0x0
-			 or 0x1. */
-  guint32 mediatype;  /* It seems that this field denotes the type of
-		         the file on (e.g.) the 5g video iPod. It must
-			 be set to 0x00000001 for audio files, and set
-			 to 0x00000002 for video files. If set to
-			 0x00, the files show up in both, the audio
-			 menus ("Songs", "Artists", etc.) and the
-			 video menus ("Movies", "Music Videos",
-			 etc.). It appears to be set to 0x20 for music
-			 videos, and if set to 0x60 the file shows up
-			 in "TV Shows" rather than "Movies". 
-
-			 The following list summarizes all observed types:
-
-			 * 0x00 00 00 00 - Audio/Video
-			 * 0x00 00 00 01 - Audio
-			 * 0x00 00 00 02 - Video
-			 * 0x00 00 00 04 - Podcast
-			 * 0x00 00 00 06 - Video Podcast
-			 * 0x00 00 00 08 - Audiobook
-			 * 0x00 00 00 20 - Music Video
-			 * 0x00 00 00 40 - TV Show (shows up ONLY in TV Shows
-			 * 0x00 00 00 60 - TV Show (shows up in the
-			                            Music lists as well) */
-  guint32 season_nr;  /* the season number of the track, for TV shows only. */
-  guint32 episode_nr; /* the episode number of the track, for TV shows
-			 only - although not displayed on the iPod,
-			 the episodes are sorted by episode number. */
-  guint32 unk220;     /* Has something to do with protected files -
-			 set to 0x0 for non-protected files. */
+  guint32 postgap;
+  guint32 unk204;
+  guint32 mediatype;
+  guint32 season_nr;
+  guint32 episode_nr;
+  guint32 unk220;
   guint32 unk224;
   guint32 unk228, unk232, unk236, unk240, unk244;
-  guint32 gapless_data;/* some magic number needed for gapless playback
-			  (added in dbversion 0x13) It has been observed
-			  that gapless playback does not work if this is
-			  set to zero. This number is related to the the
-			  filesize in bytes, but it is a couple of bytes
-			  less than the filesize. Maybe ID3 tags
-			  etc... taken off? */
+  guint32 gapless_data;
   guint32 unk252;
-  guint16 gapless_track_flag; /* if 1, this track has gapless playback data
-			         (added in dbversion 0x13) */
-  guint16 gapless_album_flag; /* if 1, this track does not use crossfading
-			         in iTunes (added in dbversion 0x13) */
+  guint16 gapless_track_flag;
+  guint16 gapless_album_flag;
+  guint16 album_id;
 
-    /* Chapter data: defines where the chapter stops are in the track,
-       as well as what info should be displayed for each section of
-       the track. Until it can be parsed and interpreted, the
-       chapterdata will just be read as a block and written back on
-       sync. This will be changed at a later time */
-  void *chapterdata_raw;
-  guint32 chapterdata_raw_length;
-
   /* This is for Cover Art support */
   struct _Itdb_Artwork *artwork;
 
+  /* This is for sparse artwork support, new in libgpod-0.7.0 */
+  guint32 mhii_link;
+
   /* reserved for future use */
   gint32 reserved_int1;
   gint32 reserved_int2;
@@ -349,14 +274,1038 @@
 } Itdb_Track;
 </pre>
 <p>
+Structure representing a track in an iTunesDB
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+<p>When adding string fields don't forget to add them in
+<a class="link" href="libgpod-Tracks.html#itdb-track-duplicate"><code class="function">itdb_track_duplicate()</code></a> as well.</p>
+</div>
+<p>
+</p>
+<p>
+Many of the parameter descriptions are copied verbatim from
+http://ipodlinux.org/ITunesDB, which is the best source for information about
+the iTunesDB and related files.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>&#160;*<em class="structfield"><code>itdb</code></em>;</span></p></td>
+<td>                       A pointer to the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> (for convenience)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>title</code></em>;</span></p></td>
+<td>                      The title of the track in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>ipod_path</code></em>;</span></p></td>
+<td>                  The file path on the iPod.  Directories are
+                             separated with ":" instead of "/".  The path is
+                             relative to the iPod mountpoint.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>album</code></em>;</span></p></td>
+<td>                      The album name in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>artist</code></em>;</span></p></td>
+<td>                     The artist name in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>genre</code></em>;</span></p></td>
+<td>                      The genre in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>filetype</code></em>;</span></p></td>
+<td>                   A UTF8 string describing the file type.  E.g.
+                             "MP3-File".
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>comment</code></em>;</span></p></td>
+<td>                    A comment in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>category</code></em>;</span></p></td>
+<td>                   The category ("Technology", "Music", etc.)
+                             where the podcast was located.  (Added in
+                             dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>composer</code></em>;</span></p></td>
+<td>                   The composer name in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>grouping</code></em>;</span></p></td>
+<td>                   ??? (UTF8)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>description</code></em>;</span></p></td>
+<td>                Description text (such as podcast show notes).
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>podcasturl</code></em>;</span></p></td>
+<td>                 Podcast Enclosure URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>podcastrss</code></em>;</span></p></td>
+<td>                 Podcast RSS URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>&#160;*<em class="structfield"><code>chapterdata</code></em>;</span></p></td>
+<td>                This is an m4a-style entry that is used to
+                             display subsongs within a mhit.  (Added in
+                             dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>subtitle</code></em>;</span></p></td>
+<td>                   Subtitle (usually the same as Description).
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>tvshow</code></em>;</span></p></td>
+<td>                     Name of the TV show (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>tvepisode</code></em>;</span></p></td>
+<td>                  The episode number (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>tvnetwork</code></em>;</span></p></td>
+<td>                  The TV network (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>albumartist</code></em>;</span></p></td>
+<td>                The album artist (Added in dbversion 0x13?)
+                             (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>keywords</code></em>;</span></p></td>
+<td>                   List of keywords pertaining to the track.
+                             (Added in dbversion 0x13?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_artist</code></em>;</span></p></td>
+<td>                The artist name used for sorting.  Artists with
+                             names like "The Artist" would have "Artist,
+                             The" here.  If you do not set this field,
+                             libgpod will pre-sort the lists displayed by
+                             the iPod according to "Artist, The", without
+                             setting this field.
+                             (Added in dbversion 0x13?) (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_title</code></em>;</span></p></td>
+<td>                 The track title used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_album</code></em>;</span></p></td>
+<td>                 The album name used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_albumartist</code></em>;</span></p></td>
+<td>           The album artist used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_composer</code></em>;</span></p></td>
+<td>              The composer used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_tvshow</code></em>;</span></p></td>
+<td>                The name of the TV show used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                         Unique ID of track
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>size</code></em>;</span></p></td>
+<td>                       The size of the file in bytes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>tracklen</code></em>;</span></p></td>
+<td>                   The length of the track in ms
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>cd_nr</code></em>;</span></p></td>
+<td>                      The CD number the track comes from.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>cds</code></em>;</span></p></td>
+<td>                        The total number of CDs.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>track_nr</code></em>;</span></p></td>
+<td>                   The track number.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>tracks</code></em>;</span></p></td>
+<td>                     The total number of tracks.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>bitrate</code></em>;</span></p></td>
+<td>                    The bitrate at which the file is encoded.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>samplerate</code></em>;</span></p></td>
+<td>                 The samplerate of the track (e.g. CD = 44100)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>samplerate_low</code></em>;</span></p></td>
+<td>             In the iTunesDB the samplerate is
+                             multiplied by 0x10000 -- these are the
+                             lower 16 bit, which are usually 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>year</code></em>;</span></p></td>
+<td>                       The year the track was released
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>volume</code></em>;</span></p></td>
+<td>                     Volume adjustment field.  This is a value from
+                             -255 to 255 that will be applied to the track
+                             on playback.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>soundcheck</code></em>;</span></p></td>
+<td>                 The SoundCheck value to apply to the song, when
+                             SoundCheck is switched on in the iPod settings.
+                             The value for this field can be determined by
+                             the equation: X = 1000 * 10 ^ (-.1 * Y) where Y
+                             is the adjustment value in dB and X is the
+                             value that goes into the SoundCheck field. The
+                             value 0 is special, the equation is not used
+                             and it is treated as "no Soundcheck" (basically
+                             the same as the value 1000). This equation
+                             works perfectly well with ReplayGain derived
+                             data instead of the iTunes SoundCheck derived
+                             information.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_added</code></em>;</span></p></td>
+<td>                 The time the track was added.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_modified</code></em>;</span></p></td>
+<td>              The time the track was last modified
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_played</code></em>;</span></p></td>
+<td>                The time the track was last played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>bookmark_time</code></em>;</span></p></td>
+<td>              The time, in milliseconds, that the track will
+                             start playing at. This is used for AudioBook
+                             filetypes (.aa and .m4b).  Note that there is
+                             also a bookmark value in the play counts file
+                             that will be set by the iPod and can be used
+                             instead of this value.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>rating</code></em>;</span></p></td>
+<td>                     The track rating (stars * <a class="link" href="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"><span class="type">ITDB_RATING_STEP</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>playcount</code></em>;</span></p></td>
+<td>                  The number of times the track has been played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>playcount2</code></em>;</span></p></td>
+<td>                 This also stores the play count of the
+                             track.  It is unclear if this ever differs
+                             from the above value. During sync, this is set
+                             to the same value as <em class="parameter"><code>playcount</code></em>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>recent_playcount</code></em>;</span></p></td>
+<td>           The number of times the track was played since
+                             the last sync.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>transferred</code></em>;</span></p></td>
+<td>                Whether the file been transferred to iPod.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"
+>gint16</a>&#160;<em class="structfield"><code>BPM</code></em>;</span></p></td>
+<td>                        BPM (beats per minute) of the track
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>app_rating</code></em>;</span></p></td>
+<td>                 The last rating set by an application (e.g.
+                             iTunes).  If the rating on the iPod and the
+                             <em class="parameter"><code>rating</code></em> field above differ, the original
+                             rating is copied here and the new rating is
+                             stored in <em class="parameter"><code>rating</code></em>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>type1</code></em>;</span></p></td>
+<td>                      CBR MP3s and AAC are 0x00, VBR MP3s are 0x01
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>type2</code></em>;</span></p></td>
+<td>                      MP3s are 0x01, AAC are 0x00
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>compilation</code></em>;</span></p></td>
+<td>                Flag to mark the track as a compilation.  True
+                             if set to 0x1, false if set to 0x0.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>starttime</code></em>;</span></p></td>
+<td>                  The time, in milliseconds, at which the song
+                             will start playing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>stoptime</code></em>;</span></p></td>
+<td>                   The time, in milliseconds, at which the song
+                             will stop playing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>checked</code></em>;</span></p></td>
+<td>                    Flag for whether the track is checked.  True if
+                             set to 0x0, false if set to 0x1
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>dbid</code></em>;</span></p></td>
+<td>                       Unique database ID that identifies this song
+                             across the databases on the iPod. For example,
+                             this id joins an iTunesDB mhit with an
+                             ArtworkDB mhii.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>drm_userid</code></em>;</span></p></td>
+<td>                 Apple Store/Audible User ID (for DRM'ed files
+                             only, set to 0 otherwise).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>visible</code></em>;</span></p></td>
+<td>                    If this value is 1, the song is visible on the
+                             iPod. All other values cause the file to be
+                             hidden.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>filetype_marker</code></em>;</span></p></td>
+<td>            This appears to always be 0 on hard drive based
+                             iPods, but for the iTunesDB that is written to
+                             an iPod Shuffle, iTunes 4.7.1 writes out the
+                             file's type as an ANSI string(!). For example,
+                             a MP3 file has a filetype of 0x4d503320 -&gt;
+                             0x4d = 'M', 0x50 = 'P', 0x33 = '3', 0x20 =
+                             &lt;space&gt;.  This is set to the filename
+                             extension by libgpod when copying the track to
+                             the iPod.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>artwork_count</code></em>;</span></p></td>
+<td>              The number of album artwork items associated
+                             with this song.  libgpod updates this value
+                             when syncing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>artwork_size</code></em>;</span></p></td>
+<td>               The total size of artwork (in bytes) attached
+                             to this song, when it is converted to JPEG
+                             format. Observed in dbversion 0x0b and with
+                             an iPod Photo. libgpod updates this value when
+                             syncing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">float&#160;<em class="structfield"><code>samplerate2</code></em>;</span></p></td>
+<td>                The sample rate of the song expressed as an
+                             IEEE 32 bit floating point number.  It is
+                             uncertain why this is here.  libgpod will set
+                             this when adding a track.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>unk126</code></em>;</span></p></td>
+<td>                     Unknown, but always seems to be 0xffff for
+                             MP3/AAC songs, 0x0 for uncompressed songs
+                             (like WAVE format), 0x1 for Audible.  libgpod
+                             will try to set this when adding a new track.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk132</code></em>;</span></p></td>
+<td>                     Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_released</code></em>;</span></p></td>
+<td>              The date/time the track was added to the iTunes
+                             music store?  For podcasts this is the release
+                             date that is displayed next to the title in the
+                             Podcast playlist.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>unk144</code></em>;</span></p></td>
+<td>                     Unknown, but MP3 songs appear to be always
+                             0x000c, AAC songs are always 0x0033, Audible
+                             files are 0x0029, WAV files are 0x0.  libgpod
+                             will attempt to set this value when adding a
+                             track.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>explicit_flag</code></em>;</span></p></td>
+<td>              Flag to mark a track as "explicit" in iTunes.
+                             True if to 0x1, false if set to 0x0.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk148</code></em>;</span></p></td>
+<td>                     Unknown - used for Apple Store DRM songs
+                             (always 0x01010100?), zero otherwise
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk152</code></em>;</span></p></td>
+<td>                     Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>skipcount</code></em>;</span></p></td>
+<td>                  The number of times the track has been skipped.
+                             (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>recent_skipcount</code></em>;</span></p></td>
+<td>           The number of times the track was skipped since
+                             the last sync.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>last_skipped</code></em>;</span></p></td>
+<td>               The time the track was last skipped.  (Added in
+                             dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>has_artwork</code></em>;</span></p></td>
+<td>                Whether the track has artwork.
+                             True if set to 0x01, false if set to 0x02.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>skip_when_shuffling</code></em>;</span></p></td>
+<td>        Flag to skip the track when shuffling.  True if
+                             set to 0x01, false if set to 0x00. Audiobooks
+                             (.aa and .m4b) always seem to be skipped when
+                             shuffling, regardless of this flag.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>remember_playback_position</code></em>;</span></p></td>
+<td> Flag to remember playback position.
+                             True when set to 0x01, false when set to 0x00.
+                             Audiobooks (.aa and .m4b) always seem to
+                             remember the playback position, regardless of
+                             this flag.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag4</code></em>;</span></p></td>
+<td>                      Used for podcasts, 0x00 otherwise.  If set to
+                             0x01 the "Now Playing" page will show
+                             Title/Album, when set to 0x00 it will also show
+                             the Artist.  When set to 0x02 a sub-page
+                             (middle button) with further information about
+                             the track will be shown.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>dbid2</code></em>;</span></p></td>
+<td>                      The purpose of the field is unclear.  If not
+                             set, libgpod will set this to the same value as
+                             <em class="parameter"><code>dbid</code></em> when adding a track.  (With iTunes, since
+                             dbversion 0x12, this field value differs from
+                             <em class="parameter"><code>dbid</code></em>.)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>lyrics_flag</code></em>;</span></p></td>
+<td>                Whether the track has lyrics (e.g. it has a
+                             USLT ID3 tag in an MP3 or a <em class="parameter"><code>lyr</code></em> atom in an
+                             MP4).  True if set to 0x01, false if set to
+                             0x00.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>movie_flag</code></em>;</span></p></td>
+<td>                 Whether the track is a movie.  True if set to
+                             0x01, false if set to 0x00.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>mark_unplayed</code></em>;</span></p></td>
+<td>              A value of 0x02 marks a podcast as unplayed on
+                             the iPod, with a bullet.  Once played it is set
+                             to 0x01. Non-podcasts have this set to 0x01.
+                             (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>unk179</code></em>;</span></p></td>
+<td>                     Unknown, always 0x00 so far.  (Added in
+                             dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk180</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>pregap</code></em>;</span></p></td>
+<td>                     The number of samples of silence before the
+                             track starts (for gapless playback).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>samplecount</code></em>;</span></p></td>
+<td>                The number of samples in the track (for gapless
+                             playback).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk196</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>postgap</code></em>;</span></p></td>
+<td>                    The number of samples of silence at the end of
+                             the track (for gapless playback).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk204</code></em>;</span></p></td>
+<td>                     Unknown.  Appears to be 0x1 for files encoded
+                             using the MP3 encoder, 0x0 otherwise.  (Added
+                             in dbversion 0x0c, first values observed in
+                             0x0d.)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>mediatype</code></em>;</span></p></td>
+<td>                  The type of file.  It must be set to 0x00000001
+                             for audio files, and set to 0x00000002 for
+                             video files.  If set to 0x00, the files show up
+                             in both, the audio menus ("Songs", "Artists",
+                             etc.) and the video menus ("Movies", "Music
+                             Videos", etc.).  It appears to be set to 0x20
+                             for music videos, and if set to 0x60 the file
+                             shows up in "TV Shows" rather than "Movies".
+                             <p>
+                             The following list summarizes all observed types:
+                             </p>
+                             <div class="itemizedlist"><ul type="disc">
+<li>0x00 00 00 00 - Audio/Video</li>
+<li>0x00 00 00 01 - Audio</li>
+<li>0x00 00 00 02 - Video</li>
+<li>0x00 00 00 04 - Podcast</li>
+<li>0x00 00 00 06 - Video Podcast</li>
+<li>0x00 00 00 08 - Audiobook</li>
+<li>0x00 00 00 20 - Music Video</li>
+<li>0x00 00 00 40 - TV Show (shows up ONLY
+                             in TV Shows)</li>
+<li>0x00 00 00 60 - TV Show (shows up in
+                             the Music lists as well)</li>
+</ul></div>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>season_nr</code></em>;</span></p></td>
+<td>                  The season number of the track (only used for
+                             TV Shows).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>episode_nr</code></em>;</span></p></td>
+<td>                 The episode number of the track (only used for
+                             TV Shows).  Although this is not displayed on
+                             the iPod, the episodes are sorted by episode
+                             number.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk220</code></em>;</span></p></td>
+<td>                     Unknown.  This has something to do with
+                             protected files.  It is set to 0x0 for
+                             non-protected files.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk224</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk228</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk232</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk236</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk240</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk244</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>gapless_data</code></em>;</span></p></td>
+<td>               The size in bytes from first Synch Frame
+                             (which is usually the XING frame that
+                             includes the LAME tag) until the 8th before
+                             the last frame. The gapless playback does not
+                             work for MP3 files if this is set to zero. For
+                             AAC tracks, this may be zero.  (Added in
+                             dbversion 0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk252</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>gapless_track_flag</code></em>;</span></p></td>
+<td>         If set to 1, this track has gapless playback
+                             data.  (Added in dbversion 0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>gapless_album_flag</code></em>;</span></p></td>
+<td>         If set to 1, this track does not use
+                             crossfading in iTunes.  (Added in dbversion
+                             0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>album_id</code></em>;</span></p></td>
+<td>                   The Album ID from the album list (currently
+                             unused by libgpod)
+</td>
+</tr>
+<tr>
+<td><p><span class="term">struct&#160;<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">_Itdb_Artwork</a>&#160;*<em class="structfield"><code>artwork</code></em>;</span></p></td>
+<td>                    An <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> for cover art
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>mhii_link</code></em>;</span></p></td>
+<td>                  This is set to the id of the corresponding
+                             ArtworkDB mhii, used for sparse artwork
+                             support.  (Since libgpod-0.7.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int3</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int4</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int5</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int6</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved3</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved4</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved5</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved6</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>                   For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>                   For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td>         A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>           A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2575921"></a><h3>
+<a name="id2836075"></a><h3>
 <a name="Itdb-Mediatype"></a>enum Itdb_Mediatype</h3>
-<a class="indexterm" name="id2573134"></a><pre class="programlisting">typedef enum
+<a class="indexterm" name="id2836088"></a><pre class="programlisting">typedef enum
 {
     ITDB_MEDIATYPE_AUDIO      = 0x0001,
     ITDB_MEDIATYPE_MOVIE      = 0x0002,
@@ -367,34 +1316,80 @@
 } Itdb_Mediatype;
 </pre>
 <p>
+Mediatype definitions
+</p>
+<p>
+The mediatype is used to determine what menu a track appears under.  For
+example, setting the mediatype to <a class="link" href="libgpod-Tracks.html#ITDB-MEDIATYPE-PODCAST:CAPS"><span class="type">ITDB_MEDIATYPE_PODCAST</span></a> makes the track
+appear on the Podcast menu.</p>
+<p>
 
 </p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-AUDIO:CAPS"></a><code class="literal">ITDB_MEDIATYPE_AUDIO</code></span></p></td>
+<td>      Audio files
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-MOVIE:CAPS"></a><code class="literal">ITDB_MEDIATYPE_MOVIE</code></span></p></td>
+<td>      Movies
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-PODCAST:CAPS"></a><code class="literal">ITDB_MEDIATYPE_PODCAST</code></span></p></td>
+<td>    Podcasts
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-AUDIOBOOK:CAPS"></a><code class="literal">ITDB_MEDIATYPE_AUDIOBOOK</code></span></p></td>
+<td>  Audio books
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-MUSICVIDEO:CAPS"></a><code class="literal">ITDB_MEDIATYPE_MUSICVIDEO</code></span></p></td>
+<td> Music videos
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-TVSHOW:CAPS"></a><code class="literal">ITDB_MEDIATYPE_TVSHOW</code></span></p></td>
+<td>     TV Shows
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2575630"></a><h3>
+<a name="id2836248"></a><h3>
 <a name="ITDB-RATING-STEP:CAPS"></a>ITDB_RATING_STEP</h3>
-<a class="indexterm" name="id2575642"></a><pre class="programlisting">#define ITDB_RATING_STEP 20
+<a class="indexterm" name="id2836258"></a><pre class="programlisting">#define ITDB_RATING_STEP 20
 </pre>
 <p>
+The multiplier for each star in <span class="type">track-</span>&gt;rating</p>
+<p>
 
 </p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2575658"></a><h3>
+<a name="id2836282"></a><h3>
 <a name="itdb-track-new"></a>itdb_track_new ()</h3>
-<a class="indexterm" name="id2569041"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_new                      (void);</pre>
+<a class="indexterm" name="id2836292"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_new                      (void);</pre>
 <p>
-Creates an empty <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a></p>
+Creates an empty <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a></p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the new <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>, free it with <a href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when no
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the new <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>, free it with <a class="link" href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when no
 longer needed
 </td>
 </tr></tbody>
@@ -402,9 +1397,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2558766"></a><h3>
+<a name="id2836348"></a><h3>
 <a name="itdb-track-free"></a>itdb_track_free ()</h3>
-<a class="indexterm" name="id2558778"></a><pre class="programlisting">void                itdb_track_free                     (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2836358"></a><pre class="programlisting">void                itdb_track_free                     (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
 Frees the memory used by <em class="parameter"><code>track</code></em></p>
 <p>
@@ -413,23 +1408,25 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2558839"></a><h3>
+<a name="id2836413"></a><h3>
 <a name="itdb-track-add"></a>itdb_track_add ()</h3>
-<a class="indexterm" name="id2558852"></a><pre class="programlisting">void                itdb_track_add                      (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         <a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         gint32 pos);</pre>
+<a class="indexterm" name="id2836423"></a><pre class="programlisting">void                itdb_track_add                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);</pre>
 <p>
 Adds <em class="parameter"><code>track</code></em> to <em class="parameter"><code>itdb-&gt;tracks</code></em> at position <em class="parameter"><code>pos</code></em> (or at the end if pos
 is -1). The application is responsible to also add it to the master
-playlist. The <em class="parameter"><code>itdb</code></em> gets ownership of the <em class="parameter"><code>track</code></em> and will take care of 
+playlist. The <em class="parameter"><code>itdb</code></em> gets ownership of the <em class="parameter"><code>track</code></em> and will take care of
 freeing the memory it uses when it's no longer necessary.</p>
 <p>
 
@@ -438,18 +1435,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
-<td> position of the track to add
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position of the track to add
 </td>
 </tr>
 </tbody>
@@ -457,11 +1454,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605462"></a><h3>
+<a name="id2836548"></a><h3>
 <a name="itdb-track-remove"></a>itdb_track_remove ()</h3>
-<a class="indexterm" name="id2605472"></a><pre class="programlisting">void                itdb_track_remove                   (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2836558"></a><pre class="programlisting">void                itdb_track_remove                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
-Removes <em class="parameter"><code>track</code></em> from the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with, and frees the
+Removes <em class="parameter"><code>track</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with, and frees the
 memory it uses. It doesn't remove the track from the playlists it may have
 been added to, in particular it won't be removed from the master playlist.</p>
 <p>
@@ -470,39 +1467,39 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605537"></a><h3>
+<a name="id2836623"></a><h3>
 <a name="itdb-track-unlink"></a>itdb_track_unlink ()</h3>
-<a class="indexterm" name="id2605548"></a><pre class="programlisting">void                itdb_track_unlink                   (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2836634"></a><pre class="programlisting">void                itdb_track_unlink                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
-Removes <em class="parameter"><code>track</code></em> from the <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with, but do not free
-memory. It doesn't remove the track from the playlists it may have been 
+Removes <em class="parameter"><code>track</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with, but do not free
+memory. It doesn't remove the track from the playlists it may have been
 added to, in particular it won't be removed from the master playlist.
-track-&gt;itdb is set to NULL.</p>
+<em class="parameter"><code>track-&gt;itdb</code></em> is set to NULL.</p>
 <p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605613"></a><h3>
+<a name="id2836704"></a><h3>
 <a name="itdb-track-duplicate"></a>itdb_track_duplicate ()</h3>
-<a class="indexterm" name="id2605624"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_duplicate                (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);</pre>
+<a class="indexterm" name="id2836714"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_duplicate                (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);</pre>
 <p>
 Duplicates an existing track</p>
 <p>
@@ -512,13 +1509,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a newly allocated <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 </tbody>
@@ -526,39 +1523,46 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605690"></a><h3>
+<a name="id2836781"></a><h3>
 <a name="itdb-track-by-id"></a>itdb_track_by_id ()</h3>
-<a class="indexterm" name="id2605700"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_by_id                    (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
-                                                         guint32 id);</pre>
+<a class="indexterm" name="id2836791"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_by_id                    (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);</pre>
 <p>
-Looks up a track using its ID in <em class="parameter"><code>itdb</code></em>. 
+Looks up a track using its ID in <em class="parameter"><code>itdb</code></em>.
+</p>
+<p>
 Looking up tracks by ID is not really a good idea because the IDs
 are created by itdb just before export. The functions are here
 because they are needed during import of the iTunesDB which is
 referencing tracks by IDs.
-This function is very slow (linear in the number of tracks contained in the 
-database). If you need to lookup many IDs use <a href="libgpod-Tracks.html#itdb-track-id-tree-create"><code class="function">itdb_track_id_tree_create()</code></a>, 
-<a href="libgpod-Tracks.html#itdb-track-id-tree-destroy"><code class="function">itdb_track_id_tree_destroy()</code></a>, and <a href="libgpod-Tracks.html#itdb-track-id-tree-by-id"><code class="function">itdb_track_id_tree_by_id()</code></a>.</p>
+</p>
 <p>
+This function is very slow (linear in the number of tracks
+contained in the database). If you need to lookup many IDs use
+<a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-create"><code class="function">itdb_track_id_tree_create()</code></a>, <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-destroy"><code class="function">itdb_track_id_tree_destroy()</code></a>, and
+<a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-by-id"><code class="function">itdb_track_id_tree_by_id()</code></a>.</p>
+<p>
 
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
-<td> ID of the track to look for
+<td><p><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></p></td>
+<td>   ID of the track to look for
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> with the ID <em class="parameter"><code>id</code></em> or NULL if the ID cannot be
-found. 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> with the ID <em class="parameter"><code>id</code></em> or NULL if the ID cannot be
+found.
 </td>
 </tr>
 </tbody>
@@ -566,12 +1570,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605826"></a><h3>
+<a name="id2836927"></a><h3>
 <a name="itdb-track-id-tree-create"></a>itdb_track_id_tree_create ()</h3>
-<a class="indexterm" name="id2605836"></a><pre class="programlisting">GTree*              itdb_track_id_tree_create           (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<a class="indexterm" name="id2836938"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a>*              itdb_track_id_tree_create           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
 <p>
 Creates a balanced-binary tree for quick ID lookup that is used in
-<code class="function">itdb_track_by_id_tree()</code> function below</p>
+<code class="function">itdb_track_by_id_tree()</code></p>
 <p>
 
 </p>
@@ -579,14 +1585,16 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> a <span class="type">GTree</span> indexed by track IDs to be freed with 
-<a href="libgpod-Tracks.html#itdb-track-id-tree-destroy"><code class="function">itdb_track_id_tree_destroy()</code></a> when no longer used
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+><span class="type">GTree</span></a> indexed by track IDs to be freed with
+<a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-destroy"><code class="function">itdb_track_id_tree_destroy()</code></a> when no longer used
 </td>
 </tr>
 </tbody>
@@ -594,9 +1602,11 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605920"></a><h3>
+<a name="id2837022"></a><h3>
 <a name="itdb-track-id-tree-destroy"></a>itdb_track_id_tree_destroy ()</h3>
-<a class="indexterm" name="id2605932"></a><pre class="programlisting">void                itdb_track_id_tree_destroy          (GTree *idtree);</pre>
+<a class="indexterm" name="id2837033"></a><pre class="programlisting">void                itdb_track_id_tree_destroy          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree);</pre>
 <p>
 Frees the memory used by <em class="parameter"><code>idtree</code></em></p>
 <p>
@@ -605,21 +1615,27 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></td>
-<td> a <span class="type">GTree</span>
+<td><p><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+><span class="type">GTree</span></a>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605986"></a><h3>
+<a name="id2837088"></a><h3>
 <a name="itdb-track-id-tree-by-id"></a>itdb_track_id_tree_by_id ()</h3>
-<a class="indexterm" name="id2605996"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_id_tree_by_id            (GTree *idtree,
-                                                         guint32 id);</pre>
+<a class="indexterm" name="id2837098"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_id_tree_by_id            (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);</pre>
 <p>
-Lookup an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> by <em class="parameter"><code>id</code></em> using <em class="parameter"><code>idtree</code></em> for faster lookup (compared to
-itdb_track_by_id)</p>
+Lookup an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> by <em class="parameter"><code>id</code></em> using <em class="parameter"><code>idtree</code></em> for faster lookup
+(compared to <a class="link" href="libgpod-Tracks.html#itdb-track-by-id"><code class="function">itdb_track_by_id()</code></a>)</p>
 <p>
 
 </p>
@@ -627,18 +1643,20 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></td>
-<td> a <span class="type">GTree</span> created using <a href="libgpod-Tracks.html#itdb-track-id-tree-create"><code class="function">itdb_track_id_tree_create()</code></a>
+<td><p><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+><span class="type">GTree</span></a> created using <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-create"><code class="function">itdb_track_id_tree_create()</code></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
-<td> the ID of the track to search for
+<td><p><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></p></td>
+<td>     the ID of the track to search for
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td> the <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> whose ID is <em class="parameter"><code>id</code></em>, or NULL if such a track 
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> whose ID is <em class="parameter"><code>id</code></em>, or NULL if such a track
 couldn't be found
 </td>
 </tr>
@@ -647,14 +1665,104 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606114"></a><h3>
+<a name="id2837224"></a><h3>
+<a name="itdb-track-get-thumbnail"></a>itdb_track_get_thumbnail ()</h3>
+<a class="indexterm" name="id2837236"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            itdb_track_get_thumbnail            (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);</pre>
+<p>
+Get a thumbnail representing the cover associated with the current track,
+scaling it if appropriate. If either height or width is -1, then the biggest
+unscaled thumbnail available will be returned.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
+<td>  width of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td>
+<td> height of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2837356"></a><h3>
+<a name="itdb-track-has-thumbnails"></a>itdb_track_has_thumbnails ()</h3>
+<a class="indexterm" name="id2837369"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_has_thumbnails           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Determine if a <em class="parameter"><code>track</code></em> has thumbnails</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>track</code></em> has artwork available, FALSE otherwise
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2837446"></a><h3>
 <a name="itdb-track-set-thumbnails"></a>itdb_track_set_thumbnails ()</h3>
-<a class="indexterm" name="id2606125"></a><pre class="programlisting">gboolean            itdb_track_set_thumbnails           (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const gchar *filename);</pre>
+<a class="indexterm" name="id2837459"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_set_thumbnails           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);</pre>
 <p>
 Uses the image contained in <em class="parameter"><code>filename</code></em> to generate iPod thumbnails. The image
 can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
-will only be generated when necessary, ie when <code class="function">itdb_save()</code> or a similar 
+will only be generated when necessary, i.e. when <code class="function">itdb_save()</code> or a similar
 function is called.</p>
 <p>
 
@@ -663,34 +1771,43 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
 <td> image file to use as a thumbnail
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if the thumbnail could be added, FALSE otherwise.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606224"></a><h3>
+<a name="id2837563"></a><h3>
 <a name="itdb-track-set-thumbnails-from-data"></a>itdb_track_set_thumbnails_from_data ()</h3>
-<a class="indexterm" name="id2606237"></a><pre class="programlisting">gboolean            itdb_track_set_thumbnails_from_data (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         const guchar *image_data,
-                                                         gsize image_data_len);</pre>
+<a class="indexterm" name="id2837579"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_set_thumbnails_from_data (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len);</pre>
 <p>
 Uses <em class="parameter"><code>image_data</code></em> to generate iPod thumbnails. The image can be in
 any format supported by gdk-pixbuf. To save memory, the thumbnails
-will only be generated when necessary, ie when <code class="function">itdb_save()</code> or a
+will only be generated when necessary, i.e. when <code class="function">itdb_save()</code> or a
 similar function is called.</p>
 <p>
 
@@ -699,39 +1816,46 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>          an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></td>
-<td> data used to create the thumbnail (the raw contents of
-             an image file)
+<td><p><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></p></td>
+<td>     data used to create the thumbnail (the raw contents of
+                 an image file)
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></td>
+<td><p><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></p></td>
 <td> length of above data block
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if the thumbnail could be added, FALSE otherwise.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.4.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606355"></a><h3>
+<a name="id2837703"></a><h3>
 <a name="itdb-track-set-thumbnails-from-pixbuf"></a>itdb_track_set_thumbnails_from_pixbuf ()</h3>
-<a class="indexterm" name="id2606368"></a><pre class="programlisting">gboolean            itdb_track_set_thumbnails_from_pixbuf
-                                                        (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
-                                                         gpointer pixbuf);</pre>
+<a class="indexterm" name="id2837718"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_set_thumbnails_from_pixbuf
+                                                        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf);</pre>
 <p>
 Uses <em class="parameter"><code>pixbuf</code></em> to generate iPod thumbnails. To save memory, the thumbnails
-will only be generated when necessary, ie when <code class="function">itdb_save()</code> or a
+will only be generated when necessary, i.e. when <code class="function">itdb_save()</code> or a
 similar function is called.</p>
 <p>
 
@@ -740,28 +1864,33 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr>
 <tr>
-<td><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
-<td> a <span class="type">GdkPixbuf</span> used to generate the thumbnail
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> used to generate the thumbnail
 </td>
 </tr>
 <tr>
-<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 <td> TRUE if the thumbnail could be added, FALSE otherwise.
+
 </td>
 </tr>
 </tbody>
 </table></div>
+<p class="since">Since  0.5.0
+</p>
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606473"></a><h3>
+<a name="id2837829"></a><h3>
 <a name="itdb-track-remove-thumbnails"></a>itdb_track_remove_thumbnails ()</h3>
-<a class="indexterm" name="id2606485"></a><pre class="programlisting">void                itdb_track_remove_thumbnails        (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id2837843"></a><pre class="programlisting">void                itdb_track_remove_thumbnails        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
 <p>
 Removes the thumbnails associated with <em class="parameter"><code>track</code></em></p>
 <p>
@@ -770,13 +1899,20 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
-<td> an <a href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
 </td>
 </tr></tbody>
 </table></div>
+<p class="since">Since  0.3.0
+</p>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id2837906"></a><div class="refsect2" lang="en"><a name="id2837908"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2837909"></a></div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod.devhelp
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod.devhelp	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod.devhelp	2009-01-24 12:10:00 UTC (rev 341)
@@ -12,6 +12,7 @@
         <sub name="Playlists" link="libgpod-Playlists.html"/>
         <sub name="Smart Playlists" link="libgpod-Smart-Playlists.html"/>
         <sub name="Artwork" link="libgpod-Artwork.html"/>
+        <sub name="Chapter Data" link="libgpod-Chapter-Data.html"/>
         <sub name="Device" link="libgpod-Device.html"/>
       </sub>
     </sub>
@@ -21,8 +22,7 @@
   </chapters>
   <functions>
     <function name="Itdb_iTunesDB" link="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"/>
-    <function name="ItdbUserDataDestroyFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"/>
-    <function name="ItdbUserDataDuplicateFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"/>
+    <function name="enum ItdbFileError" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError"/>
     <function name="itdb_new ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new"/>
     <function name="itdb_free ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"/>
     <function name="itdb_parse ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"/>
@@ -32,15 +32,23 @@
     <function name="itdb_tracks_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number"/>
     <function name="itdb_tracks_number_nontransferred ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred"/>
     <function name="itdb_playlists_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number"/>
+    <function name="ItdbUserDataDestroyFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"/>
+    <function name="ItdbUserDataDuplicateFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"/>
+    <function name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2784562"/>
+    <function name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2784563"/>
     <function name="itdb_cp_track_to_ipod ()" link="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod"/>
     <function name="itdb_filename_fs2ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-fs2ipod"/>
     <function name="itdb_filename_ipod2fs ()" link="libgpod-File-handling-functions.html#itdb-filename-ipod2fs"/>
     <function name="itdb_filename_on_ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-on-ipod"/>
     <function name="itdb_musicdirs_number ()" link="libgpod-File-handling-functions.html#itdb-musicdirs-number"/>
     <function name="itdb_rename_files ()" link="libgpod-File-handling-functions.html#itdb-rename-files"/>
+    <function name="" link="libgpod-File-handling-functions.html#id2810657"/>
+    <function name="" link="libgpod-File-handling-functions.html#id2810658"/>
     <function name="itdb_time_get_mac_time ()" link="libgpod-Time-handling.html#itdb-time-get-mac-time"/>
     <function name="itdb_time_mac_to_host ()" link="libgpod-Time-handling.html#itdb-time-mac-to-host"/>
     <function name="itdb_time_host_to_mac ()" link="libgpod-Time-handling.html#itdb-time-host-to-mac"/>
+    <function name="" link="libgpod-Time-handling.html#id2805405"/>
+    <function name="" link="libgpod-Time-handling.html#id2805406"/>
     <function name="itdb_get_control_dir ()" link="libgpod-Low-level-functions.html#itdb-get-control-dir"/>
     <function name="itdb_get_itunes_dir ()" link="libgpod-Low-level-functions.html#itdb-get-itunes-dir"/>
     <function name="itdb_get_music_dir ()" link="libgpod-Low-level-functions.html#itdb-get-music-dir"/>
@@ -54,14 +62,16 @@
     <function name="itdb_get_photos_thumb_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir"/>
     <function name="itdb_get_path ()" link="libgpod-Low-level-functions.html#itdb-get-path"/>
     <function name="itdb_resolve_path ()" link="libgpod-Low-level-functions.html#itdb-resolve-path"/>
-    <function name="itdb_shuffle_write ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write"/>
-    <function name="itdb_shuffle_write_file ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write-file"/>
     <function name="itdb_cp ()" link="libgpod-Low-level-functions.html#itdb-cp"/>
     <function name="itdb_cp_get_dest_filename ()" link="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename"/>
     <function name="itdb_cp_finalize ()" link="libgpod-Low-level-functions.html#itdb-cp-finalize"/>
     <function name="itdb_parse_file ()" link="libgpod-Low-level-functions.html#itdb-parse-file"/>
     <function name="itdb_write_file ()" link="libgpod-Low-level-functions.html#itdb-write-file"/>
+    <function name="itdb_shuffle_write ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write"/>
+    <function name="itdb_shuffle_write_file ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write-file"/>
     <function name="itdb_duplicate ()" link="libgpod-Low-level-functions.html#itdb-duplicate"/>
+    <function name="" link="libgpod-Low-level-functions.html#id2830320"/>
+    <function name="" link="libgpod-Low-level-functions.html#id2830321"/>
     <function name="Itdb_Track" link="libgpod-Tracks.html#Itdb-Track"/>
     <function name="enum Itdb_Mediatype" link="libgpod-Tracks.html#Itdb-Mediatype"/>
     <function name="ITDB_RATING_STEP" link="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"/>
@@ -75,10 +85,14 @@
     <function name="itdb_track_id_tree_create ()" link="libgpod-Tracks.html#itdb-track-id-tree-create"/>
     <function name="itdb_track_id_tree_destroy ()" link="libgpod-Tracks.html#itdb-track-id-tree-destroy"/>
     <function name="itdb_track_id_tree_by_id ()" link="libgpod-Tracks.html#itdb-track-id-tree-by-id"/>
+    <function name="itdb_track_get_thumbnail ()" link="libgpod-Tracks.html#itdb-track-get-thumbnail"/>
+    <function name="itdb_track_has_thumbnails ()" link="libgpod-Tracks.html#itdb-track-has-thumbnails"/>
     <function name="itdb_track_set_thumbnails ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails"/>
     <function name="itdb_track_set_thumbnails_from_data ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data"/>
     <function name="itdb_track_set_thumbnails_from_pixbuf ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf"/>
     <function name="itdb_track_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails"/>
+    <function name="" link="libgpod-Tracks.html#id2837908"/>
+    <function name="" link="libgpod-Tracks.html#id2837909"/>
     <function name="Itdb_Playlist" link="libgpod-Playlists.html#Itdb-Playlist"/>
     <function name="enum ItdbPlaylistSortOrder" link="libgpod-Playlists.html#ItdbPlaylistSortOrder"/>
     <function name="itdb_playlist_new ()" link="libgpod-Playlists.html#itdb-playlist-new"/>
@@ -104,6 +118,8 @@
     <function name="itdb_playlist_by_nr ()" link="libgpod-Playlists.html#itdb-playlist-by-nr"/>
     <function name="itdb_playlist_by_name ()" link="libgpod-Playlists.html#itdb-playlist-by-name"/>
     <function name="itdb_playlist_randomize ()" link="libgpod-Playlists.html#itdb-playlist-randomize"/>
+    <function name="" link="libgpod-Playlists.html#id2841462"/>
+    <function name="" link="libgpod-Playlists.html#id2841463"/>
     <function name="Itdb_SPLPref" link="libgpod-Smart-Playlists.html#Itdb-SPLPref"/>
     <function name="Itdb_SPLRule" link="libgpod-Smart-Playlists.html#Itdb-SPLRule"/>
     <function name="Itdb_SPLRules" link="libgpod-Smart-Playlists.html#Itdb-SPLRules"/>
@@ -129,23 +145,37 @@
     <function name="itdb_spl_update ()" link="libgpod-Smart-Playlists.html#itdb-spl-update"/>
     <function name="itdb_spl_update_all ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-all"/>
     <function name="itdb_spl_update_live ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-live"/>
+    <function name="" link="libgpod-Smart-Playlists.html#id2847822"/>
+    <function name="" link="libgpod-Smart-Playlists.html#id2847824"/>
     <function name="Itdb_Artwork" link="libgpod-Artwork.html#Itdb-Artwork"/>
-    <function name="Itdb_Thumb" link="libgpod-Artwork.html#Itdb-Thumb"/>
-    <function name="enum ItdbThumbType" link="libgpod-Artwork.html#ItdbThumbType"/>
     <function name="itdb_artwork_new ()" link="libgpod-Artwork.html#itdb-artwork-new"/>
     <function name="itdb_artwork_duplicate ()" link="libgpod-Artwork.html#itdb-artwork-duplicate"/>
     <function name="itdb_artwork_free ()" link="libgpod-Artwork.html#itdb-artwork-free"/>
-    <function name="itdb_artwork_add_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-add-thumbnail"/>
-    <function name="itdb_artwork_add_thumbnail_from_data ()" link="libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-data"/>
-    <function name="itdb_artwork_add_thumbnail_from_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-pixbuf"/>
-    <function name="itdb_artwork_remove_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnail"/>
+    <function name="itdb_artwork_get_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-get-pixbuf"/>
+    <function name="itdb_artwork_set_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail"/>
+    <function name="itdb_artwork_set_thumbnail_from_data ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data"/>
+    <function name="itdb_artwork_set_thumbnail_from_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf"/>
     <function name="itdb_artwork_remove_thumbnails ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnails"/>
-    <function name="itdb_artwork_get_thumb_by_type ()" link="libgpod-Artwork.html#itdb-artwork-get-thumb-by-type"/>
-    <function name="itdb_thumb_get_gdk_pixbuf ()" link="libgpod-Artwork.html#itdb-thumb-get-gdk-pixbuf"/>
+    <function name="Itdb_Thumb" link="libgpod-Artwork.html#Itdb-Thumb"/>
     <function name="itdb_thumb_duplicate ()" link="libgpod-Artwork.html#itdb-thumb-duplicate"/>
     <function name="itdb_thumb_free ()" link="libgpod-Artwork.html#itdb-thumb-free"/>
-    <function name="itdb_thumb_new ()" link="libgpod-Artwork.html#itdb-thumb-new"/>
-    <function name="itdb_thumb_get_filename ()" link="libgpod-Artwork.html#itdb-thumb-get-filename"/>
+    <function name="itdb_thumb_to_pixbuf_at_size ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size"/>
+    <function name="itdb_thumb_to_pixbufs ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbufs"/>
+    <function name="" link="libgpod-Artwork.html#id2849125"/>
+    <function name="" link="libgpod-Artwork.html#id2849126"/>
+    <function name="Itdb_Chapter" link="libgpod-Chapter-Data.html#Itdb-Chapter"/>
+    <function name="Itdb_Chapterdata" link="libgpod-Chapter-Data.html#Itdb-Chapterdata"/>
+    <function name="itdb_chapter_new ()" link="libgpod-Chapter-Data.html#itdb-chapter-new"/>
+    <function name="itdb_chapter_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapter-duplicate"/>
+    <function name="itdb_chapter_free ()" link="libgpod-Chapter-Data.html#itdb-chapter-free"/>
+    <function name="itdb_chapterdata_new ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-new"/>
+    <function name="itdb_chapterdata_add_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter"/>
+    <function name="itdb_chapterdata_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-duplicate"/>
+    <function name="itdb_chapterdata_remove_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter"/>
+    <function name="itdb_chapterdata_remove_chapters ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters"/>
+    <function name="itdb_chapterdata_free ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-free"/>
+    <function name="" link="libgpod-Chapter-Data.html#id2844181"/>
+    <function name="" link="libgpod-Chapter-Data.html#id2844182"/>
     <function name="Itdb_Device" link="libgpod-Device.html#Itdb-Device"/>
     <function name="itdb_device_new ()" link="libgpod-Device.html#itdb-device-new"/>
     <function name="itdb_device_free ()" link="libgpod-Device.html#itdb-device-free"/>
@@ -154,30 +184,35 @@
     <function name="itdb_device_get_sysinfo ()" link="libgpod-Device.html#itdb-device-get-sysinfo"/>
     <function name="itdb_device_set_sysinfo ()" link="libgpod-Device.html#itdb-device-set-sysinfo"/>
     <function name="itdb_device_write_sysinfo ()" link="libgpod-Device.html#itdb-device-write-sysinfo"/>
+    <function name="Itdb_IpodInfo" link="libgpod-Device.html#Itdb-IpodInfo"/>
     <function name="itdb_device_get_ipod_info ()" link="libgpod-Device.html#itdb-device-get-ipod-info"/>
     <function name="itdb_device_supports_artwork ()" link="libgpod-Device.html#itdb-device-supports-artwork"/>
     <function name="itdb_device_supports_photo ()" link="libgpod-Device.html#itdb-device-supports-photo"/>
+    <function name="itdb_device_supports_video ()" link="libgpod-Device.html#itdb-device-supports-video"/>
     <function name="itdb_info_get_ipod_info_table ()" link="libgpod-Device.html#itdb-info-get-ipod-info-table"/>
+    <function name="enum Itdb_IpodGeneration" link="libgpod-Device.html#Itdb-IpodGeneration"/>
     <function name="itdb_info_get_ipod_generation_string ()" link="libgpod-Device.html#itdb-info-get-ipod-generation-string"/>
+    <function name="enum Itdb_IpodModel" link="libgpod-Device.html#Itdb-IpodModel"/>
     <function name="itdb_info_get_ipod_model_name_string ()" link="libgpod-Device.html#itdb-info-get-ipod-model-name-string"/>
     <function name="itdb_init_ipod ()" link="libgpod-Device.html#itdb-init-ipod"/>
-    <function name="enum Itdb_IpodGeneration" link="libgpod-Device.html#Itdb-IpodGeneration"/>
-    <function name="Itdb_IpodInfo" link="libgpod-Device.html#Itdb-IpodInfo"/>
-    <function name="enum Itdb_IpodModel" link="libgpod-Device.html#Itdb-IpodModel"/>
     <function name="Itdb_ArtworkFormat" link="libgpod-Device.html#Itdb-ArtworkFormat"/>
-    <function name="Itdb_PhotoAlbum" link="libgpod-Photo-database.html#Itdb-PhotoAlbum"/>
+    <function name="" link="libgpod-Device.html#id2856365"/>
+    <function name="" link="libgpod-Device.html#id2856366"/>
     <function name="Itdb_PhotoDB" link="libgpod-Photo-database.html#Itdb-PhotoDB"/>
+    <function name="itdb_photodb_create ()" link="libgpod-Photo-database.html#itdb-photodb-create"/>
+    <function name="itdb_photodb_free ()" link="libgpod-Photo-database.html#itdb-photodb-free"/>
+    <function name="itdb_photodb_parse ()" link="libgpod-Photo-database.html#itdb-photodb-parse"/>
+    <function name="itdb_photodb_write ()" link="libgpod-Photo-database.html#itdb-photodb-write"/>
     <function name="itdb_photodb_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo"/>
     <function name="itdb_photodb_add_photo_from_data ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"/>
     <function name="itdb_photodb_add_photo_from_pixbuf ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf"/>
-    <function name="itdb_photodb_create ()" link="libgpod-Photo-database.html#itdb-photodb-create"/>
-    <function name="itdb_photodb_free ()" link="libgpod-Photo-database.html#itdb-photodb-free"/>
-    <function name="itdb_photodb_parse ()" link="libgpod-Photo-database.html#itdb-photodb-parse"/>
+    <function name="itdb_photodb_remove_photo ()" link="libgpod-Photo-database.html#itdb-photodb-remove-photo"/>
+    <function name="Itdb_PhotoAlbum" link="libgpod-Photo-database.html#Itdb-PhotoAlbum"/>
+    <function name="itdb_photodb_photoalbum_create ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"/>
     <function name="itdb_photodb_photoalbum_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo"/>
     <function name="itdb_photodb_photoalbum_by_name ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name"/>
-    <function name="itdb_photodb_photoalbum_create ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"/>
     <function name="itdb_photodb_photoalbum_remove ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove"/>
-    <function name="itdb_photodb_remove_photo ()" link="libgpod-Photo-database.html#itdb-photodb-remove-photo"/>
-    <function name="itdb_photodb_write ()" link="libgpod-Photo-database.html#itdb-photodb-write"/>
+    <function name="" link="libgpod-Photo-database.html#id2859677"/>
+    <function name="" link="libgpod-Photo-database.html#id2859678"/>
   </functions>
 </book>

Modified: libgpod/trunk/docs/reference/html/libgpod.devhelp2
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod.devhelp2	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/libgpod.devhelp2	2009-01-24 12:10:00 UTC (rev 341)
@@ -12,6 +12,7 @@
         <sub name="Playlists" link="libgpod-Playlists.html"/>
         <sub name="Smart Playlists" link="libgpod-Smart-Playlists.html"/>
         <sub name="Artwork" link="libgpod-Artwork.html"/>
+        <sub name="Chapter Data" link="libgpod-Chapter-Data.html"/>
         <sub name="Device" link="libgpod-Device.html"/>
       </sub>
     </sub>
@@ -21,49 +22,58 @@
   </chapters>
   <functions>
     <keyword type="struct" name="Itdb_iTunesDB" link="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"/>
-    <keyword type="function" name="ItdbUserDataDestroyFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"/>
-    <keyword type="function" name="ItdbUserDataDuplicateFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"/>
+    <keyword type="enum" name="enum ItdbFileError" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError"/>
     <keyword type="function" name="itdb_new ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new"/>
     <keyword type="function" name="itdb_free ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"/>
     <keyword type="function" name="itdb_parse ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"/>
     <keyword type="function" name="itdb_write ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write"/>
-    <keyword type="function" name="itdb_set_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint"/>
-    <keyword type="function" name="itdb_get_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint"/>
+    <keyword type="function" name="itdb_set_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint" since="0.1.3"/>
+    <keyword type="function" name="itdb_get_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint" since="0.4.0"/>
     <keyword type="function" name="itdb_tracks_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number"/>
     <keyword type="function" name="itdb_tracks_number_nontransferred ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred"/>
     <keyword type="function" name="itdb_playlists_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number"/>
+    <keyword type="function" name="ItdbUserDataDestroyFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"/>
+    <keyword type="function" name="ItdbUserDataDuplicateFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"/>
+    <keyword type="" name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2784562"/>
+    <keyword type="" name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2784563"/>
     <keyword type="function" name="itdb_cp_track_to_ipod ()" link="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod"/>
     <keyword type="function" name="itdb_filename_fs2ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-fs2ipod"/>
     <keyword type="function" name="itdb_filename_ipod2fs ()" link="libgpod-File-handling-functions.html#itdb-filename-ipod2fs"/>
     <keyword type="function" name="itdb_filename_on_ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-on-ipod"/>
-    <keyword type="function" name="itdb_musicdirs_number ()" link="libgpod-File-handling-functions.html#itdb-musicdirs-number"/>
+    <keyword type="function" name="itdb_musicdirs_number ()" link="libgpod-File-handling-functions.html#itdb-musicdirs-number" since="0.1.3"/>
     <keyword type="function" name="itdb_rename_files ()" link="libgpod-File-handling-functions.html#itdb-rename-files"/>
+    <keyword type="" name="" link="libgpod-File-handling-functions.html#id2810657"/>
+    <keyword type="" name="" link="libgpod-File-handling-functions.html#id2810658"/>
     <keyword type="function" name="itdb_time_get_mac_time ()" link="libgpod-Time-handling.html#itdb-time-get-mac-time" deprecated=""/>
     <keyword type="function" name="itdb_time_mac_to_host ()" link="libgpod-Time-handling.html#itdb-time-mac-to-host" deprecated=""/>
     <keyword type="function" name="itdb_time_host_to_mac ()" link="libgpod-Time-handling.html#itdb-time-host-to-mac" deprecated=""/>
-    <keyword type="function" name="itdb_get_control_dir ()" link="libgpod-Low-level-functions.html#itdb-get-control-dir"/>
-    <keyword type="function" name="itdb_get_itunes_dir ()" link="libgpod-Low-level-functions.html#itdb-get-itunes-dir"/>
+    <keyword type="" name="" link="libgpod-Time-handling.html#id2805405"/>
+    <keyword type="" name="" link="libgpod-Time-handling.html#id2805406"/>
+    <keyword type="function" name="itdb_get_control_dir ()" link="libgpod-Low-level-functions.html#itdb-get-control-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_itunes_dir ()" link="libgpod-Low-level-functions.html#itdb-get-itunes-dir" since="0.4.0"/>
     <keyword type="function" name="itdb_get_music_dir ()" link="libgpod-Low-level-functions.html#itdb-get-music-dir"/>
-    <keyword type="function" name="itdb_get_artwork_dir ()" link="libgpod-Low-level-functions.html#itdb-get-artwork-dir"/>
-    <keyword type="function" name="itdb_get_device_dir ()" link="libgpod-Low-level-functions.html#itdb-get-device-dir"/>
-    <keyword type="function" name="itdb_get_photos_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-dir"/>
-    <keyword type="function" name="itdb_get_itunesdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunesdb-path"/>
-    <keyword type="function" name="itdb_get_itunessd_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunessd-path"/>
-    <keyword type="function" name="itdb_get_artworkdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-artworkdb-path"/>
-    <keyword type="function" name="itdb_get_photodb_path ()" link="libgpod-Low-level-functions.html#itdb-get-photodb-path"/>
-    <keyword type="function" name="itdb_get_photos_thumb_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir"/>
-    <keyword type="function" name="itdb_get_path ()" link="libgpod-Low-level-functions.html#itdb-get-path"/>
+    <keyword type="function" name="itdb_get_artwork_dir ()" link="libgpod-Low-level-functions.html#itdb-get-artwork-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_device_dir ()" link="libgpod-Low-level-functions.html#itdb-get-device-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_photos_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_itunesdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunesdb-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_itunessd_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunessd-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_artworkdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-artworkdb-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_photodb_path ()" link="libgpod-Low-level-functions.html#itdb-get-photodb-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_photos_thumb_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_path ()" link="libgpod-Low-level-functions.html#itdb-get-path" since="0.4.0"/>
     <keyword type="function" name="itdb_resolve_path ()" link="libgpod-Low-level-functions.html#itdb-resolve-path"/>
-    <keyword type="function" name="itdb_shuffle_write ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write"/>
-    <keyword type="function" name="itdb_shuffle_write_file ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write-file"/>
     <keyword type="function" name="itdb_cp ()" link="libgpod-Low-level-functions.html#itdb-cp"/>
-    <keyword type="function" name="itdb_cp_get_dest_filename ()" link="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename"/>
-    <keyword type="function" name="itdb_cp_finalize ()" link="libgpod-Low-level-functions.html#itdb-cp-finalize"/>
+    <keyword type="function" name="itdb_cp_get_dest_filename ()" link="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename" since="0.5.0"/>
+    <keyword type="function" name="itdb_cp_finalize ()" link="libgpod-Low-level-functions.html#itdb-cp-finalize" since="0.5.0"/>
     <keyword type="function" name="itdb_parse_file ()" link="libgpod-Low-level-functions.html#itdb-parse-file"/>
     <keyword type="function" name="itdb_write_file ()" link="libgpod-Low-level-functions.html#itdb-write-file"/>
+    <keyword type="function" name="itdb_shuffle_write ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write"/>
+    <keyword type="function" name="itdb_shuffle_write_file ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write-file"/>
     <keyword type="function" name="itdb_duplicate ()" link="libgpod-Low-level-functions.html#itdb-duplicate"/>
+    <keyword type="" name="" link="libgpod-Low-level-functions.html#id2830320"/>
+    <keyword type="" name="" link="libgpod-Low-level-functions.html#id2830321"/>
     <keyword type="struct" name="Itdb_Track" link="libgpod-Tracks.html#Itdb-Track"/>
-    <keyword type="enum" name="enum Itdb_Mediatype" link="libgpod-Tracks.html#Itdb-Mediatype"/>
+    <keyword type="enum" name="enum Itdb_Mediatype" link="libgpod-Tracks.html#Itdb-Mediatype" since="0.5.0"/>
     <keyword type="macro" name="ITDB_RATING_STEP" link="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"/>
     <keyword type="function" name="itdb_track_new ()" link="libgpod-Tracks.html#itdb-track-new"/>
     <keyword type="function" name="itdb_track_free ()" link="libgpod-Tracks.html#itdb-track-free"/>
@@ -75,12 +85,16 @@
     <keyword type="function" name="itdb_track_id_tree_create ()" link="libgpod-Tracks.html#itdb-track-id-tree-create"/>
     <keyword type="function" name="itdb_track_id_tree_destroy ()" link="libgpod-Tracks.html#itdb-track-id-tree-destroy"/>
     <keyword type="function" name="itdb_track_id_tree_by_id ()" link="libgpod-Tracks.html#itdb-track-id-tree-by-id"/>
-    <keyword type="function" name="itdb_track_set_thumbnails ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails"/>
-    <keyword type="function" name="itdb_track_set_thumbnails_from_data ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data"/>
-    <keyword type="function" name="itdb_track_set_thumbnails_from_pixbuf ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf"/>
-    <keyword type="function" name="itdb_track_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails"/>
+    <keyword type="function" name="itdb_track_get_thumbnail ()" link="libgpod-Tracks.html#itdb-track-get-thumbnail" since="0.7.0"/>
+    <keyword type="function" name="itdb_track_has_thumbnails ()" link="libgpod-Tracks.html#itdb-track-has-thumbnails" since="0.7.0"/>
+    <keyword type="function" name="itdb_track_set_thumbnails ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails" since="0.3.0"/>
+    <keyword type="function" name="itdb_track_set_thumbnails_from_data ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data" since="0.4.0"/>
+    <keyword type="function" name="itdb_track_set_thumbnails_from_pixbuf ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf" since="0.5.0"/>
+    <keyword type="function" name="itdb_track_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails" since="0.3.0"/>
+    <keyword type="" name="" link="libgpod-Tracks.html#id2837908"/>
+    <keyword type="" name="" link="libgpod-Tracks.html#id2837909"/>
     <keyword type="struct" name="Itdb_Playlist" link="libgpod-Playlists.html#Itdb-Playlist"/>
-    <keyword type="enum" name="enum ItdbPlaylistSortOrder" link="libgpod-Playlists.html#ItdbPlaylistSortOrder"/>
+    <keyword type="enum" name="enum ItdbPlaylistSortOrder" link="libgpod-Playlists.html#ItdbPlaylistSortOrder" since="0.1.3"/>
     <keyword type="function" name="itdb_playlist_new ()" link="libgpod-Playlists.html#itdb-playlist-new"/>
     <keyword type="function" name="itdb_playlist_free ()" link="libgpod-Playlists.html#itdb-playlist-free"/>
     <keyword type="function" name="itdb_playlist_duplicate ()" link="libgpod-Playlists.html#itdb-playlist-duplicate"/>
@@ -94,29 +108,31 @@
     <keyword type="function" name="itdb_playlist_contain_track_number ()" link="libgpod-Playlists.html#itdb-playlist-contain-track-number"/>
     <keyword type="function" name="itdb_playlist_tracks_number ()" link="libgpod-Playlists.html#itdb-playlist-tracks-number"/>
     <keyword type="function" name="itdb_playlist_mpl ()" link="libgpod-Playlists.html#itdb-playlist-mpl"/>
-    <keyword type="function" name="itdb_playlist_is_mpl ()" link="libgpod-Playlists.html#itdb-playlist-is-mpl"/>
-    <keyword type="function" name="itdb_playlist_set_mpl ()" link="libgpod-Playlists.html#itdb-playlist-set-mpl"/>
-    <keyword type="function" name="itdb_playlist_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-podcasts"/>
-    <keyword type="function" name="itdb_playlist_is_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-is-podcasts"/>
-    <keyword type="function" name="itdb_playlist_set_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-set-podcasts"/>
+    <keyword type="function" name="itdb_playlist_is_mpl ()" link="libgpod-Playlists.html#itdb-playlist-is-mpl" since="0.1.6"/>
+    <keyword type="function" name="itdb_playlist_set_mpl ()" link="libgpod-Playlists.html#itdb-playlist-set-mpl" since="0.2.0"/>
+    <keyword type="function" name="itdb_playlist_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-podcasts" since="0.1.6"/>
+    <keyword type="function" name="itdb_playlist_is_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-is-podcasts" since="0.1.6"/>
+    <keyword type="function" name="itdb_playlist_set_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-set-podcasts" since="0.2.0"/>
     <keyword type="function" name="itdb_playlist_exists ()" link="libgpod-Playlists.html#itdb-playlist-exists"/>
     <keyword type="function" name="itdb_playlist_by_id ()" link="libgpod-Playlists.html#itdb-playlist-by-id"/>
     <keyword type="function" name="itdb_playlist_by_nr ()" link="libgpod-Playlists.html#itdb-playlist-by-nr"/>
     <keyword type="function" name="itdb_playlist_by_name ()" link="libgpod-Playlists.html#itdb-playlist-by-name"/>
     <keyword type="function" name="itdb_playlist_randomize ()" link="libgpod-Playlists.html#itdb-playlist-randomize"/>
-    <keyword type="struct" name="Itdb_SPLPref" link="libgpod-Smart-Playlists.html#Itdb-SPLPref"/>
-    <keyword type="struct" name="Itdb_SPLRule" link="libgpod-Smart-Playlists.html#Itdb-SPLRule"/>
-    <keyword type="struct" name="Itdb_SPLRules" link="libgpod-Smart-Playlists.html#Itdb-SPLRules"/>
-    <keyword type="enum" name="enum ItdbLimitSort" link="libgpod-Smart-Playlists.html#ItdbLimitSort"/>
-    <keyword type="enum" name="enum ItdbLimitType" link="libgpod-Smart-Playlists.html#ItdbLimitType"/>
-    <keyword type="enum" name="enum ItdbSPLAction" link="libgpod-Smart-Playlists.html#ItdbSPLAction"/>
-    <keyword type="enum" name="enum ItdbSPLActionLast" link="libgpod-Smart-Playlists.html#ItdbSPLActionLast"/>
-    <keyword type="enum" name="enum ItdbSPLActionType" link="libgpod-Smart-Playlists.html#ItdbSPLActionType"/>
-    <keyword type="enum" name="enum ItdbSPLField" link="libgpod-Smart-Playlists.html#ItdbSPLField"/>
-    <keyword type="enum" name="enum ItdbSPLFieldType" link="libgpod-Smart-Playlists.html#ItdbSPLFieldType"/>
+    <keyword type="" name="" link="libgpod-Playlists.html#id2841462"/>
+    <keyword type="" name="" link="libgpod-Playlists.html#id2841463"/>
+    <keyword type="struct" name="Itdb_SPLPref" link="libgpod-Smart-Playlists.html#Itdb-SPLPref" since="0.5.0"/>
+    <keyword type="struct" name="Itdb_SPLRule" link="libgpod-Smart-Playlists.html#Itdb-SPLRule" since="0.5.0"/>
+    <keyword type="struct" name="Itdb_SPLRules" link="libgpod-Smart-Playlists.html#Itdb-SPLRules" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbLimitSort" link="libgpod-Smart-Playlists.html#ItdbLimitSort" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbLimitType" link="libgpod-Smart-Playlists.html#ItdbLimitType" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLAction" link="libgpod-Smart-Playlists.html#ItdbSPLAction" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLActionLast" link="libgpod-Smart-Playlists.html#ItdbSPLActionLast" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLActionType" link="libgpod-Smart-Playlists.html#ItdbSPLActionType" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLField" link="libgpod-Smart-Playlists.html#ItdbSPLField" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLFieldType" link="libgpod-Smart-Playlists.html#ItdbSPLFieldType" since="0.5.0"/>
     <keyword type="enum" name="enum ItdbSPLMatch" link="libgpod-Smart-Playlists.html#ItdbSPLMatch"/>
-    <keyword type="macro" name="ITDB_SPL_DATE_IDENTIFIER" link="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS"/>
-    <keyword type="macro" name="ITDB_SPL_STRING_MAXLEN" link="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS"/>
+    <keyword type="macro" name="ITDB_SPL_DATE_IDENTIFIER" link="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS" since="0.5.0"/>
+    <keyword type="macro" name="ITDB_SPL_STRING_MAXLEN" link="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS" since="0.5.0"/>
     <keyword type="function" name="itdb_splr_get_field_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-field-type"/>
     <keyword type="function" name="itdb_splr_get_action_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-action-type"/>
     <keyword type="function" name="itdb_splr_validate ()" link="libgpod-Smart-Playlists.html#itdb-splr-validate"/>
@@ -128,56 +144,75 @@
     <keyword type="function" name="itdb_splr_eval ()" link="libgpod-Smart-Playlists.html#itdb-splr-eval"/>
     <keyword type="function" name="itdb_spl_update ()" link="libgpod-Smart-Playlists.html#itdb-spl-update"/>
     <keyword type="function" name="itdb_spl_update_all ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-all"/>
-    <keyword type="function" name="itdb_spl_update_live ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-live"/>
-    <keyword type="struct" name="Itdb_Artwork" link="libgpod-Artwork.html#Itdb-Artwork"/>
-    <keyword type="struct" name="Itdb_Thumb" link="libgpod-Artwork.html#Itdb-Thumb"/>
-    <keyword type="enum" name="enum ItdbThumbType" link="libgpod-Artwork.html#ItdbThumbType"/>
-    <keyword type="function" name="itdb_artwork_new ()" link="libgpod-Artwork.html#itdb-artwork-new"/>
-    <keyword type="function" name="itdb_artwork_duplicate ()" link="libgpod-Artwork.html#itdb-artwork-duplicate"/>
-    <keyword type="function" name="itdb_artwork_free ()" link="libgpod-Artwork.html#itdb-artwork-free"/>
-    <keyword type="function" name="itdb_artwork_add_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-add-thumbnail"/>
-    <keyword type="function" name="itdb_artwork_add_thumbnail_from_data ()" link="libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-data"/>
-    <keyword type="function" name="itdb_artwork_add_thumbnail_from_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-add-thumbnail-from-pixbuf"/>
-    <keyword type="function" name="itdb_artwork_remove_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnail"/>
-    <keyword type="function" name="itdb_artwork_remove_thumbnails ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnails"/>
-    <keyword type="function" name="itdb_artwork_get_thumb_by_type ()" link="libgpod-Artwork.html#itdb-artwork-get-thumb-by-type"/>
-    <keyword type="function" name="itdb_thumb_get_gdk_pixbuf ()" link="libgpod-Artwork.html#itdb-thumb-get-gdk-pixbuf"/>
-    <keyword type="function" name="itdb_thumb_duplicate ()" link="libgpod-Artwork.html#itdb-thumb-duplicate"/>
-    <keyword type="function" name="itdb_thumb_free ()" link="libgpod-Artwork.html#itdb-thumb-free"/>
-    <keyword type="function" name="itdb_thumb_new ()" link="libgpod-Artwork.html#itdb-thumb-new"/>
-    <keyword type="function" name="itdb_thumb_get_filename ()" link="libgpod-Artwork.html#itdb-thumb-get-filename"/>
-    <keyword type="struct" name="Itdb_Device" link="libgpod-Device.html#Itdb-Device"/>
-    <keyword type="function" name="itdb_device_new ()" link="libgpod-Device.html#itdb-device-new"/>
-    <keyword type="function" name="itdb_device_free ()" link="libgpod-Device.html#itdb-device-free"/>
-    <keyword type="function" name="itdb_device_set_mountpoint ()" link="libgpod-Device.html#itdb-device-set-mountpoint"/>
-    <keyword type="function" name="itdb_device_read_sysinfo ()" link="libgpod-Device.html#itdb-device-read-sysinfo"/>
-    <keyword type="function" name="itdb_device_get_sysinfo ()" link="libgpod-Device.html#itdb-device-get-sysinfo"/>
-    <keyword type="function" name="itdb_device_set_sysinfo ()" link="libgpod-Device.html#itdb-device-set-sysinfo"/>
-    <keyword type="function" name="itdb_device_write_sysinfo ()" link="libgpod-Device.html#itdb-device-write-sysinfo"/>
-    <keyword type="function" name="itdb_device_get_ipod_info ()" link="libgpod-Device.html#itdb-device-get-ipod-info"/>
-    <keyword type="function" name="itdb_device_supports_artwork ()" link="libgpod-Device.html#itdb-device-supports-artwork"/>
-    <keyword type="function" name="itdb_device_supports_photo ()" link="libgpod-Device.html#itdb-device-supports-photo"/>
-    <keyword type="function" name="itdb_info_get_ipod_info_table ()" link="libgpod-Device.html#itdb-info-get-ipod-info-table"/>
-    <keyword type="function" name="itdb_info_get_ipod_generation_string ()" link="libgpod-Device.html#itdb-info-get-ipod-generation-string"/>
-    <keyword type="function" name="itdb_info_get_ipod_model_name_string ()" link="libgpod-Device.html#itdb-info-get-ipod-model-name-string"/>
-    <keyword type="function" name="itdb_init_ipod ()" link="libgpod-Device.html#itdb-init-ipod"/>
-    <keyword type="enum" name="enum Itdb_IpodGeneration" link="libgpod-Device.html#Itdb-IpodGeneration"/>
-    <keyword type="struct" name="Itdb_IpodInfo" link="libgpod-Device.html#Itdb-IpodInfo"/>
-    <keyword type="enum" name="enum Itdb_IpodModel" link="libgpod-Device.html#Itdb-IpodModel"/>
+    <keyword type="function" name="itdb_spl_update_live ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-live" since="0.2.0"/>
+    <keyword type="" name="" link="libgpod-Smart-Playlists.html#id2847822"/>
+    <keyword type="" name="" link="libgpod-Smart-Playlists.html#id2847824"/>
+    <keyword type="struct" name="Itdb_Artwork" link="libgpod-Artwork.html#Itdb-Artwork" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_new ()" link="libgpod-Artwork.html#itdb-artwork-new" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_duplicate ()" link="libgpod-Artwork.html#itdb-artwork-duplicate" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_free ()" link="libgpod-Artwork.html#itdb-artwork-free" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_get_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-get-pixbuf" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_set_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_set_thumbnail_from_data ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_set_thumbnail_from_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_remove_thumbnails ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnails" since="0.3.0"/>
+    <keyword type="struct" name="Itdb_Thumb" link="libgpod-Artwork.html#Itdb-Thumb" since="0.3.0"/>
+    <keyword type="function" name="itdb_thumb_duplicate ()" link="libgpod-Artwork.html#itdb-thumb-duplicate" since="0.3.0"/>
+    <keyword type="function" name="itdb_thumb_free ()" link="libgpod-Artwork.html#itdb-thumb-free" since="0.3.0"/>
+    <keyword type="function" name="itdb_thumb_to_pixbuf_at_size ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size" since="0.7.0"/>
+    <keyword type="function" name="itdb_thumb_to_pixbufs ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbufs" since="0.7.0"/>
+    <keyword type="" name="" link="libgpod-Artwork.html#id2849125"/>
+    <keyword type="" name="" link="libgpod-Artwork.html#id2849126"/>
+    <keyword type="struct" name="Itdb_Chapter" link="libgpod-Chapter-Data.html#Itdb-Chapter" since="0.7.0"/>
+    <keyword type="struct" name="Itdb_Chapterdata" link="libgpod-Chapter-Data.html#Itdb-Chapterdata" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapter_new ()" link="libgpod-Chapter-Data.html#itdb-chapter-new" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapter_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapter-duplicate" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapter_free ()" link="libgpod-Chapter-Data.html#itdb-chapter-free" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_new ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-new" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_add_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-duplicate" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_remove_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_remove_chapters ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_free ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-free" since="0.7.0"/>
+    <keyword type="" name="" link="libgpod-Chapter-Data.html#id2844181"/>
+    <keyword type="" name="" link="libgpod-Chapter-Data.html#id2844182"/>
+    <keyword type="struct" name="Itdb_Device" link="libgpod-Device.html#Itdb-Device" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_new ()" link="libgpod-Device.html#itdb-device-new" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_free ()" link="libgpod-Device.html#itdb-device-free" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_set_mountpoint ()" link="libgpod-Device.html#itdb-device-set-mountpoint" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_read_sysinfo ()" link="libgpod-Device.html#itdb-device-read-sysinfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_get_sysinfo ()" link="libgpod-Device.html#itdb-device-get-sysinfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_set_sysinfo ()" link="libgpod-Device.html#itdb-device-set-sysinfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_write_sysinfo ()" link="libgpod-Device.html#itdb-device-write-sysinfo" since="0.4.0"/>
+    <keyword type="struct" name="Itdb_IpodInfo" link="libgpod-Device.html#Itdb-IpodInfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_get_ipod_info ()" link="libgpod-Device.html#itdb-device-get-ipod-info" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_supports_artwork ()" link="libgpod-Device.html#itdb-device-supports-artwork" since="0.5.0"/>
+    <keyword type="function" name="itdb_device_supports_photo ()" link="libgpod-Device.html#itdb-device-supports-photo" since="0.5.0"/>
+    <keyword type="function" name="itdb_device_supports_video ()" link="libgpod-Device.html#itdb-device-supports-video" since="0.7.0"/>
+    <keyword type="function" name="itdb_info_get_ipod_info_table ()" link="libgpod-Device.html#itdb-info-get-ipod-info-table" since="0.4.0"/>
+    <keyword type="enum" name="enum Itdb_IpodGeneration" link="libgpod-Device.html#Itdb-IpodGeneration" since="0.4.0"/>
+    <keyword type="function" name="itdb_info_get_ipod_generation_string ()" link="libgpod-Device.html#itdb-info-get-ipod-generation-string" since="0.4.0"/>
+    <keyword type="enum" name="enum Itdb_IpodModel" link="libgpod-Device.html#Itdb-IpodModel" since="0.4.0"/>
+    <keyword type="function" name="itdb_info_get_ipod_model_name_string ()" link="libgpod-Device.html#itdb-info-get-ipod-model-name-string" since="0.4.0"/>
+    <keyword type="function" name="itdb_init_ipod ()" link="libgpod-Device.html#itdb-init-ipod" since="0.4.0"/>
     <keyword type="struct" name="Itdb_ArtworkFormat" link="libgpod-Device.html#Itdb-ArtworkFormat"/>
-    <keyword type="struct" name="Itdb_PhotoAlbum" link="libgpod-Photo-database.html#Itdb-PhotoAlbum"/>
-    <keyword type="struct" name="Itdb_PhotoDB" link="libgpod-Photo-database.html#Itdb-PhotoDB"/>
-    <keyword type="function" name="itdb_photodb_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo"/>
-    <keyword type="function" name="itdb_photodb_add_photo_from_data ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"/>
-    <keyword type="function" name="itdb_photodb_add_photo_from_pixbuf ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf"/>
-    <keyword type="function" name="itdb_photodb_create ()" link="libgpod-Photo-database.html#itdb-photodb-create"/>
-    <keyword type="function" name="itdb_photodb_free ()" link="libgpod-Photo-database.html#itdb-photodb-free"/>
-    <keyword type="function" name="itdb_photodb_parse ()" link="libgpod-Photo-database.html#itdb-photodb-parse"/>
-    <keyword type="function" name="itdb_photodb_photoalbum_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo"/>
-    <keyword type="function" name="itdb_photodb_photoalbum_by_name ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name"/>
-    <keyword type="function" name="itdb_photodb_photoalbum_create ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"/>
-    <keyword type="function" name="itdb_photodb_photoalbum_remove ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove"/>
-    <keyword type="function" name="itdb_photodb_remove_photo ()" link="libgpod-Photo-database.html#itdb-photodb-remove-photo"/>
-    <keyword type="function" name="itdb_photodb_write ()" link="libgpod-Photo-database.html#itdb-photodb-write"/>
+    <keyword type="" name="" link="libgpod-Device.html#id2856365"/>
+    <keyword type="" name="" link="libgpod-Device.html#id2856366"/>
+    <keyword type="struct" name="Itdb_PhotoDB" link="libgpod-Photo-database.html#Itdb-PhotoDB" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_create ()" link="libgpod-Photo-database.html#itdb-photodb-create" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_free ()" link="libgpod-Photo-database.html#itdb-photodb-free" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_parse ()" link="libgpod-Photo-database.html#itdb-photodb-parse" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_write ()" link="libgpod-Photo-database.html#itdb-photodb-write" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_add_photo_from_data ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_add_photo_from_pixbuf ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf" since="0.5.0"/>
+    <keyword type="function" name="itdb_photodb_remove_photo ()" link="libgpod-Photo-database.html#itdb-photodb-remove-photo" since="0.4.0"/>
+    <keyword type="struct" name="Itdb_PhotoAlbum" link="libgpod-Photo-database.html#Itdb-PhotoAlbum" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_create ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-create" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_by_name ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_remove ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove" since="0.4.2"/>
+    <keyword type="" name="" link="libgpod-Photo-database.html#id2859677"/>
+    <keyword type="" name="" link="libgpod-Photo-database.html#id2859678"/>
   </functions>
 </book>

Modified: libgpod/trunk/docs/reference/html/photodb.html
===================================================================
--- libgpod/trunk/docs/reference/html/photodb.html	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/photodb.html	2009-01-24 12:10:00 UTC (rev 341)
@@ -3,12 +3,12 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Part&#160;II.&#160;Photo database</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
 <link rel="up" href="index.html" title="libgpod Reference Manual">
 <link rel="prev" href="libgpod-Device.html" title="Device">
 <link rel="next" href="libgpod-Photo-database.html" title="Photo database">
-<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 <link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <link rel="chapter" href="ch01.html" title="iPod database components">
@@ -31,7 +31,13 @@
       The Photo database functions are used for adding pictures to
       the iPod.
       </p>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl><dt>
+<span class="refentrytitle"><a href="libgpod-Photo-database.html">Photo database</a></span><span class="refpurpose"> &#8212; Functions to create, read, write the photo database</span>
+</dt></dl>
 </div>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/style.css
===================================================================
--- libgpod/trunk/docs/reference/html/style.css	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/html/style.css	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,16 +1,16 @@
-.synopsis, .classsynopsis 
+.synopsis, .classsynopsis
 {
   background: #eeeeee;
   border: solid 1px #aaaaaa;
   padding: 0.5em;
 }
-.programlisting 
+.programlisting
 {
   background: #eeeeff;
   border: solid 1px #aaaaff;
   padding: 0.5em;
 }
-.variablelist 
+.variablelist
 {
   padding: 4px;
   margin-left: 3em;
@@ -19,62 +19,88 @@
 {
   vertical-align: top;
 }
+
 /* this is needed so that the local anchors are displayed below the naviagtion */
-div.refnamediv a[name], div.refsect1 a[name]
-{
-  position: relative;
-  top: -4.5em;
+ at media screen {
+  div.refnamediv a[name], div.refsect1 a[name]
+  {
+    position: relative;
+    top: -4.5em;
+  }
+  table.navigation#top
+  {
+    background: #ffeeee;
+    border: solid 1px #ffaaaa;
+    margin-top: 0;
+    margin-bottom: 0;
+    position: fixed;
+    top: 0;
+    left: 0;
+    height: 2em;
+    z-index: 1;
+  }
+  .navigation a
+  {
+    color: #770000;
+  }
+  .navigation a:visited
+  {
+    color: #550000;
+  }
+  td.shortcuts
+  {
+    color: #770000;
+    font-size: 80%;
+  }
+  div.refentry, div.chapter, div.reference, div.part, div.book, div.index, div.glossary, div.sect1, div.appendix, div.preface
+  {
+    position: relative;
+    top: 3em;
+    z-index: 0;
+  }
+  div.refnamediv
+  {
+    margin-top: 2em;
+  }
+  body
+  {
+    padding-bottom: 20em;
+  }
 }
-table.navigation#top
-{
-  background: #ffeeee;
-  border: solid 1px #ffaaaa;
-  margin-top: 0;
-  margin-bottom: 0;
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 2em;
-  z-index: 1;
+ at media print {
+  table.navigation {
+    visibility: collapse;
+    display: none;
+  }
+  div.titlepage table.navigation {
+    visibility: visible;
+    display: table;
+    background: #ffeeee;
+    border: solid 1px #ffaaaa;
+    margin-top: 0;
+    margin-bottom: 0;
+    top: 0;
+    left: 0;
+    height: 2em;
+  }
 }
-.navigation a 
+
+.navigation .title
 {
-  color: #770000;
-}
-.navigation a:visited 
-{
-  color: #550000;
-}
-.navigation .title 
-{
   font-size: 200%;
 }
-td.shortcuts
-{
-  color: #770000;
-  font-size: 80%;
-}
 
-div.refentry, div.chapter, div.part, div.book, div.index, div.glossary, div.sect1, div.appendix, div.preface
+
+div.gallery-float
 {
-  position: relative;
-  top: 3em;
-  z-index: 0;
-}
-div.refnamediv 
-{
-  margin-top: 2em;
-}
-div.gallery-float 
-{
   float: left;
   padding: 10px;
 }
-div.gallery-float img 
+div.gallery-float img
 {
   border-style: none;
 }
-div.gallery-spacer 
+div.gallery-spacer
 {
   clear: both;
 }
@@ -110,3 +136,13 @@
 {
   background-color: #eeeeee;
 }
+
+hr
+{
+  color: #888;
+  background: #888;
+  border: 0;
+  height: 1px;
+  clear: both;
+}
+

Modified: libgpod/trunk/docs/reference/libgpod-docs.xml
===================================================================
--- libgpod/trunk/docs/reference/libgpod-docs.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/libgpod-docs.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -26,7 +26,7 @@
       </author>
     </authorgroup>
     <copyright>
-      <year>2006</year>
+      <year>2006-2008</year>
       <holder>Christophe Fergeau</holder>
     </copyright>
 
@@ -88,6 +88,7 @@
       <xi:include href="xml/playlists.xml"/>
       <xi:include href="xml/smart-playlists.xml"/>
       <xi:include href="xml/artwork.xml"/>
+      <xi:include href="xml/chapterdata.xml"/>
       <xi:include href="xml/device.xml"/>
     </chapter>
   </part>

Modified: libgpod/trunk/docs/reference/libgpod-sections.txt
===================================================================
--- libgpod/trunk/docs/reference/libgpod-sections.txt	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/libgpod-sections.txt	2009-01-24 12:10:00 UTC (rev 341)
@@ -2,8 +2,7 @@
 <FILE>itunesdb-db</FILE>
 <TITLE>The Itdb_iTunesDB structure</TITLE>
 Itdb_iTunesDB
-ItdbUserDataDestroyFunc
-ItdbUserDataDuplicateFunc
+ItdbFileError
 
 itdb_new
 itdb_free
@@ -15,6 +14,9 @@
 itdb_tracks_number
 itdb_tracks_number_nontransferred
 itdb_playlists_number
+
+ItdbUserDataDestroyFunc
+ItdbUserDataDuplicateFunc
 </SECTION>
 
 <SECTION>
@@ -42,16 +44,17 @@
 itdb_get_artworkdb_path
 itdb_get_photodb_path
 itdb_get_photos_thumb_dir
+
 itdb_get_path
+itdb_resolve_path
 
-itdb_resolve_path
-itdb_shuffle_write
-itdb_shuffle_write_file
 itdb_cp
 itdb_cp_get_dest_filename
 itdb_cp_finalize
 itdb_parse_file
 itdb_write_file
+itdb_shuffle_write
+itdb_shuffle_write_file
 itdb_duplicate
 </SECTION>
 
@@ -79,6 +82,8 @@
 itdb_track_id_tree_create
 itdb_track_id_tree_destroy
 itdb_track_id_tree_by_id
+itdb_track_get_thumbnail
+itdb_track_has_thumbnails
 itdb_track_set_thumbnails
 itdb_track_set_thumbnails_from_data
 itdb_track_set_thumbnails_from_pixbuf
@@ -150,6 +155,22 @@
 </SECTION>
 
 <SECTION>
+<FILE>chapterdata</FILE>
+<TITLE>Chapter Data</TITLE>
+Itdb_Chapter
+Itdb_Chapterdata
+itdb_chapter_new
+itdb_chapter_duplicate
+itdb_chapter_free
+itdb_chapterdata_new
+itdb_chapterdata_add_chapter
+itdb_chapterdata_duplicate
+itdb_chapterdata_remove_chapter
+itdb_chapterdata_remove_chapters
+itdb_chapterdata_free
+</SECTION>
+
+<SECTION>
 <FILE>device</FILE>
 <TITLE>Device</TITLE>
 Itdb_Device
@@ -160,16 +181,17 @@
 itdb_device_get_sysinfo
 itdb_device_set_sysinfo
 itdb_device_write_sysinfo
+Itdb_IpodInfo
 itdb_device_get_ipod_info
 itdb_device_supports_artwork
 itdb_device_supports_photo
+itdb_device_supports_video
 itdb_info_get_ipod_info_table
+Itdb_IpodGeneration
 itdb_info_get_ipod_generation_string
+Itdb_IpodModel
 itdb_info_get_ipod_model_name_string
 itdb_init_ipod
-Itdb_IpodGeneration
-Itdb_IpodInfo
-Itdb_IpodModel
 Itdb_ArtworkFormat
 </SECTION>
 
@@ -177,67 +199,57 @@
 <FILE>artwork</FILE>
 <TITLE>Artwork</TITLE>
 Itdb_Artwork
-Itdb_Thumb
-ItdbThumbType
 itdb_artwork_new
 itdb_artwork_duplicate
 itdb_artwork_free
-itdb_artwork_add_thumbnail
-itdb_artwork_add_thumbnail_from_data
-itdb_artwork_add_thumbnail_from_pixbuf
-itdb_artwork_remove_thumbnail
+itdb_artwork_get_pixbuf
+itdb_artwork_set_thumbnail
+itdb_artwork_set_thumbnail_from_data
+itdb_artwork_set_thumbnail_from_pixbuf
 itdb_artwork_remove_thumbnails
-itdb_artwork_get_thumb_by_type
-itdb_thumb_get_gdk_pixbuf
+Itdb_Thumb
 itdb_thumb_duplicate
 itdb_thumb_free
-itdb_thumb_new
-itdb_thumb_get_filename
+itdb_thumb_to_pixbuf_at_size
+itdb_thumb_to_pixbufs
 </SECTION>
 
 <SECTION>
 <FILE>photodb</FILE>
 <TITLE>Photo database</TITLE>
-Itdb_PhotoAlbum
 Itdb_PhotoDB
+itdb_photodb_create
+itdb_photodb_free
+itdb_photodb_parse
+itdb_photodb_write
+
 itdb_photodb_add_photo
 itdb_photodb_add_photo_from_data
 itdb_photodb_add_photo_from_pixbuf
-itdb_photodb_create
-itdb_photodb_free
-itdb_photodb_parse
+itdb_photodb_remove_photo
+
+Itdb_PhotoAlbum
+itdb_photodb_photoalbum_create
 itdb_photodb_photoalbum_add_photo
 itdb_photodb_photoalbum_by_name
-itdb_photodb_photoalbum_create
 itdb_photodb_photoalbum_remove
-itdb_photodb_remove_photo
-itdb_photodb_write
 </SECTION>
 
-
-
-
 <SECTION>
 <FILE>Internal</FILE>
 <SUBSECTION Private>
+DEBUG_ARTWORK
 G_GNUC_INTERNAL
-g_stat
-g_mkdir
-g_rename
-g_printf
-G_IS_DIR_SEPARATOR
 dump_mhif
 dump_mhia
-dump_mhod_type_1
-dump_mhod_type_3
 dump_mhni
 dump_mhod
+dump_mhod_string
 dump_mhii
 dump_mhl
 dump_mhsd
 dump_mhfd
 dump_mhba
-ITUNESDB_MAX_SIZE
 MHeader
 MhlHeader
 MhbdHeader
@@ -248,6 +260,7 @@
 MhipHeader
 MhitHeader
 ArtworkDB_MhodHeader
+ArtworkDB_MhodHeaderString
 MhfdHeader
 MhliHeader
 MhiiHeader
@@ -258,40 +271,79 @@
 MhifHeader
 MhiaHeader
 MhitHeader471
-ArtworkDB_MhodHeaderArtworkType3
 MhodHeaderString
-MhodHeaderArtworkType1
 MhodHeaderSmartPlaylistData
 MhodHeaderSmartPlaylistRuleString
 MhodHeaderSmartPlaylistRuleNonString
 MhodHeaderSmartPlaylistRule
 iTunesDB_MhsdHeader
 MhodHeader
-MhodHeaderArtworkType3
-playcount
 NO_PLAYCOUNT
 WCONTENTS_STEPSIZE
-RED_BITS
-RED_SHIFT
-RED_MASK
-GREEN_BITS
-GREEN_SHIFT
-GREEN_MASK
-BLUE_BITS
-BLUE_SHIFT
-BLUE_MASK
 DBParseContext
 db_parse_context_get_m_header
 iPodSong
 DB_TO_CPU_GET
 DB_TO_CPU_GET_DB
-ItdbFileError
 ITDB_FILE_ERROR
 itdb_file_error_quark
-itdb_get_artwork_info_from_type
+ITDB_DEVICE_ERROR
+ItdbDeviceError
+itdb_device_error_quark
 DbType
 Itdb_DB
+ItdbThumbDataType
 
+GChecksum
+GChecksumType
+g_checksum_copy
+g_checksum_free
+g_checksum_get_digest
+g_checksum_get_string
+g_checksum_new
+g_checksum_type_get_length
+g_checksum_update
+g_compute_checksum_for_data
+g_compute_checksum_for_string
+
+SysInfoIpodProperties
+itdb_sysinfo_extended_parse
+itdb_sysinfo_properties_free
+
+ALPHA_BITS_555
+ALPHA_BITS_888
+ALPHA_MASK_555
+ALPHA_MASK_888
+ALPHA_SHIFT_555
+ALPHA_SHIFT_888
+BLUE_BITS_555
+BLUE_BITS_565
+BLUE_BITS_888
+BLUE_MASK_555
+BLUE_MASK_565
+BLUE_MASK_888
+BLUE_SHIFT_555
+BLUE_SHIFT_565
+BLUE_SHIFT_888
+GREEN_BITS_555
+GREEN_BITS_565
+GREEN_BITS_888
+GREEN_MASK_555
+GREEN_MASK_565
+GREEN_MASK_888
+GREEN_SHIFT_555
+GREEN_SHIFT_565
+GREEN_SHIFT_888
+RED_BITS_555
+RED_BITS_565
+RED_BITS_888
+RED_MASK_555
+RED_MASK_565
+RED_MASK_888
+RED_SHIFT_555
+RED_SHIFT_565
+RED_SHIFT_888
+
 ITDB_SPLACTION_LAST_HOURS_VALUE
 ITDB_SPLACTION_LAST_MINUTES_VALUE
 ITDB_SPLACTION_LAST_YEARS_VALUE
@@ -306,5 +358,15 @@
 ITDB_SPLACTION_LAST_SOLAR_YEAR
 ITDB_SPLACTION_LAST_SIDEREAL_YEAR
 
+SHA_BLOCKSIZE
+SHA_BYTE
+SHA_BYTE_ORDER
+SHA_DIGESTSIZE
+SHA_INFO
+SHA_LONG
+SHA_VERSION
+sha_final
+sha_init
+sha_update
+itdb_compute_hash
 </SECTION>
-

Modified: libgpod/trunk/docs/reference/tmpl/artwork.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/artwork.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/artwork.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -24,8 +24,9 @@
 
 </para>
 
- at thumbnails: 
+ at thumbnail: 
 @id: 
+ at dbid: 
 @unk028: 
 @rating: 
 @unk036: 
@@ -41,89 +42,61 @@
 @userdata_duplicate: 
 @userdata_destroy: 
 
-<!-- ##### STRUCT Itdb_Thumb ##### -->
+<!-- ##### FUNCTION itdb_artwork_new ##### -->
 <para>
 
 </para>
 
- at type: 
- at filename: 
- at image_data: 
- at image_data_len: 
- at pixbuf: 
- at rotation: 
- at offset: 
- at size: 
- at width: 
- at height: 
- at horizontal_padding: 
- at vertical_padding: 
- at reserved_int1: 
- at reserved_int2: 
- at reserved1: 
- at reserved2: 
+ at Returns: 
 
-<!-- ##### ENUM ItdbThumbType ##### -->
-<para>
 
-</para>
-
- at ITDB_THUMB_COVER_SMALL: 
- at ITDB_THUMB_COVER_LARGE: 
- at ITDB_THUMB_PHOTO_SMALL: 
- at ITDB_THUMB_PHOTO_LARGE: 
- at ITDB_THUMB_PHOTO_FULL_SCREEN: 
- at ITDB_THUMB_PHOTO_TV_SCREEN: 
- at ITDB_THUMB_COVER_XLARGE: 
- at ITDB_THUMB_COVER_MEDIUM: 
- at ITDB_THUMB_COVER_SMEDIUM: 
- at ITDB_THUMB_COVER_XSMALL: 
-
-<!-- ##### FUNCTION itdb_artwork_new ##### -->
+<!-- ##### FUNCTION itdb_artwork_duplicate ##### -->
 <para>
 
 </para>
 
+ at artwork: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_artwork_duplicate ##### -->
+<!-- ##### FUNCTION itdb_artwork_free ##### -->
 <para>
 
 </para>
 
 @artwork: 
- at Returns: 
 
 
-<!-- ##### FUNCTION itdb_artwork_free ##### -->
+<!-- ##### FUNCTION itdb_artwork_get_pixbuf ##### -->
 <para>
 
 </para>
 
+ at device: 
 @artwork: 
+ at width: 
+ at height: 
+ at Returns: 
 
 
-<!-- ##### FUNCTION itdb_artwork_add_thumbnail ##### -->
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail ##### -->
 <para>
 
 </para>
 
 @artwork: 
- at type: 
 @filename: 
 @rotation: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_artwork_add_thumbnail_from_data ##### -->
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail_from_data ##### -->
 <para>
 
 </para>
 
 @artwork: 
- at type: 
 @image_data: 
 @image_data_len: 
 @rotation: 
@@ -131,28 +104,18 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_artwork_add_thumbnail_from_pixbuf ##### -->
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail_from_pixbuf ##### -->
 <para>
 
 </para>
 
 @artwork: 
- at type: 
 @pixbuf: 
 @rotation: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_artwork_remove_thumbnail ##### -->
-<para>
-
-</para>
-
- at artwork: 
- at thumb: 
-
-
 <!-- ##### FUNCTION itdb_artwork_remove_thumbnails ##### -->
 <para>
 
@@ -161,26 +124,14 @@
 @artwork: 
 
 
-<!-- ##### FUNCTION itdb_artwork_get_thumb_by_type ##### -->
+<!-- ##### STRUCT Itdb_Thumb ##### -->
 <para>
 
 </para>
 
- at artwork: 
- at type: 
- at Returns: 
+ at data_type: 
+ at rotation: 
 
-
-<!-- ##### FUNCTION itdb_thumb_get_gdk_pixbuf ##### -->
-<para>
-
-</para>
-
- at device: 
- at thumb: 
- at Returns: 
-
-
 <!-- ##### FUNCTION itdb_thumb_duplicate ##### -->
 <para>
 
@@ -198,15 +149,19 @@
 @thumb: 
 
 
-<!-- ##### FUNCTION itdb_thumb_new ##### -->
+<!-- ##### FUNCTION itdb_thumb_to_pixbuf_at_size ##### -->
 <para>
 
 </para>
 
+ at device: 
+ at thumb: 
+ at width: 
+ at height: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_thumb_get_filename ##### -->
+<!-- ##### FUNCTION itdb_thumb_to_pixbufs ##### -->
 <para>
 
 </para>

Copied: libgpod/trunk/docs/reference/tmpl/chapterdata.sgml (from rev 340, libgpod/branches/upstream/current/docs/reference/tmpl/chapterdata.sgml)
===================================================================
--- libgpod/trunk/docs/reference/tmpl/chapterdata.sgml	                        (rev 0)
+++ libgpod/trunk/docs/reference/tmpl/chapterdata.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,124 @@
+<!-- ##### SECTION Title ##### -->
+Chapter Data
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure to store chapter data for tracks
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Chapters allow for a large file to be divided into sections.  The start and stop
+points in the track are defined here, as well as the title for each chapter.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Chapter ##### -->
+<para>
+
+</para>
+
+ at startpos: 
+ at chaptertitle: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### STRUCT Itdb_Chapterdata ##### -->
+<para>
+
+</para>
+
+ at chapters: 
+ at unk024: 
+ at unk028: 
+ at unk032: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### FUNCTION itdb_chapter_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapter_duplicate ##### -->
+<para>
+
+</para>
+
+ at chapter: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapter_free ##### -->
+<para>
+
+</para>
+
+ at chapter: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_add_chapter ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+ at startpos: 
+ at chaptertitle: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_duplicate ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_remove_chapter ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+ at chapter: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_remove_chapters ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_free ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+
+

Modified: libgpod/trunk/docs/reference/tmpl/device.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/device.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/device.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -26,6 +26,7 @@
 @musicdirs: 
 @byte_order: 
 @sysinfo: 
+ at sysinfo_extended: 
 @sysinfo_changed: 
 @timezone_shift: 
 
@@ -93,16 +94,22 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_device_get_ipod_info ##### -->
+<!-- ##### STRUCT Itdb_IpodInfo ##### -->
 <para>
 
 </para>
 
- at device: 
- at Returns: 
+ at model_number: 
+ at capacity: 
+ at ipod_model: 
+ at ipod_generation: 
+ at musicdirs: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
 
-
-<!-- ##### FUNCTION itdb_device_supports_artwork ##### -->
+<!-- ##### FUNCTION itdb_device_get_ipod_info ##### -->
 <para>
 
 </para>
@@ -111,7 +118,7 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_device_supports_photo ##### -->
+<!-- ##### FUNCTION itdb_device_supports_artwork ##### -->
 <para>
 
 </para>
@@ -120,44 +127,32 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_info_get_ipod_info_table ##### -->
+<!-- ##### FUNCTION itdb_device_supports_photo ##### -->
 <para>
 
 </para>
 
+ at device: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_info_get_ipod_generation_string ##### -->
+<!-- ##### FUNCTION itdb_device_supports_video ##### -->
 <para>
 
 </para>
 
- at generation: 
+ at device: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_info_get_ipod_model_name_string ##### -->
+<!-- ##### FUNCTION itdb_info_get_ipod_info_table ##### -->
 <para>
 
 </para>
 
- at model: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_init_ipod ##### -->
-<para>
-
-</para>
-
- at mountpoint: 
- at model_number: 
- at ipod_name: 
- at error: 
- at Returns: 
-
-
 <!-- ##### ENUM Itdb_IpodGeneration ##### -->
 <para>
 
@@ -178,28 +173,23 @@
 @ITDB_IPOD_GENERATION_NANO_1: 
 @ITDB_IPOD_GENERATION_NANO_2: 
 @ITDB_IPOD_GENERATION_NANO_3: 
+ at ITDB_IPOD_GENERATION_NANO_4: 
 @ITDB_IPOD_GENERATION_VIDEO_1: 
 @ITDB_IPOD_GENERATION_VIDEO_2: 
 @ITDB_IPOD_GENERATION_CLASSIC_1: 
+ at ITDB_IPOD_GENERATION_CLASSIC_2: 
 @ITDB_IPOD_GENERATION_TOUCH_1: 
- at ITDB_IPOD_GENERATION_FIFTH: 
- at ITDB_IPOD_GENERATION_SIXTH: 
+ at ITDB_IPOD_GENERATION_IPHONE_1: 
 
-<!-- ##### STRUCT Itdb_IpodInfo ##### -->
+<!-- ##### FUNCTION itdb_info_get_ipod_generation_string ##### -->
 <para>
 
 </para>
 
- at model_number: 
- at capacity: 
- at ipod_model: 
- at ipod_generation: 
- at musicdirs: 
- at reserved_int1: 
- at reserved_int2: 
- at reserved1: 
- at reserved2: 
+ at generation: 
+ at Returns: 
 
+
 <!-- ##### ENUM Itdb_IpodModel ##### -->
 <para>
 
@@ -228,6 +218,9 @@
 @ITDB_IPOD_MODEL_NANO_GREEN: 
 @ITDB_IPOD_MODEL_NANO_PINK: 
 @ITDB_IPOD_MODEL_NANO_RED: 
+ at ITDB_IPOD_MODEL_NANO_YELLOW: 
+ at ITDB_IPOD_MODEL_NANO_PURPLE: 
+ at ITDB_IPOD_MODEL_NANO_ORANGE: 
 @ITDB_IPOD_MODEL_IPHONE_1: 
 @ITDB_IPOD_MODEL_SHUFFLE_SILVER: 
 @ITDB_IPOD_MODEL_SHUFFLE_PINK: 
@@ -235,19 +228,49 @@
 @ITDB_IPOD_MODEL_SHUFFLE_GREEN: 
 @ITDB_IPOD_MODEL_SHUFFLE_ORANGE: 
 @ITDB_IPOD_MODEL_SHUFFLE_PURPLE: 
+ at ITDB_IPOD_MODEL_SHUFFLE_RED: 
 @ITDB_IPOD_MODEL_CLASSIC_SILVER: 
 @ITDB_IPOD_MODEL_CLASSIC_BLACK: 
 @ITDB_IPOD_MODEL_TOUCH_BLACK: 
 
+<!-- ##### FUNCTION itdb_info_get_ipod_model_name_string ##### -->
+<para>
+
+</para>
+
+ at model: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_init_ipod ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at model_number: 
+ at ipod_name: 
+ at error: 
+ at Returns: 
+
+
 <!-- ##### STRUCT Itdb_ArtworkFormat ##### -->
 <para>
 
 </para>
 
- at type: 
+ at format_id: 
 @width: 
 @height: 
- at correlation_id: 
 @format: 
 @padding: 
+ at crop: 
+ at rotation: 
+ at back_color: 
+ at display_width: 
+ at interlaced: 
+ at align_row_bytes: 
+ at color_adjustment: 
+ at gamma: 
+ at associated_format: 
 

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -6,8 +6,8 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-These functions are for copying, renaming, and getting information about the
-files and directories on the iPod
+These functions are for copying, renaming, and retrieving information
+about the files and directories on the iPod.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -2,15 +2,15 @@
 iPod database reading/writing
 
 <!-- ##### SECTION Short_Description ##### -->
-Functions to create, read, write the iPod database
+Functions to read, write, and create an iPod database
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-These functions are for creating, reading, writing, and deleting the iPod
+These functions are for reading, writing, creating, and deleting an iPod
 database and getting the total number of tracks and playlists.
 </para>
 <para>
-Overview of using the iPod database:
+Overview of using an iPod database:
 </para>
 <para>
 itdb_parse(): read the iTunesDB and ArtworkDB
@@ -20,74 +20,65 @@
 </para>
 <para>
 itdb_parse() will return a #Itdb_iTunesDB structure with GLists
-containing all tracks (each track is represented by a #Itdb_Track
-structure) and the playlists (each playlist is represented by a
-#Itdb_Playlist structure).
+containing all tracks the playlists in the database.  Each track is
+represented by an #Itdb_Track.   Each playlist is represented by an
+#Itdb_Playlist.  See the <link linkend="libgpod-Tracks">Tracks</link>
+and <link linkend="libgpod-Playlists">Playlists</link> sections for
+details on tracks and playlists, respectively.
 </para>
 <para>
-A number of functions for adding, removing, duplicating tracks
-are available.  Please see
-<link linkend="libgpod-Tracks">Tracks</link> for details.
+Each #Itdb_Playlist has a GList called @members which contains all of
+the tracks in the playlist.  Tracks referenced in a playlist must also
+be present in the @tracks GList of the #Itdb_iTunesDB.
 </para>
 <para>
-In each #Itdb_Playlist structure you can find a GList called
-'members' with listing all member tracks. Each track referenced
-in a playlist must also be present in the tracks GList of the
-iTunesDB.
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the Music->Tracks/Albums/Artists/etc.
+menu.  In addition to the MPL there can be a number of normal
+playlists accessible through the Music->Playlists menu on the iPod.
+Tracks that are a member of one of these normal playlists must also be
+a member of the MPL.
 </para>
 <para>
-The iPod must contain one master playlist (MPL) containing all
-tracks accessible on the iPod through the
-Music->Tracks/Albums/Artists... menu. Besides the MPL there can
-be a number of normal playlists accessible through the
-Music->Playlists menu on the iPod. Tracks that are a member of
-one of these normal playlists must also be a member of the MPL.
+The Podcasts playlist is just another playlist with some internal
+flags set differently.  Tracks in the Podcasts playlist are not
+normally members of the MPL (so on the iPod they will only show up
+under the Podcasts menu). All tracks referenced must be in the
+ at tracks GList of the #Itdb_iTunesDB, however.
 </para>
 <para>
-The Podcasts playlist is just another playlist with some
-internal flags set differently. Also, member tracks in the
-Podcasts playlist are not normally members of the MPL (so on the
-iPod they will only show up under the Podcasts menu). All tracks
-referenced must be in the tracklist of the #Itdb_iTunesDB,
-however.
+Each track may have a thumbnail associated with it. You can retrieve a
+#GdkPixmap of the thumbnail using itdb_artwork_get_pixbuf().  A
+thumbnail can be added with itdb_track_set_thumbnails().  A thumbnail
+can be removed with itdb_track_remove_thumbnails().  Please see the
+<link linkend="libgpod-Artwork">Artwork</link> section for more
+details on artwork related functions and structures.
 </para>
+<note>
 <para>
-A number of functions to add/remove playlists, or add/remove
-tracks are available. Please see
-<link linkend="libgpod-Playlists">Playlists</link> for details.
-</para>
-<para>
-Each track can have a thumbnail associated with it. You can
-retrieve a GdkPixmap of the thumbnail using
-itdb_thumb_get_gdk_pixbuf() (tracks have thumbnails of the
-following types associated: @ITDB_THUMB_COVER_SMALL and
- at ITDB_THUMB_COVER_LARGE).  You can remove a thumbnail with
-itdb_track_remove_thumbnails().  And finally, you can set a
-new thumbnail using itdb_track_set_thumbnails().
-</para>
-<para>
-Please note that iTunes additionally stores the artwork as tags
+Be aware that iTunes additionally stores the artwork as tags
 in the original music file. That's also from where the data is
 read when artwork is displayed in iTunes, and there can be more
 than one piece of artwork. libgpod does not store the artwork as
 tags in the original music file. As a consequence, if iTunes
 attempts to access the artwork, it will find none, and remove
 libgpod's artwork. Luckily, iTunes will only attempt to access
-the artwork if you select a track in iTunes. (To work around
+the artwork if you select a track in iTunes.  To work around
 this, gtkpod keeps a list of the original filename of all
 artwork and silently adds the thumbnails if they were 'lost'.
 Your application might want to do something similar, or you can
 supply patches for (optionally!) adding tags to the original music
-files.)
+files.
 </para>
+</note>
 <para>
 The #Itdb_iTunesDB, #Itdb_Playlist and #Itdb_Track structures each
-have a userdata and a usertype field that can be used by the
-application to store application-specific additional data. If
-userdata is a pointer to an external structure, you can supply a
-#ItdbUserDataDuplicateFunc and a #ItdbUserDataDestroyFunc so that
-this data can be duplicated or freed automatically with a call
-to the library _duplicate()/_free() functions.
+have @userdata and @usertype fields that can be used by the
+application to store additional application-specific data. If
+ at userdata is a pointer to an external structure, you can supply a
+#ItdbUserDataDuplicateFunc and a #ItdbUserDataDestroyFunc so that this
+data can be duplicated or freed automatically with a call to the
+library _duplicate()/_free() functions.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -118,23 +109,17 @@
 @userdata_duplicate: 
 @userdata_destroy: 
 
-<!-- ##### USER_FUNCTION ItdbUserDataDestroyFunc ##### -->
+<!-- ##### ENUM ItdbFileError ##### -->
 <para>
 
 </para>
 
- at userdata: 
+ at ITDB_FILE_ERROR_SEEK: 
+ at ITDB_FILE_ERROR_CORRUPT: 
+ at ITDB_FILE_ERROR_NOTFOUND: 
+ at ITDB_FILE_ERROR_RENAME: 
+ at ITDB_FILE_ERROR_ITDB_CORRUPT: 
 
-
-<!-- ##### USER_FUNCTION ItdbUserDataDuplicateFunc ##### -->
-<para>
-
-</para>
-
- at userdata: 
- at Returns: 
-
-
 <!-- ##### FUNCTION itdb_new ##### -->
 <para>
 
@@ -216,3 +201,20 @@
 @Returns: 
 
 
+<!-- ##### USER_FUNCTION ItdbUserDataDestroyFunc ##### -->
+<para>
+
+</para>
+
+ at userdata: 
+
+
+<!-- ##### USER_FUNCTION ItdbUserDataDuplicateFunc ##### -->
+<para>
+
+</para>
+
+ at userdata: 
+ at Returns: 
+
+

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -137,73 +137,73 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_shuffle_write ##### -->
+<!-- ##### FUNCTION itdb_cp ##### -->
 <para>
 
 </para>
 
- at itdb: 
+ at from_file: 
+ at to_file: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_shuffle_write_file ##### -->
+<!-- ##### FUNCTION itdb_cp_get_dest_filename ##### -->
 <para>
 
 </para>
 
- at itdb: 
+ at track: 
+ at mountpoint: 
 @filename: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_cp ##### -->
+<!-- ##### FUNCTION itdb_cp_finalize ##### -->
 <para>
 
 </para>
 
- at from_file: 
- at to_file: 
+ at track: 
+ at mountpoint: 
+ at dest_filename: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_cp_get_dest_filename ##### -->
+<!-- ##### FUNCTION itdb_parse_file ##### -->
 <para>
 
 </para>
 
- at track: 
- at mountpoint: 
 @filename: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_cp_finalize ##### -->
+<!-- ##### FUNCTION itdb_write_file ##### -->
 <para>
 
 </para>
 
- at track: 
- at mountpoint: 
- at dest_filename: 
+ at itdb: 
+ at filename: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_parse_file ##### -->
+<!-- ##### FUNCTION itdb_shuffle_write ##### -->
 <para>
 
 </para>
 
- at filename: 
+ at itdb: 
 @error: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_write_file ##### -->
+<!-- ##### FUNCTION itdb_shuffle_write_file ##### -->
 <para>
 
 </para>

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -2,15 +2,19 @@
 Time handling
 
 <!-- ##### SECTION Short_Description ##### -->
-Helper functions to convert between Epoch time and Mac (iPod) time
+[DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-The functions provide conversion between Epoch time and Mac (iPod) time. These 
-functions are now obsolete and should no longer be used, libgpod automatically
-converts to/from Epoch time and iPod time when writing/reading the iPod 
-databases
+The functions provide conversion between Epoch time and Mac (iPod)
+time.
 </para>
+<note>
+These functions are now obsolete and should no longer be used, libgpod
+automatically converts to/from Epoch time and iPod time when
+writing/reading the iPod databases.
+</note>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>

Modified: libgpod/trunk/docs/reference/tmpl/libgpod-unused.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/libgpod-unused.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/libgpod-unused.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -118,17 +118,6 @@
 </para>
 
 
-<!-- ##### ENUM ItdbFileError ##### -->
-<para>
-
-</para>
-
- at ITDB_FILE_ERROR_SEEK: 
- at ITDB_FILE_ERROR_CORRUPT: 
- at ITDB_FILE_ERROR_NOTFOUND: 
- at ITDB_FILE_ERROR_RENAME: 
- at ITDB_FILE_ERROR_ITDB_CORRUPT: 
-
 <!-- ##### ENUM Itdb_Generation ##### -->
 <para>
 
@@ -315,6 +304,60 @@
 </para>
 
 
+<!-- ##### FUNCTION itdb_artwork_add_thumbnail ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at filename: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_add_thumbnail_from_data ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at image_data: 
+ at image_data_len: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_add_thumbnail_from_pixbuf ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at pixbuf: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_get_thumb_by_type ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_remove_thumbnail ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at thumb: 
+
 <!-- ##### FUNCTION itdb_file_error_quark ##### -->
 <para>
 
@@ -322,3 +365,19 @@
 
 @Returns: 
 
+<!-- ##### FUNCTION itdb_thumb_get_filename ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at thumb: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_thumb_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+

Modified: libgpod/trunk/docs/reference/tmpl/photodb.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/photodb.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/photodb.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -60,19 +60,20 @@
 <para>
 If you cannot add photos because your iPod is not recognized,
 you may have to set the iPod model by calling
+itdb_device_set_sysinfo(), e.g. for an 80 GB 6th generation
+iPod Video, you would use:
 </para>
+<programlisting>
+itdb_device_set_sysinfo (db->device, "ModelNumStr", "MA450");
+</programlisting>
 <para>
-itdb_device_set_sysinfo (db->device, "ModelNumStr", model);
-</para>
-<para>
-For example, "MA450" would stand for an 80 GB 6th generation iPod Video. See
-<ulink type="http"
+See <ulink type="http"
 url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c">itdb_device.c</ulink>
 for a list of supported models.
 </para>
 <para>
-This information will be written to the iPod when the PhotoDB is
-saved (itdb_device_write_sysinfo() is called).
+The model number will be saved on the iPod when the PhotoDB is
+written (itdb_photodb_write() calls itdb_device_write_sysinfo()).
 </para>
 <para>
 Have a look at the <ulink type="http"
@@ -90,28 +91,14 @@
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### STRUCT Itdb_PhotoAlbum ##### -->
+<!-- ##### STRUCT Itdb_PhotoDB ##### -->
 <para>
 
 </para>
 
- at name: 
- at members: 
- at album_type: 
- at playmusic: 
- at repeat: 
- at random: 
- at show_titles: 
- at transition_direction: 
- at slide_duration: 
- at transition_duration: 
- at song_id: 
- at unk024: 
- at unk028: 
- at unk044: 
- at unk048: 
- at album_id: 
- at prev_album_id: 
+ at photos: 
+ at photoalbums: 
+ at device: 
 @reserved_int1: 
 @reserved_int2: 
 @reserved1: 
@@ -121,23 +108,43 @@
 @userdata_duplicate: 
 @userdata_destroy: 
 
-<!-- ##### STRUCT Itdb_PhotoDB ##### -->
+<!-- ##### FUNCTION itdb_photodb_create ##### -->
 <para>
 
 </para>
 
- at photos: 
- at photoalbums: 
- at device: 
- at reserved_int1: 
- at reserved_int2: 
- at reserved1: 
- at reserved2: 
- at usertype: 
- at userdata: 
- at userdata_duplicate: 
- at userdata_destroy: 
+ at mountpoint: 
+ at Returns: 
 
+
+<!-- ##### FUNCTION itdb_photodb_free ##### -->
+<para>
+
+</para>
+
+ at photodb: 
+
+
+<!-- ##### FUNCTION itdb_photodb_parse ##### -->
+<para>
+
+</para>
+
+ at mp: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_write ##### -->
+<para>
+
+</para>
+
+ at photodb: 
+ at error: 
+ at Returns: 
+
+
 <!-- ##### FUNCTION itdb_photodb_add_photo ##### -->
 <para>
 
@@ -178,30 +185,56 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_photodb_create ##### -->
+<!-- ##### FUNCTION itdb_photodb_remove_photo ##### -->
 <para>
 
 </para>
 
- at mountpoint: 
- at Returns: 
+ at db: 
+ at album: 
+ at photo: 
 
 
-<!-- ##### FUNCTION itdb_photodb_free ##### -->
+<!-- ##### STRUCT Itdb_PhotoAlbum ##### -->
 <para>
 
 </para>
 
 @photodb: 
+ at name: 
+ at members: 
+ at album_type: 
+ at playmusic: 
+ at repeat: 
+ at random: 
+ at show_titles: 
+ at transition_direction: 
+ at slide_duration: 
+ at transition_duration: 
+ at song_id: 
+ at unk024: 
+ at unk028: 
+ at unk044: 
+ at unk048: 
+ at album_id: 
+ at prev_album_id: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
 
-
-<!-- ##### FUNCTION itdb_photodb_parse ##### -->
+<!-- ##### FUNCTION itdb_photodb_photoalbum_create ##### -->
 <para>
 
 </para>
 
- at mp: 
- at error: 
+ at db: 
+ at albumname: 
+ at pos: 
 @Returns: 
 
 
@@ -226,17 +259,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_photodb_photoalbum_create ##### -->
-<para>
-
-</para>
-
- at db: 
- at albumname: 
- at pos: 
- at Returns: 
-
-
 <!-- ##### FUNCTION itdb_photodb_photoalbum_remove ##### -->
 <para>
 
@@ -247,23 +269,3 @@
 @remove_pics: 
 
 
-<!-- ##### FUNCTION itdb_photodb_remove_photo ##### -->
-<para>
-
-</para>
-
- at db: 
- at album: 
- at photo: 
-
-
-<!-- ##### FUNCTION itdb_photodb_write ##### -->
-<para>
-
-</para>
-
- at photodb: 
- at error: 
- at Returns: 
-
-

Modified: libgpod/trunk/docs/reference/tmpl/track.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/track.sgml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/tmpl/track.sgml	2009-01-24 12:10:00 UTC (rev 341)
@@ -91,7 +91,7 @@
 @unk132: 
 @time_released: 
 @unk144: 
- at unk146: 
+ at explicit_flag: 
 @unk148: 
 @unk152: 
 @skipcount: 
@@ -126,9 +126,9 @@
 @unk252: 
 @gapless_track_flag: 
 @gapless_album_flag: 
- at chapterdata_raw: 
- at chapterdata_raw_length: 
+ at album_id: 
 @artwork: 
+ at mhii_link: 
 @reserved_int1: 
 @reserved_int2: 
 @reserved_int3: 
@@ -253,6 +253,26 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_track_get_thumbnail ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at width: 
+ at height: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_has_thumbnails ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at Returns: 
+
+
 <!-- ##### FUNCTION itdb_track_set_thumbnails ##### -->
 <para>
 

Modified: libgpod/trunk/docs/reference/xml/Internal.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/Internal.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/Internal.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -48,4 +48,6 @@
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/artwork.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/artwork.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/artwork.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -22,40 +22,37 @@
 
 
                     <link linkend="Itdb-Artwork">Itdb_Artwork</link>;
-                    <link linkend="Itdb-Thumb">Itdb_Thumb</link>;
-enum                <link linkend="ItdbThumbType">ItdbThumbType</link>;
 <link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-artwork-new">itdb_artwork_new</link>                    (void);
 <link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-artwork-duplicate">itdb_artwork_duplicate</link>              (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);
 <link linkend="void">void</link>                <link linkend="itdb-artwork-free">itdb_artwork_free</link>                   (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-add-thumbnail">itdb_artwork_add_thumbnail</link>          (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type,
+<link linkend="gpointer">gpointer</link>            <link linkend="itdb-artwork-get-pixbuf">itdb_artwork_get_pixbuf</link>             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-set-thumbnail">itdb_artwork_set_thumbnail</link>          (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
                                                          const <link linkend="gchar">gchar</link> *filename,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-add-thumbnail-from-data">itdb_artwork_add_thumbnail_from_data</link>
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-set-thumbnail-from-data">itdb_artwork_set_thumbnail_from_data</link>
                                                         (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type,
                                                          const <link linkend="guchar">guchar</link> *image_data,
                                                          <link linkend="gsize">gsize</link> image_data_len,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-add-thumbnail-from-pixbuf">itdb_artwork_add_thumbnail_from_pixbuf</link>
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-set-thumbnail-from-pixbuf">itdb_artwork_set_thumbnail_from_pixbuf</link>
                                                         (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type,
                                                          <link linkend="gpointer">gpointer</link> pixbuf,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);
-<link linkend="void">void</link>                <link linkend="itdb-artwork-remove-thumbnail">itdb_artwork_remove_thumbnail</link>       (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
 <link linkend="void">void</link>                <link linkend="itdb-artwork-remove-thumbnails">itdb_artwork_remove_thumbnails</link>      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);
-<link linkend="Itdb-Thumb">Itdb_Thumb</link>*         <link linkend="itdb-artwork-get-thumb-by-type">itdb_artwork_get_thumb_by_type</link>      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type);
-<link linkend="gpointer">gpointer</link>            <link linkend="itdb-thumb-get-gdk-pixbuf">itdb_thumb_get_gdk_pixbuf</link>           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
-                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
+                    <link linkend="Itdb-Thumb">Itdb_Thumb</link>;
 <link linkend="Itdb-Thumb">Itdb_Thumb</link>*         <link linkend="itdb-thumb-duplicate">itdb_thumb_duplicate</link>                (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
 <link linkend="void">void</link>                <link linkend="itdb-thumb-free">itdb_thumb_free</link>                     (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
-<link linkend="Itdb-Thumb">Itdb_Thumb</link>*         <link linkend="itdb-thumb-new">itdb_thumb_new</link>                      (void);
-<link linkend="gchar">gchar</link>*              <link linkend="itdb-thumb-get-filename">itdb_thumb_get_filename</link>             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<link linkend="gpointer">gpointer</link>            <link linkend="itdb-thumb-to-pixbuf-at-size">itdb_thumb_to_pixbuf_at_size</link>        (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);
+<link linkend="GList">GList</link>*              <link linkend="itdb-thumb-to-pixbufs">itdb_thumb_to_pixbufs</link>               (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
 </synopsis>
 </refsynopsisdiv>
@@ -80,21 +77,17 @@
 <refsect1 role="details">
 <title role="details.title">Details</title>
 <refsect2>
-<title><anchor id="Itdb-Artwork" role="struct"/>Itdb_Artwork</title>
-<indexterm><primary>Itdb_Artwork</primary></indexterm><programlisting>typedef struct {
-    GList *thumbnails;     /* list of Itdb_Thumbs */
-    guint32 id;            /* Artwork id used by photoalbums, starts at
-			    * 0x40... libgpod will set this on sync. */
+<title><anchor id="Itdb-Artwork" role="struct" condition="since:0.3.0"/>Itdb_Artwork</title>
+<indexterm role="0.3.0"><primary>Itdb_Artwork</primary></indexterm><programlisting>typedef struct {
+    Itdb_Thumb *thumbnail;
+    guint32 id;
+    guint64 dbid;
     gint32  unk028;
-    guint32 rating;        /* Rating from iPhoto * 20 (PhotoDB only) */
+    guint32 rating;
     gint32  unk036;
-    time_t  creation_date;  /* Date the image file was created
-			      (creation date of image file (PhotoDB only) */
-    time_t  digitized_date;/* Date the image was taken (EXIF information,
-			      PhotoDB only) */
-    guint32 artwork_size;  /* Size in bytes of the original source
-			      image (PhotoDB only -- don't touch in
-			      case of ArtworkDB!) */
+    time_t  creation_date;
+    time_t  digitized_date;
+    guint32 artwork_size;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -109,68 +102,119 @@
 } Itdb_Artwork;
 </programlisting>
 <para>
-
-</para></refsect2>
-<refsect2>
-<title><anchor id="Itdb-Thumb" role="struct"/>Itdb_Thumb</title>
-<indexterm><primary>Itdb_Thumb</primary></indexterm><programlisting>typedef struct {
-    ItdbThumbType type;
-    gchar   *filename;
-    guchar  *image_data;      /* holds the thumbnail data of
-				 non-transfered thumbnails when
-				 filename == NULL */
-    gsize   image_data_len;   /* length of data */
-    gpointer pixbuf;
-    gint    rotation;         /* angle (0, 90, 180, 270) to rotate the image */
-    guint32 offset;
-    guint32 size;
-    gint16  width;
-    gint16  height;
-    gint16  horizontal_padding;
-    gint16  vertical_padding;
-    /* reserved for future use */
-    gint32 reserved_int1;
-    gint32 reserved_int2;
-    gpointer reserved1;
-    gpointer reserved2;
-} Itdb_Thumb;
-</programlisting>
+Structure representing artwork in an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> or <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link></para>
 <para>
 
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-Thumb">Itdb_Thumb</link>&nbsp;*<structfield>thumbnail</structfield>;</term>
+<listitem><simpara>          An <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                 Artwork id used by photoalbums.  This starts at 0x40 and
+                     is set automatically when the ArtworkDB or PhotoDB is
+                     written
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>dbid</structfield>;</term>
+<listitem><simpara>               The dbid of associated track.  Used internally by
+                     libgpod.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk028</structfield>;</term>
+<listitem><simpara>             Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>rating</structfield>;</term>
+<listitem><simpara>             Rating from iPhoto * 20 (PhotoDB only)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk036</structfield>;</term>
+<listitem><simpara>             Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>creation_date</structfield>;</term>
+<listitem><simpara>      Date the image file was created (PhotoDB only)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>digitized_date</structfield>;</term>
+<listitem><simpara>     Date the image was taken (EXIF information, PhotoDB
+                     only)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>artwork_size</structfield>;</term>
+<listitem><simpara>       Size in bytes of the original source image (PhotoDB
+                     only -- don't touch in case of ArtworkDB!)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.3.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbThumbType" role="enum"/>enum ItdbThumbType</title>
-<indexterm><primary>ItdbThumbType</primary></indexterm><programlisting>typedef enum { 
-    ITDB_THUMB_COVER_SMALL = 0,
-    ITDB_THUMB_COVER_LARGE,
-    ITDB_THUMB_PHOTO_SMALL,
-    ITDB_THUMB_PHOTO_LARGE,
-    ITDB_THUMB_PHOTO_FULL_SCREEN,
-    ITDB_THUMB_PHOTO_TV_SCREEN,
-    ITDB_THUMB_COVER_XLARGE,      /* iPhone: cover flow */
-    ITDB_THUMB_COVER_MEDIUM,      /* iPhone: cover view */
-    ITDB_THUMB_COVER_SMEDIUM,     /* iPhone: ??         */
-    ITDB_THUMB_COVER_XSMALL,      /* iPhone: ??         */
-} ItdbThumbType;
-</programlisting>
+<title><anchor id="itdb-artwork-new" role="function" condition="since:0.3.0"/>itdb_artwork_new ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_new</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_artwork_new                    (void);</programlisting>
 <para>
-
-</para></refsect2>
-<refsect2>
-<title><anchor id="itdb-artwork-new" role="function"/>itdb_artwork_new ()</title>
-<indexterm><primary>itdb_artwork_new</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_artwork_new                    (void);</programlisting>
-<para>
 Creates a new <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> to be freed with <link linkend="itdb-artwork-free"><function>itdb_artwork_free()</function></link> when
 no longer needed
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-duplicate" role="function"/>itdb_artwork_duplicate ()</title>
-<indexterm><primary>itdb_artwork_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_artwork_duplicate              (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
+<title><anchor id="itdb-artwork-duplicate" role="function" condition="since:0.3.0"/>itdb_artwork_duplicate ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_artwork_duplicate              (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
 <para>
 Duplicates <parameter>artwork</parameter></para>
 <para>
@@ -180,11 +224,13 @@
 <listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new copy of <parameter>artwork</parameter>
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-free" role="function"/>itdb_artwork_free ()</title>
-<indexterm><primary>itdb_artwork_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_free                   (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
+<title><anchor id="itdb-artwork-free" role="function" condition="since:0.3.0"/>itdb_artwork_free ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_free                   (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
 <para>
 Frees memory used by <parameter>artwork</parameter></para>
 <para>
@@ -193,151 +239,163 @@
 <varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-add-thumbnail" role="function"/>itdb_artwork_add_thumbnail ()</title>
-<indexterm><primary>itdb_artwork_add_thumbnail</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_add_thumbnail          (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type,
+<title><anchor id="itdb-artwork-get-pixbuf" role="function" condition="since:0.7.0"/>itdb_artwork_get_pixbuf ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_get_pixbuf</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_artwork_get_pixbuf             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);</programlisting>
+<para>
+Returns a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> representing the thumbnail stored in <parameter>artwork</parameter>
+scaling it if appropriate. If either height or width is -1, then the
+biggest unscaled thumbnail available will be returned</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara>    an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
+<listitem><simpara>      width of the pixbuf to retrieve, -1 for the biggest
+             possible size and 0 for the smallest possible size (with no
+             scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
+<listitem><simpara>     height of the pixbuf to retrieve, -1 for the biggest possible
+             size and 0 for the smallest possible size (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-set-thumbnail" role="function" condition="since:0.7.0"/>itdb_artwork_set_thumbnail ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_set_thumbnail</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_set_thumbnail          (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
                                                          const <link linkend="gchar">gchar</link> *filename,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
-Appends a thumbnail of type <parameter>type</parameter> to existing thumbnails in <parameter>artwork</parameter>. No 
+Appends a thumbnail of type <parameter>type</parameter> to existing thumbnails in <parameter>artwork</parameter>. No
 data is read from <parameter>filename</parameter> yet, the file will be when <parameter>artwork</parameter> is saved to
 disk. <parameter>filename</parameter> must still exist when that happens.
 </para>
 <para>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</para>
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Thumbnail"><type>Itdb_Thumbnail</type></link>
+<listitem><simpara>    an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
-<listitem><simpara> thumbnail size
-</simpara></listitem></varlistentry>
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> image file to use to create the thumbnail
+<listitem><simpara>   image file to use to create the thumbnail
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
-<listitem><simpara> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be successfully added, FALSE
 otherwise. <parameter>error</parameter> is set appropriately.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-add-thumbnail-from-data" role="function"/>itdb_artwork_add_thumbnail_from_data ()</title>
-<indexterm><primary>itdb_artwork_add_thumbnail_from_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_add_thumbnail_from_data
+<title><anchor id="itdb-artwork-set-thumbnail-from-data" role="function" condition="since:0.7.0"/>itdb_artwork_set_thumbnail_from_data ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_set_thumbnail_from_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_set_thumbnail_from_data
                                                         (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type,
                                                          const <link linkend="guchar">guchar</link> *image_data,
                                                          <link linkend="gsize">gsize</link> image_data_len,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
-Appends a thumbnail of type <parameter>type</parameter> to existing thumbnails in
-<parameter>artwork</parameter>. No data is processed yet. This will be done when <parameter>artwork</parameter>
-is saved to disk.
+Set a thumbnail in <parameter>artwork</parameter>. No data is processed yet. This will be done when
+<parameter>artwork</parameter> is saved to disk.
 </para>
 <para>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</para>
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Thumbnail"><type>Itdb_Thumbnail</type></link>
+<listitem><simpara>        an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
-<listitem><simpara> thumbnail size
-</simpara></listitem></varlistentry>
 <varlistentry><term><parameter>image_data</parameter>&nbsp;:</term>
-<listitem><simpara> data used to create the thumbnail (the raw contents of
-             an image file)
+<listitem><simpara>     data used to create the thumbnail (the raw contents of
+                 an image file)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>image_data_len</parameter>&nbsp;:</term>
 <listitem><simpara> length of above data block
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
-<listitem><simpara> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<listitem><simpara>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>          return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be successfully added, FALSE
 otherwise. <parameter>error</parameter> is set appropriately.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-add-thumbnail-from-pixbuf" role="function"/>itdb_artwork_add_thumbnail_from_pixbuf ()</title>
-<indexterm><primary>itdb_artwork_add_thumbnail_from_pixbuf</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_add_thumbnail_from_pixbuf
+<title><anchor id="itdb-artwork-set-thumbnail-from-pixbuf" role="function" condition="since:0.7.0"/>itdb_artwork_set_thumbnail_from_pixbuf ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_set_thumbnail_from_pixbuf</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_set_thumbnail_from_pixbuf
                                                         (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type,
                                                          <link linkend="gpointer">gpointer</link> pixbuf,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
-Appends a thumbnail of type <parameter>type</parameter> to existing thumbnails in <parameter>artwork</parameter>. No 
-data is generated from <parameter>pixbuf</parameter> yet, it will be done when <parameter>artwork</parameter> is saved 
-to disk. <parameter>pixbuf</parameter> is ref'ed by this function, but is not copied, so it should
-not be modified before the database is saved.
+Set a thumbnail in <parameter>artwork</parameter>. No data is generated from <parameter>pixbuf</parameter> yet, it will
+be done when <parameter>artwork</parameter> is saved to disk. <parameter>pixbuf</parameter> is ref'ed by this function,
+but is not copied, so it should not be modified before the database is saved.
 </para>
 <para>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</para>
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Thumbnail"><type>Itdb_Thumbnail</type></link>
+<listitem><simpara>    an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
-<listitem><simpara> thumbnail size
-</simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
-<listitem><simpara> <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to use to create the thumbnail
+<listitem><simpara>     <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to use to create the thumbnail
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
-<listitem><simpara> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be successfully added, FALSE
 otherwise. <parameter>error</parameter> is set appropriately.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-artwork-remove-thumbnail" role="function"/>itdb_artwork_remove_thumbnail ()</title>
-<indexterm><primary>itdb_artwork_remove_thumbnail</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_remove_thumbnail       (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
-<para>
-Removes <parameter>thumb</parameter> from <parameter>artwork</parameter>. The memory used by <parameter>thumb</parameter> is freed.</para>
-<para>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-remove-thumbnails" role="function"/>itdb_artwork_remove_thumbnails ()</title>
-<indexterm><primary>itdb_artwork_remove_thumbnails</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_remove_thumbnails      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
+<title><anchor id="itdb-artwork-remove-thumbnails" role="function" condition="since:0.3.0"/>itdb_artwork_remove_thumbnails ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_remove_thumbnails</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_remove_thumbnails      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
 <para>
 Removes all thumbnails from <parameter>artwork</parameter></para>
 <para>
@@ -346,53 +404,37 @@
 <varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-artwork-get-thumb-by-type" role="function"/>itdb_artwork_get_thumb_by_type ()</title>
-<indexterm><primary>itdb_artwork_get_thumb_by_type</primary></indexterm><programlisting><link linkend="Itdb-Thumb">Itdb_Thumb</link>*         itdb_artwork_get_thumb_by_type      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
-                                                         <link linkend="ItdbThumbType">ItdbThumbType</link> type);</programlisting>
+<title><anchor id="Itdb-Thumb" role="struct" condition="since:0.3.0"/>Itdb_Thumb</title>
+<indexterm role="0.3.0"><primary>Itdb_Thumb</primary></indexterm><programlisting>typedef struct {
+    ItdbThumbDataType data_type;
+    guint rotation;
+} Itdb_Thumb;
+</programlisting>
 <para>
-Searches <parameter>artwork</parameter> for an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link> of type <parameter>type</parameter>.</para>
+This is an opaque structure representing a thumbnail to be
+transferred to the ipod or read from the ipod.</para>
 <para>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
-<listitem><simpara> type of the <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link> to retrieve
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link> of type <parameter>type</parameter>, or NULL if such a thumbnail couldn't
-be found
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="ItdbThumbDataType">ItdbThumbDataType</link>&nbsp;<structfield>data_type</structfield>;</term>
+<listitem><simpara> The type of data (file, memory, pixbuf, ipod, etc.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint">guint</link>&nbsp;<structfield>rotation</structfield>;</term>
+<listitem><simpara>  Angle by which the image is rotated counterclockwise
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-thumb-get-gdk-pixbuf" role="function"/>itdb_thumb_get_gdk_pixbuf ()</title>
-<indexterm><primary>itdb_thumb_get_gdk_pixbuf</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_thumb_get_gdk_pixbuf           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
-                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
+<title><anchor id="itdb-thumb-duplicate" role="function" condition="since:0.3.0"/>itdb_thumb_duplicate ()</title>
+<indexterm role="0.3.0"><primary>itdb_thumb_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Thumb">Itdb_Thumb</link>*         itdb_thumb_duplicate                (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
 <para>
-Converts <parameter>thumb</parameter> to a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
-Since we want to have gdk-pixbuf dependency optional, a generic
-gpointer is returned which you have to cast to a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> using 
-<link linkend="GDK-PIXBUF:CAPS"><function>GDK_PIXBUF()</function></link> yourself.</para>
-<para>
-
-</para><variablelist role="params">
-<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed with <link linkend="gdk-pixbuf-unref"><function>gdk_pixbuf_unref()</function></link>
-after use, or NULL if the creation of the gdk-pixbuf failed or if 
-libgpod was compiled without gdk-pixbuf support.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-thumb-duplicate" role="function"/>itdb_thumb_duplicate ()</title>
-<indexterm><primary>itdb_thumb_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Thumb">Itdb_Thumb</link>*         itdb_thumb_duplicate                (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
-<para>
 Duplicates the data contained in <parameter>thumb</parameter></para>
 <para>
 
@@ -400,13 +442,15 @@
 <varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated copy of <parameter>thumb</parameter> to be freed with 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated copy of <parameter>thumb</parameter> to be freed with
 <link linkend="itdb-thumb-free"><function>itdb_thumb_free()</function></link> after use
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-thumb-free" role="function"/>itdb_thumb_free ()</title>
-<indexterm><primary>itdb_thumb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_thumb_free                     (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
+<title><anchor id="itdb-thumb-free" role="function" condition="since:0.3.0"/>itdb_thumb_free ()</title>
+<indexterm role="0.3.0"><primary>itdb_thumb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_thumb_free                     (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
 <para>
 Frees the memory used by <parameter>thumb</parameter></para>
 <para>
@@ -415,27 +459,58 @@
 <varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-thumb-new" role="function"/>itdb_thumb_new ()</title>
-<indexterm><primary>itdb_thumb_new</primary></indexterm><programlisting><link linkend="Itdb-Thumb">Itdb_Thumb</link>*         itdb_thumb_new                      (void);</programlisting>
+<title><anchor id="itdb-thumb-to-pixbuf-at-size" role="function" condition="since:0.7.0"/>itdb_thumb_to_pixbuf_at_size ()</title>
+<indexterm role="0.7.0"><primary>itdb_thumb_to_pixbuf_at_size</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_thumb_to_pixbuf_at_size        (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);</programlisting>
 <para>
-Creates a new <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link></para>
+Converts <parameter>thumb</parameter> to a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
+</para>
 <para>
+<note>
+Since we want to have gdk-pixbuf dependency optional, a generic
+gpointer is returned which you have to cast to a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> using
+<link linkend="GDK-PIXBUF:CAPS"><function>GDK_PIXBUF()</function></link> yourself.
+</note></para>
+<para>
 
 </para><variablelist role="params">
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> newly allocated <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link> to be freed with <link linkend="itdb-thumb-free"><function>itdb_thumb_free()</function></link>
-after use
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
+<listitem><simpara>  width of the pixbuf to retrieve, -1 for the biggest
+         possible size and 0 for the smallest possible size (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
+<listitem><simpara> height of the pixbuf to retrieve, -1 for the biggest possible size
+         and 0 for the smallest possible size (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed with <link linkend="gdk-pixbuf-unref"><function>gdk_pixbuf_unref()</function></link>
+after use, or NULL if the creation of the gdk-pixbuf failed or if
+libgpod was compiled without gdk-pixbuf support.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-thumb-get-filename" role="function"/>itdb_thumb_get_filename ()</title>
-<indexterm><primary>itdb_thumb_get_filename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_thumb_get_filename             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<title><anchor id="itdb-thumb-to-pixbufs" role="function" condition="since:0.7.0"/>itdb_thumb_to_pixbufs ()</title>
+<indexterm role="0.7.0"><primary>itdb_thumb_to_pixbufs</primary></indexterm><programlisting><link linkend="GList">GList</link>*              itdb_thumb_to_pixbufs               (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
 <para>
-Get filename of thumbnail. If it's a thumbnail on the iPod, return
-the full path to the ithmb file. Otherwise return the full path to
-the original file.</para>
+Converts <parameter>thumb</parameter> to a <link linkend="GList"><type>GList</type></link> of <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>. The returned <link linkend="GList"><type>GList</type></link> will
+generally contain only 1 element, the full-size pixbuf associated with
+<parameter>thumb</parameter>, but when the artwork has been read from the ipod and hasn't been
+modified from the library, then the returned <link linkend="GList"><type>GList</type></link> will contain several
+<link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> corresponding to the various thumbnail sizes that were
+written to the iPod database.</para>
 <para>
 
 </para><variablelist role="params">
@@ -443,12 +518,16 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> newly allocated string containing the absolute path to the 
-thumbnail file. 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> which are associated with <parameter>thumb</parameter>, NULL
+if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+support. The <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> must be unreffed with <link linkend="gdk-pixbuf-unref"><function>gdk_pixbuf_unref()</function></link> after use
+and the <link linkend="GList"><type>GList</type></link> must be freed with <link linkend="g-list-free"><function>g_list_free()</function></link>.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
 
 </refsect1>
 
@@ -461,4 +540,6 @@
 </para>
 </refsect1>
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Copied: libgpod/trunk/docs/reference/xml/chapterdata.xml (from rev 340, libgpod/branches/upstream/current/docs/reference/xml/chapterdata.xml)
===================================================================
--- libgpod/trunk/docs/reference/xml/chapterdata.xml	                        (rev 0)
+++ libgpod/trunk/docs/reference/xml/chapterdata.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,320 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Chapter-Data">
+<refmeta>
+<refentrytitle role="top_of_page">Chapter Data</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Chapter Data</refname>
+<refpurpose>Data structure to store chapter data for tracks</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-Chapter">Itdb_Chapter</link>;
+                    <link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>;
+<link linkend="Itdb-Chapter">Itdb_Chapter</link>*       <link linkend="itdb-chapter-new">itdb_chapter_new</link>                    (void);
+<link linkend="Itdb-Chapter">Itdb_Chapter</link>*       <link linkend="itdb-chapter-duplicate">itdb_chapter_duplicate</link>              (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);
+<link linkend="void">void</link>                <link linkend="itdb-chapter-free">itdb_chapter_free</link>                   (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);
+<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   <link linkend="itdb-chapterdata-new">itdb_chapterdata_new</link>                (void);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-chapterdata-add-chapter">itdb_chapterdata_add_chapter</link>        (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="gint32">gint32</link> startpos,
+                                                         <link linkend="gchar">gchar</link> *chaptertitle);
+<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   <link linkend="itdb-chapterdata-duplicate">itdb_chapterdata_duplicate</link>          (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);
+<link linkend="void">void</link>                <link linkend="itdb-chapterdata-remove-chapter">itdb_chapterdata_remove_chapter</link>     (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);
+<link linkend="void">void</link>                <link linkend="itdb-chapterdata-remove-chapters">itdb_chapterdata_remove_chapters</link>    (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);
+<link linkend="void">void</link>                <link linkend="itdb-chapterdata-free">itdb_chapterdata_free</link>               (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+Chapters allow for a large file to be divided into sections.  The start and stop
+points in the track are defined here, as well as the title for each chapter.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-Chapter" role="struct" condition="since:0.7.0"/>Itdb_Chapter</title>
+<indexterm role="0.7.0"><primary>Itdb_Chapter</primary></indexterm><programlisting>typedef struct {
+    guint32 startpos;
+    gchar *chaptertitle;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapter;
+</programlisting>
+<para>
+Structure representing an iTunesDB Chapter</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>startpos</structfield>;</term>
+<listitem><simpara>      The start position of the chapter in ms. The first chapter
+                begins at 1.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>chaptertitle</structfield>;</term>
+<listitem><simpara>  The chapter title in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-Chapterdata" role="struct" condition="since:0.7.0"/>Itdb_Chapterdata</title>
+<indexterm role="0.7.0"><primary>Itdb_Chapterdata</primary></indexterm><programlisting>typedef struct {
+    GList *chapters;
+    guint32 unk024;
+    guint32 unk028;
+    guint32 unk032;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapterdata;
+</programlisting>
+<para>
+Structure representing iTunesDB Chapter data</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>chapters</structfield>;</term>
+<listitem><simpara>      A list of chapters (<link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk024</structfield>;</term>
+<listitem><simpara>        Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk028</structfield>;</term>
+<listitem><simpara>        Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk032</structfield>;</term>
+<listitem><simpara>        Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapter-new" role="function" condition="since:0.7.0"/>itdb_chapter_new ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapter_new</primary></indexterm><programlisting><link linkend="Itdb-Chapter">Itdb_Chapter</link>*       itdb_chapter_new                    (void);</programlisting>
+<para>
+Creates a new <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> newly allocated <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link> to be freed with <link linkend="itdb-chapter-free"><function>itdb_chapter_free()</function></link>
+after use
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapter-duplicate" role="function" condition="since:0.7.0"/>itdb_chapter_duplicate ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapter_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Chapter">Itdb_Chapter</link>*       itdb_chapter_duplicate              (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);</programlisting>
+<para>
+Duplicates the data contained in <parameter>chapter</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapter</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated copy of <parameter>chapter</parameter> to be freed with
+<link linkend="itdb-chapter-free"><function>itdb_chapter_free()</function></link> after use
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapter-free" role="function" condition="since:0.7.0"/>itdb_chapter_free ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapter_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapter_free                   (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);</programlisting>
+<para>
+Frees the memory used by <parameter>chapter</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapter</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-new" role="function" condition="since:0.7.0"/>itdb_chapterdata_new ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_new</primary></indexterm><programlisting><link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   itdb_chapterdata_new                (void);</programlisting>
+<para>
+Creates a new <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link> to be freed with
+              <link linkend="itdb-chapterdata-free"><function>itdb_chapterdata_free()</function></link> when no longer needed
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-add-chapter" role="function" condition="since:0.7.0"/>itdb_chapterdata_add_chapter ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_add_chapter</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_chapterdata_add_chapter        (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="gint32">gint32</link> startpos,
+                                                         <link linkend="gchar">gchar</link> *chaptertitle);</programlisting>
+<para>
+Appends a chapter to existing chapters in <parameter>chapterdata</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>startpos</parameter>&nbsp;:</term>
+<listitem><simpara>     chapter start time in milliseconds
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>chaptertitle</parameter>&nbsp;:</term>
+<listitem><simpara> chapter title
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the chapter could be successfully added, FALSE
+otherwise.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-duplicate" role="function" condition="since:0.7.0"/>itdb_chapterdata_duplicate ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   itdb_chapterdata_duplicate          (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);</programlisting>
+<para>
+Duplicates <parameter>chapterdata</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new copy of <parameter>chapterdata</parameter>
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-remove-chapter" role="function" condition="since:0.7.0"/>itdb_chapterdata_remove_chapter ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_remove_chapter</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapterdata_remove_chapter     (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);</programlisting>
+<para>
+Removes <parameter>chapter</parameter> from <parameter>chapterdata</parameter>. The memory used by <parameter>chapter</parameter> is freed.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>chapter</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-remove-chapters" role="function" condition="since:0.7.0"/>itdb_chapterdata_remove_chapters ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_remove_chapters</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapterdata_remove_chapters    (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);</programlisting>
+<para>
+Removes all chapters from <parameter>chapterdata</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-free" role="function" condition="since:0.7.0"/>itdb_chapterdata_free ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapterdata_free               (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);</programlisting>
+<para>
+Frees memory used by <parameter>chapterdata</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Modified: libgpod/trunk/docs/reference/xml/device.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/device.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/device.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -27,28 +27,29 @@
 <link linkend="void">void</link>                <link linkend="itdb-device-set-mountpoint">itdb_device_set_mountpoint</link>          (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          const <link linkend="gchar">gchar</link> *mp);
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-read-sysinfo">itdb_device_read_sysinfo</link>            (<link linkend="Itdb-Device">Itdb_Device</link> *device);
-<link linkend="gchar">gchar</link>*              <link linkend="itdb-device-get-sysinfo">itdb_device_get_sysinfo</link>             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-device-get-sysinfo">itdb_device_get_sysinfo</link>             (const <link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          const <link linkend="gchar">gchar</link> *field);
 <link linkend="void">void</link>                <link linkend="itdb-device-set-sysinfo">itdb_device_set_sysinfo</link>             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          const <link linkend="gchar">gchar</link> *field,
                                                          const <link linkend="gchar">gchar</link> *value);
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-write-sysinfo">itdb_device_write_sysinfo</link>           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          <link linkend="GError">GError</link> **error);
-const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* <link linkend="itdb-device-get-ipod-info">itdb_device_get_ipod_info</link>          (<link linkend="Itdb-Device">Itdb_Device</link> *device);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-artwork">itdb_device_supports_artwork</link>        (<link linkend="Itdb-Device">Itdb_Device</link> *device);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-photo">itdb_device_supports_photo</link>          (<link linkend="Itdb-Device">Itdb_Device</link> *device);
+                    <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>;
+const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* <link linkend="itdb-device-get-ipod-info">itdb_device_get_ipod_info</link>          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-artwork">itdb_device_supports_artwork</link>        (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-photo">itdb_device_supports_photo</link>          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-video">itdb_device_supports_video</link>          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
 const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* <link linkend="itdb-info-get-ipod-info-table">itdb_info_get_ipod_info_table</link>      (void);
+enum                <link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link>;
 const <link linkend="gchar">gchar</link>*        <link linkend="itdb-info-get-ipod-generation-string">itdb_info_get_ipod_generation_string</link>
                                                         (<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link> generation);
+enum                <link linkend="Itdb-IpodModel">Itdb_IpodModel</link>;
 const <link linkend="gchar">gchar</link>*        <link linkend="itdb-info-get-ipod-model-name-string">itdb_info_get_ipod_model_name_string</link>
                                                         (<link linkend="Itdb-IpodModel">Itdb_IpodModel</link> model);
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-init-ipod">itdb_init_ipod</link>                      (const <link linkend="gchar">gchar</link> *mountpoint,
                                                          const <link linkend="gchar">gchar</link> *model_number,
                                                          const <link linkend="gchar">gchar</link> *ipod_name,
                                                          <link linkend="GError">GError</link> **error);
-enum                <link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link>;
-                    <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>;
-enum                <link linkend="Itdb-IpodModel">Itdb_IpodModel</link>;
                     <link linkend="Itdb-ArtworkFormat">Itdb_ArtworkFormat</link>;
 </synopsis>
 </refsynopsisdiv>
@@ -71,29 +72,66 @@
 <refsect1 role="details">
 <title role="details.title">Details</title>
 <refsect2>
-<title><anchor id="Itdb-Device" role="struct"/>Itdb_Device</title>
-<indexterm><primary>Itdb_Device</primary></indexterm><programlisting>typedef struct {
-    gchar *mountpoint;    /* mountpoint of the iPod */
-    gint   musicdirs;     /* number of /iPod_Control/Music/F.. dirs */
-    guint  byte_order;    /* G_LITTLE_ENDIAN "regular" endianness 
-			   * G_BIG_ENDIAN "reversed" endianness (e.g. mobile
-			   * phone iTunesDBs)
-			   */
-    GHashTable *sysinfo;  /* hash with value/key pairs of all entries
-			   * in Device/SysInfo */
-    gboolean sysinfo_changed; /* Has the sysinfo hash been changed by
-				 the user (itdb_set_sysinfo) */
-    gint timezone_shift;  /* difference in seconds between the current
-                           * timezone and UTC
-                           */
+<title><anchor id="Itdb-Device" role="struct" condition="since:0.4.0"/>Itdb_Device</title>
+<indexterm role="0.4.0"><primary>Itdb_Device</primary></indexterm><programlisting>typedef struct {
+    gchar *mountpoint;
+    gint   musicdirs;
+    guint  byte_order;
+    GHashTable *sysinfo;
+    SysInfoIpodProperties *sysinfo_extended;
+    gboolean sysinfo_changed;
+    gint timezone_shift;
 } Itdb_Device;
 </programlisting>
 <para>
+Structure representing an iPod device</para>
+<para>
 
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>mountpoint</structfield>;</term>
+<listitem><simpara>         The mountpoint of the iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>musicdirs</structfield>;</term>
+<listitem><simpara>          The number of /iPod_Control/Music/F.. dirs
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint">guint</link>&nbsp;<structfield>byte_order</structfield>;</term>
+<listitem><simpara>         G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN
+                     "reversed" endianness (e.g. mobile phone iTunesDBs)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GHashTable">GHashTable</link>&nbsp;*<structfield>sysinfo</structfield>;</term>
+<listitem><simpara>            A hash with key/value pairs of all entries in
+                     Device/SysInfo
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="SysInfoIpodProperties">SysInfoIpodProperties</link>&nbsp;*<structfield>sysinfo_extended</structfield>;</term>
+<listitem><simpara>   The parsed content of SysInfoExtended, which can be NULL
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>sysinfo_changed</structfield>;</term>
+<listitem><simpara>    True if the sysinfo hash been changed by the user, false
+                     otherwise.  (see <link linkend="itdb-set-sysinfo"><function>itdb_set_sysinfo()</function></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>timezone_shift</structfield>;</term>
+<listitem><simpara>     The difference in seconds between the current timezone
+                     and UTC
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-new" role="function"/>itdb_device_new ()</title>
-<indexterm><primary>itdb_device_new</primary></indexterm><programlisting><link linkend="Itdb-Device">Itdb_Device</link>*        itdb_device_new                     (void);</programlisting>
+<title><anchor id="itdb-device-new" role="function" condition="since:0.4.0"/>itdb_device_new ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_new</primary></indexterm><programlisting><link linkend="Itdb-Device">Itdb_Device</link>*        itdb_device_new                     (void);</programlisting>
 <para>
 Creates a new <link linkend="Itdb-Device"><type>Itdb_Device</type></link> structure</para>
 <para>
@@ -101,11 +139,13 @@
 </para><variablelist role="params">
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Device"><type>Itdb_Device</type></link> which must be freed with
 <link linkend="itdb-device-free"><function>itdb_device_free()</function></link> when no longer needed
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-free" role="function"/>itdb_device_free ()</title>
-<indexterm><primary>itdb_device_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_free                    (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<title><anchor id="itdb-device-free" role="function" condition="since:0.4.0"/>itdb_device_free ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_free                    (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
 <para>
 Frees memory used by <parameter>device</parameter></para>
 <para>
@@ -114,10 +154,11 @@
 <varlistentry><term><parameter>device</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-set-mountpoint" role="function"/>itdb_device_set_mountpoint ()</title>
-<indexterm><primary>itdb_device_set_mountpoint</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_set_mountpoint          (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<title><anchor id="itdb-device-set-mountpoint" role="function" condition="since:0.4.0"/>itdb_device_set_mountpoint ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_set_mountpoint</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_set_mountpoint          (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          const <link linkend="gchar">gchar</link> *mp);</programlisting>
 <para>
 Sets the mountpoint of <parameter>device</parameter> to <parameter>mp</parameter> and update the cached device 
@@ -129,12 +170,13 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
-<listitem><simpara> the new mount point
+<listitem><simpara>     the new mount point
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-read-sysinfo" role="function"/>itdb_device_read_sysinfo ()</title>
-<indexterm><primary>itdb_device_read_sysinfo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_read_sysinfo            (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<title><anchor id="itdb-device-read-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_read_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_read_sysinfo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_read_sysinfo            (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
 <para>
 Reads the SysInfo file and stores information in device->sysinfo for
 later use.</para>
@@ -145,11 +187,13 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if file could be read, FALSE otherwise 
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-get-sysinfo" role="function"/>itdb_device_get_sysinfo ()</title>
-<indexterm><primary>itdb_device_get_sysinfo</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_device_get_sysinfo             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<title><anchor id="itdb-device-get-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_get_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_get_sysinfo</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_device_get_sysinfo             (const <link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          const <link linkend="gchar">gchar</link> *field);</programlisting>
 <para>
 Retrieve specified field from the SysInfo file.</para>
@@ -160,15 +204,17 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>field</parameter>&nbsp;:</term>
-<listitem><simpara> field to retrive information from
+<listitem><simpara>  field to retrive information from
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the information associated with <parameter>field</parameter>, or NULL if <parameter>field</parameter>
 couldn't be found. <link linkend="g-free"><function>g_free()</function></link> after use
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-set-sysinfo" role="function"/>itdb_device_set_sysinfo ()</title>
-<indexterm><primary>itdb_device_set_sysinfo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_set_sysinfo             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<title><anchor id="itdb-device-set-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_set_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_set_sysinfo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_set_sysinfo             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          const <link linkend="gchar">gchar</link> *field,
                                                          const <link linkend="gchar">gchar</link> *value);</programlisting>
 <para>
@@ -181,15 +227,16 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>field</parameter>&nbsp;:</term>
-<listitem><simpara> field to set
+<listitem><simpara>  field to set
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>value</parameter>&nbsp;:</term>
-<listitem><simpara> value to set (or NULL to remove the field).
+<listitem><simpara>  value to set (or NULL to remove the field).
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-write-sysinfo" role="function"/>itdb_device_write_sysinfo ()</title>
-<indexterm><primary>itdb_device_write_sysinfo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_write_sysinfo           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+<title><anchor id="itdb-device-write-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_write_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_write_sysinfo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_write_sysinfo           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
 Fills the SysInfo file with information in device->sysinfo. Note:
@@ -201,15 +248,91 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if file could be read, FALSE otherwise 
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-get-ipod-info" role="function"/>itdb_device_get_ipod_info ()</title>
-<indexterm><primary>itdb_device_get_ipod_info</primary></indexterm><programlisting>const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* itdb_device_get_ipod_info          (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<title><anchor id="Itdb-IpodInfo" role="struct" condition="since:0.4.0"/>Itdb_IpodInfo</title>
+<indexterm role="0.4.0"><primary>Itdb_IpodInfo</primary></indexterm><programlisting>typedef struct {
+    const gchar *model_number;
+    const double capacity;
+    const Itdb_IpodModel ipod_model;
+    const Itdb_IpodGeneration ipod_generation;
+    const guint musicdirs;
+    /* reserved for future use */
+    const gint32 reserved_int1;
+    const gint32 reserved_int2;
+    gconstpointer reserved1;
+    gconstpointer reserved2;
+} Itdb_IpodInfo;
+</programlisting>
 <para>
+Structure representing information about an iPod</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term>const&nbsp;<link linkend="gchar">gchar</link>&nbsp;*<structfield>model_number</structfield>;</term>
+<listitem><simpara>    The model number.  This is abbreviated.  If the first
+                  character is not numeric, it is ommited. e.g.
+                  "MA350 -> A350", "M9829 -> 9829"
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="double">double</link>&nbsp;<structfield>capacity</structfield>;</term>
+<listitem><simpara>        The iPod's capacity in gigabytes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="Itdb-IpodModel">Itdb_IpodModel</link>&nbsp;<structfield>ipod_model</structfield>;</term>
+<listitem><simpara>      The iPod model
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link>&nbsp;<structfield>ipod_generation</structfield>;</term>
+<listitem><simpara> The iPod generation
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="guint">guint</link>&nbsp;<structfield>musicdirs</structfield>;</term>
+<listitem><simpara>       The number of music (Fnn) dirs created by iTunes. The
+                  exact number seems to be version dependent. Therefore, the
+                  numbers here represent a mixture of reported values and
+                  common sense.  Note: this number does not necessarily
+                  represent the number of dirs present on a particular iPod.
+                  It is used when setting up a new iPod from scratch.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>   Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>   Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gconstpointer">gconstpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>       Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gconstpointer">gconstpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>       Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-get-ipod-info" role="function" condition="since:0.4.0"/>itdb_device_get_ipod_info ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_get_ipod_info</primary></indexterm><programlisting>const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* itdb_device_get_ipod_info          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
 Retrieve the <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entry for this iPod</para>
 <para>
 
@@ -218,14 +341,16 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entry for this iPod
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-supports-artwork" role="function"/>itdb_device_supports_artwork ()</title>
-<indexterm><primary>itdb_device_supports_artwork</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_artwork        (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<title><anchor id="itdb-device-supports-artwork" role="function" condition="since:0.5.0"/>itdb_device_supports_artwork ()</title>
+<indexterm role="0.5.0"><primary>itdb_device_supports_artwork</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_artwork        (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
 <para>
 Indicates whether <parameter>device</parameter> can display artwork or not. When dealing
-with a non-art capable ipod, no artwork data will be written to the
+with a non-art capable iPod, no artwork data will be written to the
 iPod so you can spare calls to the artwork handling methods.</para>
 <para>
 
@@ -234,11 +359,13 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can display artwork.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-device-supports-photo" role="function"/>itdb_device_supports_photo ()</title>
-<indexterm><primary>itdb_device_supports_photo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_photo          (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<title><anchor id="itdb-device-supports-photo" role="function" condition="since:0.5.0"/>itdb_device_supports_photo ()</title>
+<indexterm role="0.5.0"><primary>itdb_device_supports_photo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_photo          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
 <para>
 Indicates whether <parameter>device</parameter> can display photos or not.</para>
 <para>
@@ -248,87 +375,43 @@
 <listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can display photos.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-info-get-ipod-info-table" role="function"/>itdb_info_get_ipod_info_table ()</title>
-<indexterm><primary>itdb_info_get_ipod_info_table</primary></indexterm><programlisting>const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* itdb_info_get_ipod_info_table      (void);</programlisting>
-<para>
-Return a pointer to the start of valid iPod model descriptions,
-which is an array of <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entries.</para>
-<para>
 
-</para><variablelist role="params">
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the array of <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entries.
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-info-get-ipod-generation-string" role="function"/>itdb_info_get_ipod_generation_string ()</title>
-<indexterm><primary>itdb_info_get_ipod_generation_string</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_info_get_ipod_generation_string
-                                                        (<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link> generation);</programlisting>
+<title><anchor id="itdb-device-supports-video" role="function" condition="since:0.7.0"/>itdb_device_supports_video ()</title>
+<indexterm role="0.7.0"><primary>itdb_device_supports_video</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_video          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
 <para>
-Return the iPod's generic generation name, like "First Generation",
-"Mobile Phone"...</para>
+Indicates whether <parameter>device</parameter> can play videos or not.</para>
 <para>
 
 </para><variablelist role="params">
-<varlistentry><term><parameter>generation</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-IpodGeneration"><type>Itdb_IpodGeneration</type></link>
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the generation name. This is a static
-string and must not be <link linkend="g-free"><function>g_free()</function></link>d.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-info-get-ipod-model-name-string" role="function"/>itdb_info_get_ipod_model_name_string ()</title>
-<indexterm><primary>itdb_info_get_ipod_model_name_string</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_info_get_ipod_model_name_string
-                                                        (<link linkend="Itdb-IpodModel">Itdb_IpodModel</link> model);</programlisting>
-<para>
-Return the iPod's generic model name, like "Color", "Nano"...</para>
-<para>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can play videos.
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>model</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-IpodModel"><type>Itdb_IpodModel</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the model name. This is a static string
-and must not be <link linkend="g-free"><function>g_free()</function></link>d.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-init-ipod" role="function"/>itdb_init_ipod ()</title>
-<indexterm><primary>itdb_init_ipod</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_init_ipod                      (const <link linkend="gchar">gchar</link> *mountpoint,
-                                                         const <link linkend="gchar">gchar</link> *model_number,
-                                                         const <link linkend="gchar">gchar</link> *ipod_name,
-                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<title><anchor id="itdb-info-get-ipod-info-table" role="function" condition="since:0.4.0"/>itdb_info_get_ipod_info_table ()</title>
+<indexterm role="0.4.0"><primary>itdb_info_get_ipod_info_table</primary></indexterm><programlisting>const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* itdb_info_get_ipod_info_table      (void);</programlisting>
 <para>
-Initialise an iPod device from scratch. The function attempts to
-create a blank database, complete with master playlist and device
-information as well as the directory structure required for the
-type of iPod.</para>
+Return a pointer to the start of valid iPod model descriptions,
+which is an array of <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entries.</para>
 <para>
 
 </para><variablelist role="params">
-<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
-<listitem><simpara>   the iPod mountpoint
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>model_number</parameter>&nbsp;:</term>
-<listitem><simpara> the iPod model number
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>ipod_name</parameter>&nbsp;:</term>
-<listitem><simpara>    the name to give to the iPod. Will be displayed in
-               gtkpod or itunes
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara>        return location for a <link linkend="GError"><type>GError</type></link> or NULL
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE when successful, FALSE if a failure has occurred.
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the array of <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entries.
 
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="Itdb-IpodGeneration" role="enum"/>enum Itdb_IpodGeneration</title>
-<indexterm><primary>Itdb_IpodGeneration</primary></indexterm><programlisting>typedef enum {
+<title><anchor id="Itdb-IpodGeneration" role="enum" condition="since:0.4.0"/>enum Itdb_IpodGeneration</title>
+<indexterm role="0.4.0"><primary>Itdb_IpodGeneration</primary></indexterm><programlisting>typedef enum {
     ITDB_IPOD_GENERATION_UNKNOWN,
     ITDB_IPOD_GENERATION_FIRST,
     ITDB_IPOD_GENERATION_SECOND,
@@ -344,47 +427,158 @@
     ITDB_IPOD_GENERATION_NANO_1,
     ITDB_IPOD_GENERATION_NANO_2,
     ITDB_IPOD_GENERATION_NANO_3,
+    ITDB_IPOD_GENERATION_NANO_4,
     ITDB_IPOD_GENERATION_VIDEO_1,
     ITDB_IPOD_GENERATION_VIDEO_2,
     ITDB_IPOD_GENERATION_CLASSIC_1,
+    ITDB_IPOD_GENERATION_CLASSIC_2,
     ITDB_IPOD_GENERATION_TOUCH_1,
-    /* The following 2 are no longer in use and should be removed */
-    ITDB_IPOD_GENERATION_FIFTH,
-    ITDB_IPOD_GENERATION_SIXTH,
+    ITDB_IPOD_GENERATION_IPHONE_1,
 } Itdb_IpodGeneration;
 </programlisting>
 <para>
+iPod generation information
+</para>
+<para>
+See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod
+for more details.</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-UNKNOWN:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_UNKNOWN</literal></term>
+<listitem><simpara>   Unknown iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-FIRST:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_FIRST</literal></term>
+<listitem><simpara>     First Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SECOND:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SECOND</literal></term>
+<listitem><simpara>    Second Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-THIRD:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_THIRD</literal></term>
+<listitem><simpara>     Third Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-FOURTH:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_FOURTH</literal></term>
+<listitem><simpara>    Fourth Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-PHOTO:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_PHOTO</literal></term>
+<listitem><simpara>     Photo iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-MOBILE:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_MOBILE</literal></term>
+<listitem><simpara>    Mobile iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-MINI-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_MINI_1</literal></term>
+<listitem><simpara>    First Generation iPod Mini
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-MINI-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_MINI_2</literal></term>
+<listitem><simpara>    Second Generation iPod Mini
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SHUFFLE_1</literal></term>
+<listitem><simpara> First Generation iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SHUFFLE_2</literal></term>
+<listitem><simpara> Second Generation iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SHUFFLE_3</literal></term>
+<listitem><simpara> Third Generation iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_1</literal></term>
+<listitem><simpara>    First Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_2</literal></term>
+<listitem><simpara>    Second Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-3:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_3</literal></term>
+<listitem><simpara>    Third Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-4:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_4</literal></term>
+<listitem><simpara>    Fourth Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-VIDEO-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_VIDEO_1</literal></term>
+<listitem><simpara>   First Generation iPod Video (aka 5g)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-VIDEO-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_VIDEO_2</literal></term>
+<listitem><simpara>   Second Generation iPod Video (aka 5.5g)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-CLASSIC-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_CLASSIC_1</literal></term>
+<listitem><simpara> First Generation iPod Classic
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-CLASSIC-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_CLASSIC_2</literal></term>
+<listitem><simpara> Second Generation iPod Classic
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-TOUCH-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_TOUCH_1</literal></term>
+<listitem><simpara>   First Generation iPod Touch
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-IPHONE-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_IPHONE_1</literal></term>
+<listitem><simpara>  First Generation iPhone
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="Itdb-IpodInfo" role="struct"/>Itdb_IpodInfo</title>
-<indexterm><primary>Itdb_IpodInfo</primary></indexterm><programlisting>typedef struct {
-    /* model_number is abbreviated: if the first character is not
-       numeric, it is ommited. e.g. "MA350 -&gt; A350", "M9829 -&gt; 9829" */
-    const gchar *model_number;
-    const double capacity;  /* in GB */
-    const Itdb_IpodModel ipod_model;
-    const Itdb_IpodGeneration ipod_generation;
-    /* Number of music (Fnn) dirs created by iTunes. The exact number
-       seems to be version dependent. Therefore, the numbers here
-       represent a mixture of reported values and common sense. Note:
-       this number does not necessarily represent the number of dirs
-       present on a particular iPod. It is used when setting up a new
-       iPod from scratch. */
-    const guint musicdirs;
-    /* reserved for future use */
-    const gint32 reserved_int1;
-    const gint32 reserved_int2;
-    gconstpointer reserved1;
-    gconstpointer reserved2;
-} Itdb_IpodInfo;
-</programlisting>
+<title><anchor id="itdb-info-get-ipod-generation-string" role="function" condition="since:0.4.0"/>itdb_info_get_ipod_generation_string ()</title>
+<indexterm role="0.4.0"><primary>itdb_info_get_ipod_generation_string</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_info_get_ipod_generation_string
+                                                        (<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link> generation);</programlisting>
 <para>
+Return the iPod's generic generation name, like "First Generation",
+"Mobile Phone"...</para>
+<para>
 
+</para><variablelist role="params">
+<varlistentry><term><parameter>generation</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-IpodGeneration"><type>Itdb_IpodGeneration</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the generation name. This is a static
+string and must not be <link linkend="g-free"><function>g_free()</function></link>d.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="Itdb-IpodModel" role="enum"/>enum Itdb_IpodModel</title>
-<indexterm><primary>Itdb_IpodModel</primary></indexterm><programlisting>typedef enum {
+<title><anchor id="Itdb-IpodModel" role="enum" condition="since:0.4.0"/>enum Itdb_IpodModel</title>
+<indexterm role="0.4.0"><primary>Itdb_IpodModel</primary></indexterm><programlisting>typedef enum {
     ITDB_IPOD_MODEL_INVALID,
     ITDB_IPOD_MODEL_UNKNOWN,
     ITDB_IPOD_MODEL_COLOR,
@@ -408,6 +602,9 @@
     ITDB_IPOD_MODEL_NANO_GREEN,
     ITDB_IPOD_MODEL_NANO_PINK,
     ITDB_IPOD_MODEL_NANO_RED,
+    ITDB_IPOD_MODEL_NANO_YELLOW,
+    ITDB_IPOD_MODEL_NANO_PURPLE,
+    ITDB_IPOD_MODEL_NANO_ORANGE,
     ITDB_IPOD_MODEL_IPHONE_1,
     ITDB_IPOD_MODEL_SHUFFLE_SILVER,
     ITDB_IPOD_MODEL_SHUFFLE_PINK,
@@ -415,32 +612,364 @@
     ITDB_IPOD_MODEL_SHUFFLE_GREEN,
     ITDB_IPOD_MODEL_SHUFFLE_ORANGE,
     ITDB_IPOD_MODEL_SHUFFLE_PURPLE,
+    ITDB_IPOD_MODEL_SHUFFLE_RED,
     ITDB_IPOD_MODEL_CLASSIC_SILVER,
     ITDB_IPOD_MODEL_CLASSIC_BLACK,
     ITDB_IPOD_MODEL_TOUCH_BLACK,
 } Itdb_IpodModel;
 </programlisting>
 <para>
+iPod model information</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-INVALID:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_INVALID</literal></term>
+<listitem><simpara>        Invalid model
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-UNKNOWN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_UNKNOWN</literal></term>
+<listitem><simpara>        Unknown model
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-COLOR:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_COLOR</literal></term>
+<listitem><simpara>          Color iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-COLOR-U2:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_COLOR_U2</literal></term>
+<listitem><simpara>       Color iPod (U2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-REGULAR:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_REGULAR</literal></term>
+<listitem><simpara>        Regular iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-REGULAR-U2:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_REGULAR_U2</literal></term>
+<listitem><simpara>     Regular iPod (U2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI</literal></term>
+<listitem><simpara>           iPod Mini
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-BLUE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_BLUE</literal></term>
+<listitem><simpara>      iPod Mini (Blue)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-PINK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_PINK</literal></term>
+<listitem><simpara>      iPod Mini (Pink)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-GREEN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_GREEN</literal></term>
+<listitem><simpara>     iPod Mini (Green)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-GOLD:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_GOLD</literal></term>
+<listitem><simpara>      iPod Mini (Gold)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE</literal></term>
+<listitem><simpara>        iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-WHITE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_WHITE</literal></term>
+<listitem><simpara>     iPod Nano (White)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_BLACK</literal></term>
+<listitem><simpara>     iPod Nano (Black)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_VIDEO_WHITE</literal></term>
+<listitem><simpara>    iPod Video (White)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_VIDEO_BLACK</literal></term>
+<listitem><simpara>    iPod Video (Black)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MOBILE-1:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MOBILE_1</literal></term>
+<listitem><simpara>       Mobile iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-VIDEO-U2:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_VIDEO_U2</literal></term>
+<listitem><simpara>       iPod Video (U2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-SILVER:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_SILVER</literal></term>
+<listitem><simpara>    iPod Nano (Silver)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-BLUE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_BLUE</literal></term>
+<listitem><simpara>      iPod Nano (Blue)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-GREEN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_GREEN</literal></term>
+<listitem><simpara>     iPod Nano (Green)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-PINK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_PINK</literal></term>
+<listitem><simpara>      iPod Nano (Pink)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-RED:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_RED</literal></term>
+<listitem><simpara>       iPod Nano (Red)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-YELLOW:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_YELLOW</literal></term>
+<listitem><simpara>    iPod Nano (Yellow)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-PURPLE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_PURPLE</literal></term>
+<listitem><simpara>    iPod Nano (Purple)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-ORANGE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_ORANGE</literal></term>
+<listitem><simpara>    iPod Nano (Orange)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-IPHONE-1:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_IPHONE_1</literal></term>
+<listitem><simpara>       iPhone
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_SILVER</literal></term>
+<listitem><simpara> iPod Shuffle (Silver)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_PINK</literal></term>
+<listitem><simpara>   iPod Shuffle (Pink)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_BLUE</literal></term>
+<listitem><simpara>   iPod Shuffle (Blue)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_GREEN</literal></term>
+<listitem><simpara>  iPod Shuffle (Green)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_ORANGE</literal></term>
+<listitem><simpara> iPod Shuffle (Orange)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_PURPLE</literal></term>
+<listitem><simpara> iPod Shuffle (Purple)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_RED</literal></term>
+<listitem><simpara>    iPod Shuffle (Red)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_CLASSIC_SILVER</literal></term>
+<listitem><simpara> iPod Classic (Silver)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_CLASSIC_BLACK</literal></term>
+<listitem><simpara>  iPod Classic (Black)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_TOUCH_BLACK</literal></term>
+<listitem><simpara>    iPod Touch (Black)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
 </para></refsect2>
 <refsect2>
+<title><anchor id="itdb-info-get-ipod-model-name-string" role="function" condition="since:0.4.0"/>itdb_info_get_ipod_model_name_string ()</title>
+<indexterm role="0.4.0"><primary>itdb_info_get_ipod_model_name_string</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_info_get_ipod_model_name_string
+                                                        (<link linkend="Itdb-IpodModel">Itdb_IpodModel</link> model);</programlisting>
+<para>
+Return the iPod's generic model name, like "Color", "Nano"...</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>model</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-IpodModel"><type>Itdb_IpodModel</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the model name. This is a static string
+and must not be <link linkend="g-free"><function>g_free()</function></link>d.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-init-ipod" role="function" condition="since:0.4.0"/>itdb_init_ipod ()</title>
+<indexterm role="0.4.0"><primary>itdb_init_ipod</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_init_ipod                      (const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *model_number,
+                                                         const <link linkend="gchar">gchar</link> *ipod_name,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Initialise an iPod device from scratch. The function attempts to
+create a blank database, complete with master playlist and device
+information as well as the directory structure required for the
+type of iPod.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara>   the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>model_number</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod model number
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>ipod_name</parameter>&nbsp;:</term>
+<listitem><simpara>    the name to give to the iPod. Will be displayed in
+               gtkpod or itunes
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>        return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE when successful, FALSE if a failure has occurred.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
 <title><anchor id="Itdb-ArtworkFormat" role="struct"/>Itdb_ArtworkFormat</title>
 <indexterm><primary>Itdb_ArtworkFormat</primary></indexterm><programlisting>typedef struct {
-	ItdbThumbType type;
-	gint16 width;
-	gint16 height;
-	gint16 correlation_id;
+        gint format_id;
+        gint width;
+        gint height;
         ItdbThumbFormat format;
         gint32 padding;
+        gboolean crop;
+        gint rotation;
+        guchar back_color[4];
+
+        gint display_width;
+        gboolean interlaced;
+        gboolean align_row_bytes;
+        gint color_adjustment;
+        gdouble gamma;
+        gint associated_format;
 } Itdb_ArtworkFormat;
 </programlisting>
 <para>
+Structure representing the characteristics of the thumbnails to
+write to a given .ithmb file. The format of the structure is based
+on the way artwork formats are written to SysInfoExtended.</para>
+<para>
 
-</para></refsect2>
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>format_id</structfield>;</term>
+<listitem><simpara>          Unique ID for the format (generally a 4 digit int)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>width</structfield>;</term>
+<listitem><simpara>              Width of the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>height</structfield>;</term>
+<listitem><simpara>             Height of the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbThumbFormat">ItdbThumbFormat</link>&nbsp;<structfield>format</structfield>;</term>
+<listitem><simpara>             Pixel format of the thumbnail (RGB, YUV, ...)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>padding</structfield>;</term>
+<listitem><simpara>            Number of bytes of padding to add after the thumbnail
+                     (not found in SysInfoExtended -- added for
+                     compatibility with hardcoded artwork formats)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>crop</structfield>;</term>
+<listitem><simpara>               Indicates if the thumbnail is to be cropped
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>rotation</structfield>;</term>
+<listitem><simpara>           Degrees to rotate the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guchar">guchar</link>&nbsp;<structfield>back_color</structfield>[4];</term>
+<listitem><simpara>         Background color for the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>display_width</structfield>;</term>
+<listitem><simpara>      Width at which the thumbnail will be displayed
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>interlaced</structfield>;</term>
+<listitem><simpara>         If TRUE, the thumbnails are interlaced
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>align_row_bytes</structfield>;</term>
+<listitem><simpara>    If TRUE, each pixel row must be aligned a 2-byte boundary
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>color_adjustment</structfield>;</term>
+<listitem><simpara>   Color adjustment for the thumbnails
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gdouble">gdouble</link>&nbsp;<structfield>gamma</structfield>;</term>
+<listitem><simpara>              Gamma value for the thumbails
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>associated_format</structfield>;</term>
+<listitem><simpara>  Unknown (not currently used)
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
 
 </refsect1>
 
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/itunesdb-copying.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-copying.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/itunesdb-copying.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -44,8 +44,8 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-These functions are for copying, renaming, and getting information about the
-files and directories on the iPod
+These functions are for copying, renaming, and retrieving information
+about the files and directories on the iPod.
 </para>
 </refsect1>
 
@@ -66,35 +66,35 @@
 iTunesDB).
 </para>
 <para>
-If <parameter>track</parameter>-&gt;transferred is set to TRUE, nothing is done. Upon
-successful transfer <parameter>track</parameter>-&gt;transferred is set to TRUE.
+If <parameter>track->transferred</parameter> is set to TRUE, nothing is done. Upon
+successful transfer <parameter>track->transferred</parameter> is set to TRUE.
 </para>
 <para>
-For storage, the directories "f00 ... fnn" will be used randomly.
+For storage, the directories "F00 ... Fnn" will be used randomly.
 </para>
 <para>
-The filename is constructed as "gtkpod"&lt;random number&gt; and copied
-to <parameter>track</parameter>-&gt;ipod_path. If this file already exists, &lt;random number&gt;
+The filename is constructed as "libgpod<parameter>random_number</parameter>" and copied
+to <parameter>track->ipod_path</parameter>. If this file already exists, <parameter>random_number</parameter>
 is adjusted until an unused filename is found.
 </para>
 <para>
-If <parameter>track</parameter>-&gt;ipod_path is already set, this one will be used
+If <parameter>track->ipod_path</parameter> is already set, this one will be used
 instead. If a file with this name already exists, it will be
 overwritten.
 </para>
 <para>
-<parameter>track</parameter>-&gt;filetype_marker is set according to the filename extension</para>
+<parameter>track->filetype_marker</parameter> is set according to the filename extension</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> to copy (containing <parameter>filename</parameter> metadata)
+<listitem><simpara>      the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> to copy (containing <parameter>filename</parameter> metadata)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> the source file
+<listitem><simpara>   the source file
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
 set accordingly.
@@ -104,44 +104,48 @@
 <title><anchor id="itdb-filename-fs2ipod" role="function"/>itdb_filename_fs2ipod ()</title>
 <indexterm><primary>itdb_filename_fs2ipod</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_filename_fs2ipod               (<link linkend="gchar">gchar</link> *filename);</programlisting>
 <para>
-Convert string from casual PC file name to iPod iTunesDB format using ':' 
-instead of G_DIR_SEPARATOR_S (ie slashes on Unix-like systems). <parameter>ipod_file</parameter>
-is modified in place.</para>
+Convert string from casual PC file name to iPod iTunesDB format
+using ':' instead of G_DIR_SEPARATOR_S (i.e. slashes on Unix-like
+systems). <parameter>ipod_file</parameter> is modified in place.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> a filename 'PC-style' (eg /iPod_Control/Music/f00/test.mp3)
+<listitem><simpara> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
 <title><anchor id="itdb-filename-ipod2fs" role="function"/>itdb_filename_ipod2fs ()</title>
 <indexterm><primary>itdb_filename_ipod2fs</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_filename_ipod2fs               (<link linkend="gchar">gchar</link> *ipod_file);</programlisting>
 <para>
-Convert string from from iPod iTunesDB format to casual PC file name
-using G_DIR_SEPARATOR (ie slashes on Unix-like systems) instead of ':'.
-<parameter>ipod_file</parameter> is modified in place.</para>
+Convert string from from iPod iTunesDB format to casual PC file
+name using G_DIR_SEPARATOR (ie slashes on Unix-like systems)
+instead of ':'.  <parameter>ipod_file</parameter> is modified in place.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>ipod_file</parameter>&nbsp;:</term>
-<listitem><simpara> a filename 'PC-style' (eg /iPod_Control/Music/f00/test.mp3)
+<listitem><simpara> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
 <title><anchor id="itdb-filename-on-ipod" role="function"/>itdb_filename_on_ipod ()</title>
 <indexterm><primary>itdb_filename_on_ipod</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_filename_on_ipod               (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
 <para>
-Return the full iPod filename as stored in <parameter>track</parameter>.
+Get the full iPod filename as stored in <parameter>track</parameter>.
 </para>
 <para>
-NOTE: NULL is returned when the file does not exist.
+<note>
+NULL is returned when the file does not exist.
+</note>
 </para>
 <para>
-NOTE: this code works around a problem on some systems (see
-<link linkend="itdb-resolve-path"><function>itdb_resolve_path()</function></link> ) and might return a filename with different
-case than the original filename. Don't copy it back to <parameter>track</parameter>
-unless you must</para>
+<note>
+This code works around a problem on some systems (see
+<link linkend="itdb-resolve-path"><function>itdb_resolve_path()</function></link>) and might return a filename with different
+case than the original filename. Don't copy it back to <parameter>track</parameter> if
+you can avoid it.
+</note></para>
 <para>
 
 </para><variablelist role="params">
@@ -153,15 +157,15 @@
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-musicdirs-number" role="function"/>itdb_musicdirs_number ()</title>
-<indexterm><primary>itdb_musicdirs_number</primary></indexterm><programlisting><link linkend="gint">gint</link>                itdb_musicdirs_number               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<title><anchor id="itdb-musicdirs-number" role="function" condition="since:0.1.3"/>itdb_musicdirs_number ()</title>
+<indexterm role="0.1.3"><primary>itdb_musicdirs_number</primary></indexterm><programlisting><link linkend="gint">gint</link>                itdb_musicdirs_number               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
 <para>
 Determine the number of F.. directories in iPod_Control/Music.
 </para>
 <para>
-If itdb->musicdirs is already set, simply return the previously
+If <parameter>itdb->musicdirs</parameter> is already set, simply return the previously
 determined number. Otherwise count the directories first and set
-itdb->musicdirs.</para>
+<parameter>itdb->musicdirs</parameter>.</para>
 <para>
 
 </para><variablelist role="params">
@@ -169,8 +173,10 @@
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> max number of directories in iPod_Control/Music
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.1.3
+</para></refsect2>
 <refsect2>
 <title><anchor id="itdb-rename-files" role="function"/>itdb_rename_files ()</title>
 <indexterm><primary>itdb_rename_files</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_rename_files                   (const <link linkend="gchar">gchar</link> *mp,
@@ -184,10 +190,10 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
-<listitem><simpara> mount point of the iPod
+<listitem><simpara>     mount point of the iPod
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> FALSE on error and sets <parameter>error</parameter> accordingly
 </simpara></listitem></varlistentry>
@@ -198,4 +204,6 @@
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/itunesdb-db.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-db.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/itunesdb-db.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -10,7 +10,7 @@
 
 <refnamediv>
 <refname>iPod database reading/writing</refname>
-<refpurpose>Functions to create, read, write the iPod database</refpurpose>
+<refpurpose>Functions to read, write, and create an iPod database</refpurpose>
 <!--[<xref linkend="desc" endterm="desc.title"/>]-->
 </refnamediv>
 
@@ -22,8 +22,7 @@
 
 
                     <link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>;
-<link linkend="void">void</link>                (<link linkend="ItdbUserDataDestroyFunc">*ItdbUserDataDestroyFunc</link>)          (<link linkend="gpointer">gpointer</link> userdata);
-<link linkend="gpointer">gpointer</link>            (<link linkend="ItdbUserDataDuplicateFunc">*ItdbUserDataDuplicateFunc</link>)        (<link linkend="gpointer">gpointer</link> userdata);
+enum                <link linkend="ItdbFileError">ItdbFileError</link>;
 <link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-new">itdb_new</link>                            (void);
 <link linkend="void">void</link>                <link linkend="itdb-free">itdb_free</link>                           (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
 <link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-parse">itdb_parse</link>                          (const <link linkend="gchar">gchar</link> *mp,
@@ -36,6 +35,8 @@
 <link linkend="guint32">guint32</link>             <link linkend="itdb-tracks-number">itdb_tracks_number</link>                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
 <link linkend="guint32">guint32</link>             <link linkend="itdb-tracks-number-nontransferred">itdb_tracks_number_nontransferred</link>   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
 <link linkend="guint32">guint32</link>             <link linkend="itdb-playlists-number">itdb_playlists_number</link>               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="void">void</link>                (<link linkend="ItdbUserDataDestroyFunc">*ItdbUserDataDestroyFunc</link>)          (<link linkend="gpointer">gpointer</link> userdata);
+<link linkend="gpointer">gpointer</link>            (<link linkend="ItdbUserDataDuplicateFunc">*ItdbUserDataDuplicateFunc</link>)        (<link linkend="gpointer">gpointer</link> userdata);
 </synopsis>
 </refsynopsisdiv>
 
@@ -50,11 +51,11 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-These functions are for creating, reading, writing, and deleting the iPod
+These functions are for reading, writing, creating, and deleting an iPod
 database and getting the total number of tracks and playlists.
 </para>
 <para>
-Overview of using the iPod database:
+Overview of using an iPod database:
 </para>
 <para>
 <link linkend="itdb-parse"><function>itdb_parse()</function></link>: read the iTunesDB and ArtworkDB
@@ -64,74 +65,65 @@
 </para>
 <para>
 <link linkend="itdb-parse"><function>itdb_parse()</function></link> will return a <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> structure with GLists
-containing all tracks (each track is represented by a <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
-structure) and the playlists (each playlist is represented by a
-<link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> structure).
+containing all tracks the playlists in the database.  Each track is
+represented by an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>.   Each playlist is represented by an
+<link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>.  See the <link linkend="libgpod-Tracks">Tracks</link>
+and <link linkend="libgpod-Playlists">Playlists</link> sections for
+details on tracks and playlists, respectively.
 </para>
 <para>
-A number of functions for adding, removing, duplicating tracks
-are available.  Please see
-<link linkend="libgpod-Tracks">Tracks</link> for details.
+Each <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> has a GList called <parameter>members</parameter> which contains all of
+the tracks in the playlist.  Tracks referenced in a playlist must also
+be present in the <parameter>tracks</parameter> GList of the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>.
 </para>
 <para>
-In each <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> structure you can find a GList called
-'members' with listing all member tracks. Each track referenced
-in a playlist must also be present in the tracks GList of the
-iTunesDB.
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the Music->Tracks/Albums/Artists/etc.
+menu.  In addition to the MPL there can be a number of normal
+playlists accessible through the Music->Playlists menu on the iPod.
+Tracks that are a member of one of these normal playlists must also be
+a member of the MPL.
 </para>
 <para>
-The iPod must contain one master playlist (MPL) containing all
-tracks accessible on the iPod through the
-Music->Tracks/Albums/Artists... menu. Besides the MPL there can
-be a number of normal playlists accessible through the
-Music->Playlists menu on the iPod. Tracks that are a member of
-one of these normal playlists must also be a member of the MPL.
+The Podcasts playlist is just another playlist with some internal
+flags set differently.  Tracks in the Podcasts playlist are not
+normally members of the MPL (so on the iPod they will only show up
+under the Podcasts menu). All tracks referenced must be in the
+<parameter>tracks</parameter> GList of the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>, however.
 </para>
 <para>
-The Podcasts playlist is just another playlist with some
-internal flags set differently. Also, member tracks in the
-Podcasts playlist are not normally members of the MPL (so on the
-iPod they will only show up under the Podcasts menu). All tracks
-referenced must be in the tracklist of the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>,
-however.
+Each track may have a thumbnail associated with it. You can retrieve a
+<link linkend="GdkPixmap"><type>GdkPixmap</type></link> of the thumbnail using <link linkend="itdb-artwork-get-pixbuf"><function>itdb_artwork_get_pixbuf()</function></link>.  A
+thumbnail can be added with <link linkend="itdb-track-set-thumbnails"><function>itdb_track_set_thumbnails()</function></link>.  A thumbnail
+can be removed with <link linkend="itdb-track-remove-thumbnails"><function>itdb_track_remove_thumbnails()</function></link>.  Please see the
+<link linkend="libgpod-Artwork">Artwork</link> section for more
+details on artwork related functions and structures.
 </para>
+<note>
 <para>
-A number of functions to add/remove playlists, or add/remove
-tracks are available. Please see
-<link linkend="libgpod-Playlists">Playlists</link> for details.
-</para>
-<para>
-Each track can have a thumbnail associated with it. You can
-retrieve a GdkPixmap of the thumbnail using
-<link linkend="itdb-thumb-get-gdk-pixbuf"><function>itdb_thumb_get_gdk_pixbuf()</function></link> (tracks have thumbnails of the
-following types associated: <parameter>ITDB_THUMB_COVER_SMALL</parameter> and
-<parameter>ITDB_THUMB_COVER_LARGE</parameter>).  You can remove a thumbnail with
-<link linkend="itdb-track-remove-thumbnails"><function>itdb_track_remove_thumbnails()</function></link>.  And finally, you can set a
-new thumbnail using <link linkend="itdb-track-set-thumbnails"><function>itdb_track_set_thumbnails()</function></link>.
-</para>
-<para>
-Please note that iTunes additionally stores the artwork as tags
+Be aware that iTunes additionally stores the artwork as tags
 in the original music file. That's also from where the data is
 read when artwork is displayed in iTunes, and there can be more
 than one piece of artwork. libgpod does not store the artwork as
 tags in the original music file. As a consequence, if iTunes
 attempts to access the artwork, it will find none, and remove
 libgpod's artwork. Luckily, iTunes will only attempt to access
-the artwork if you select a track in iTunes. (To work around
+the artwork if you select a track in iTunes.  To work around
 this, gtkpod keeps a list of the original filename of all
 artwork and silently adds the thumbnails if they were 'lost'.
 Your application might want to do something similar, or you can
 supply patches for (optionally!) adding tags to the original music
-files.)
+files.
 </para>
+</note>
 <para>
 The <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>, <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> and <link linkend="Itdb-Track"><type>Itdb_Track</type></link> structures each
-have a userdata and a usertype field that can be used by the
-application to store application-specific additional data. If
-userdata is a pointer to an external structure, you can supply a
-<link linkend="ItdbUserDataDuplicateFunc"><type>ItdbUserDataDuplicateFunc</type></link> and a <link linkend="ItdbUserDataDestroyFunc"><type>ItdbUserDataDestroyFunc</type></link> so that
-this data can be duplicated or freed automatically with a call
-to the library <link linkend="duplicate"><function>_duplicate()</function></link>/<link linkend="free"><function>_free()</function></link> functions.
+have <parameter>userdata</parameter> and <parameter>usertype</parameter> fields that can be used by the
+application to store additional application-specific data. If
+<parameter>userdata</parameter> is a pointer to an external structure, you can supply a
+<link linkend="ItdbUserDataDuplicateFunc"><type>ItdbUserDataDuplicateFunc</type></link> and a <link linkend="ItdbUserDataDestroyFunc"><type>ItdbUserDataDestroyFunc</type></link> so that this
+data can be duplicated or freed automatically with a call to the
+library <link linkend="duplicate"><function>_duplicate()</function></link>/<link linkend="free"><function>_free()</function></link> functions.
 </para>
 </refsect1>
 
@@ -142,8 +134,8 @@
 <indexterm><primary>Itdb_iTunesDB</primary></indexterm><programlisting>typedef struct {
     GList *tracks;
     GList *playlists;
-    gchar *filename;    /* filename of iTunesDB */
-    Itdb_Device *device;/* iPod device info     */
+    gchar *filename;
+    Itdb_Device *device;
     guint32 version;
     guint64 id;
     /* reserved for future use */
@@ -160,33 +152,122 @@
 } Itdb_iTunesDB;
 </programlisting>
 <para>
-
-</para></refsect2>
-<refsect2>
-<title><anchor id="ItdbUserDataDestroyFunc" role="function"/>ItdbUserDataDestroyFunc ()</title>
-<indexterm><primary>ItdbUserDataDestroyFunc</primary></indexterm><programlisting><link linkend="void">void</link>                (*ItdbUserDataDestroyFunc)          (<link linkend="gpointer">gpointer</link> userdata);</programlisting>
+Structure representing an iTunes database</para>
 <para>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>userdata</parameter>&nbsp;:</term>
-<listitem><simpara>
-
-
-</simpara></listitem></varlistentry>
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>tracks</structfield>;</term>
+<listitem><simpara>             A list of tracks in the database (<link linkend="Itdb-Track"><type>Itdb_Track</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>playlists</structfield>;</term>
+<listitem><simpara>          A list of playlists in the database (<link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>filename</structfield>;</term>
+<listitem><simpara>           The filename of the iTunesDB
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-Device">Itdb_Device</link>&nbsp;*<structfield>device</structfield>;</term>
+<listitem><simpara>             iPod device info (<link linkend="Itdb-Device"><type>Itdb_Device</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>version</structfield>;</term>
+<listitem><simpara>            The version number of the iTunesDB
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                 A 64 bit id value for the iTunesDB
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="ItdbUserDataDuplicateFunc" role="function"/>ItdbUserDataDuplicateFunc ()</title>
-<indexterm><primary>ItdbUserDataDuplicateFunc</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            (*ItdbUserDataDuplicateFunc)        (<link linkend="gpointer">gpointer</link> userdata);</programlisting>
+<title><anchor id="ItdbFileError" role="enum"/>enum ItdbFileError</title>
+<indexterm><primary>ItdbFileError</primary></indexterm><programlisting>typedef enum
+{
+    ITDB_FILE_ERROR_SEEK,
+    ITDB_FILE_ERROR_CORRUPT,
+    ITDB_FILE_ERROR_NOTFOUND,
+    ITDB_FILE_ERROR_RENAME,
+    ITDB_FILE_ERROR_ITDB_CORRUPT
+} ItdbFileError;
+</programlisting>
 <para>
+Error codes for iTunesDB file</para>
+<para>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>userdata</parameter>&nbsp;:</term>
-<listitem><simpara>
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
-
-
-</simpara></listitem></varlistentry>
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-SEEK:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_SEEK</literal></term>
+<listitem><simpara>         file corrupt: illegal seek occured
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-CORRUPT:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_CORRUPT</literal></term>
+<listitem><simpara>      file corrupt
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-NOTFOUND:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_NOTFOUND</literal></term>
+<listitem><simpara>     file not found
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-RENAME:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_RENAME</literal></term>
+<listitem><simpara>       file could not be renamed
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_ITDB_CORRUPT</literal></term>
+<listitem><simpara> iTunesDB in memory corrupt
+</simpara></listitem>
+</varlistentry>
 </variablelist></refsect2>
 <refsect2>
 <title><anchor id="itdb-new" role="function"/>itdb_new ()</title>
@@ -223,10 +304,10 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
-<listitem><simpara> mount point of the iPod (eg "/mnt/ipod) in local encoding
+<listitem><simpara>     mount point of the iPod (eg "/mnt/ipod") in local encoding
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> struct holding the tracks and
 the playlists present on the iPod at <parameter>mp</parameter>, NULL if <parameter>mp</parameter> isn't an iPod mount
@@ -248,37 +329,38 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
+<listitem><simpara>   the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
 set accordingly.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-set-mountpoint" role="function"/>itdb_set_mountpoint ()</title>
-<indexterm><primary>itdb_set_mountpoint</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_set_mountpoint                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+<title><anchor id="itdb-set-mountpoint" role="function" condition="since:0.1.3"/>itdb_set_mountpoint ()</title>
+<indexterm role="0.1.3"><primary>itdb_set_mountpoint</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_set_mountpoint                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                                          const <link linkend="gchar">gchar</link> *mp);</programlisting>
 <para>
-Sets the mountpoint of <parameter>db</parameter>. Always use this function to set the mountpoint
-of an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> as it will reset the number of available 
-/iPod_Control/Music/F.. dirs. It doesn't attempt to parse an iPod database
-that may be present on the iPod at <parameter>mp</parameter></para>
+Sets the mountpoint of <parameter>itdb</parameter>. Always use this function to set the
+mountpoint of an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> as it will reset the number of
+available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
+an iPod database that may be present on the iPod at <parameter>mp</parameter>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
-<listitem><simpara> new mount point
+<listitem><simpara>     new mount point
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.1.3
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-mountpoint" role="function"/>itdb_get_mountpoint ()</title>
-<indexterm><primary>itdb_get_mountpoint</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_get_mountpoint                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<title><anchor id="itdb-get-mountpoint" role="function" condition="since:0.4.0"/>itdb_get_mountpoint ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_mountpoint</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_get_mountpoint                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
 <para>
 Retrieve a reference to the mountpoint of <parameter>itdb</parameter></para>
 <para>
@@ -287,10 +369,12 @@
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <parameter>itdb</parameter> mountpoint, this string shouldn't be freed nor 
-modified
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <parameter>itdb</parameter> mountpoint, this string shouldn't be freed
+nor modified
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
 <title><anchor id="itdb-tracks-number" role="function"/>itdb_tracks_number ()</title>
 <indexterm><primary>itdb_tracks_number</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_tracks_number                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
@@ -336,10 +420,38 @@
 playlist)
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
+<refsect2>
+<title><anchor id="ItdbUserDataDestroyFunc" role="function"/>ItdbUserDataDestroyFunc ()</title>
+<indexterm><primary>ItdbUserDataDestroyFunc</primary></indexterm><programlisting><link linkend="void">void</link>                (*ItdbUserDataDestroyFunc)          (<link linkend="gpointer">gpointer</link> userdata);</programlisting>
+<para>
+Function called to free userdata</para>
+<para>
 
+</para><variablelist role="params">
+<varlistentry><term><parameter>userdata</parameter>&nbsp;:</term>
+<listitem><simpara> A <link linkend="gpointer"><type>gpointer</type></link> to user data
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="ItdbUserDataDuplicateFunc" role="function"/>ItdbUserDataDuplicateFunc ()</title>
+<indexterm><primary>ItdbUserDataDuplicateFunc</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            (*ItdbUserDataDuplicateFunc)        (<link linkend="gpointer">gpointer</link> userdata);</programlisting>
+<para>
+Function called to duplicate userdata</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>userdata</parameter>&nbsp;:</term>
+<listitem><simpara> A <link linkend="gpointer"><type>gpointer</type></link> to user data
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="gpointer"><type>gpointer</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
 </refsect1>
 
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -36,11 +36,6 @@
                                                          const <link linkend="gchar">gchar</link> *file);
 <link linkend="gchar">gchar</link>*              <link linkend="itdb-resolve-path">itdb_resolve_path</link>                   (const <link linkend="gchar">gchar</link> *root,
                                                          const <link linkend="gchar">gchar</link> * const *components);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-shuffle-write">itdb_shuffle_write</link>                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
-                                                         <link linkend="GError">GError</link> **error);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-shuffle-write-file">itdb_shuffle_write_file</link>             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
-                                                         const <link linkend="gchar">gchar</link> *filename,
-                                                         <link linkend="GError">GError</link> **error);
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-cp">itdb_cp</link>                             (const <link linkend="gchar">gchar</link> *from_file,
                                                          const <link linkend="gchar">gchar</link> *to_file,
                                                          <link linkend="GError">GError</link> **error);
@@ -57,6 +52,11 @@
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-write-file">itdb_write_file</link>                     (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                                          const <link linkend="gchar">gchar</link> *filename,
                                                          <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-shuffle-write">itdb_shuffle_write</link>                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-shuffle-write-file">itdb_shuffle_write_file</link>             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);
 <link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-duplicate">itdb_duplicate</link>                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
 </synopsis>
 </refsynopsisdiv>
@@ -80,8 +80,8 @@
 <refsect1 role="details">
 <title role="details.title">Details</title>
 <refsect2>
-<title><anchor id="itdb-get-control-dir" role="function"/>itdb_get_control_dir ()</title>
-<indexterm><primary>itdb_get_control_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_control_dir                (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-control-dir" role="function" condition="since:0.4.0"/>itdb_get_control_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_control_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_control_dir                (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Get the i*_Control directory. Observed values are 'iPod_Control'
 for standard iPods and 'iTunes/iTunes_Control' for mobile
@@ -92,13 +92,15 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the control dir or NULL of non-existent. Must
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the control dir or NULL if non-existent. Must
 <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-itunes-dir" role="function"/>itdb_get_itunes_dir ()</title>
-<indexterm><primary>itdb_get_itunes_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunes_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-itunes-dir" role="function" condition="since:0.4.0"/>itdb_get_itunes_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_itunes_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunes_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve the iTunes directory (containing the iTunesDB) by first
 calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'iTunes'</para>
@@ -108,10 +110,12 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunes directory or NULL of non-existent.
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunes directory or NULL if non-existent.
 Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
 <title><anchor id="itdb-get-music-dir" role="function"/>itdb_get_music_dir ()</title>
 <indexterm><primary>itdb_get_music_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_music_dir                  (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
@@ -124,13 +128,13 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Music directory or NULL of
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Music directory or NULL if
 non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-artwork-dir" role="function"/>itdb_get_artwork_dir ()</title>
-<indexterm><primary>itdb_get_artwork_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_artwork_dir                (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-artwork-dir" role="function" condition="since:0.4.0"/>itdb_get_artwork_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_artwork_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_artwork_dir                (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve the Artwork directory (containing the ArtworDB) by
 first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Artwork'</para>
@@ -140,13 +144,15 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL of
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL if
 non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-device-dir" role="function"/>itdb_get_device_dir ()</title>
-<indexterm><primary>itdb_get_device_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_device_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-device-dir" role="function" condition="since:0.4.0"/>itdb_get_device_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_device_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_device_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve the Device directory (containing the SysInfo file) by
 first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Device'</para>
@@ -156,13 +162,15 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Device directory or NULL of
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Device directory or NULL if
 non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-photos-dir" role="function"/>itdb_get_photos_dir ()</title>
-<indexterm><primary>itdb_get_photos_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photos_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-photos-dir" role="function" condition="since:0.4.0"/>itdb_get_photos_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_photos_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photos_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve the Photo directory by
 first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Photos'</para>
@@ -172,13 +180,15 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> mountpoint of iPod
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL of
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL if
 non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-itunesdb-path" role="function"/>itdb_get_itunesdb_path ()</title>
-<indexterm><primary>itdb_get_itunesdb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunesdb_path              (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-itunesdb-path" role="function" condition="since:0.4.0"/>itdb_get_itunesdb_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_itunesdb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunesdb_path              (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve a path to the iTunesDB</para>
 <para>
@@ -189,11 +199,13 @@
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunesDB or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
 after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-itunessd-path" role="function"/>itdb_get_itunessd_path ()</title>
-<indexterm><primary>itdb_get_itunessd_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunessd_path              (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-itunessd-path" role="function" condition="since:0.4.0"/>itdb_get_itunessd_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_itunessd_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunessd_path              (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve a path to the iTunesSD</para>
 <para>
@@ -204,11 +216,13 @@
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunesSD or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
 after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-artworkdb-path" role="function"/>itdb_get_artworkdb_path ()</title>
-<indexterm><primary>itdb_get_artworkdb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_artworkdb_path             (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-artworkdb-path" role="function" condition="since:0.4.0"/>itdb_get_artworkdb_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_artworkdb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_artworkdb_path             (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve a path to the ArtworkDB</para>
 <para>
@@ -217,13 +231,15 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the ArtworkDB or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link> 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the ArtworkDB or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
 after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-photodb-path" role="function"/>itdb_get_photodb_path ()</title>
-<indexterm><primary>itdb_get_photodb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photodb_path               (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-photodb-path" role="function" condition="since:0.4.0"/>itdb_get_photodb_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_photodb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photodb_path               (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve a path to the Photo DB</para>
 <para>
@@ -234,11 +250,13 @@
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the PhotoDB or NULL if non-existent. Must
 <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-photos-thumb-dir" role="function"/>itdb_get_photos_thumb_dir ()</title>
-<indexterm><primary>itdb_get_photos_thumb_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photos_thumb_dir           (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-get-photos-thumb-dir" role="function" condition="since:0.4.0"/>itdb_get_photos_thumb_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_photos_thumb_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photos_thumb_dir           (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
 Retrieve the Photo Thumbnail directory by
 first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Photos/Thumbs'</para>
@@ -248,13 +266,15 @@
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> the iPod mountpoint
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL of
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL if
 non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-get-path" role="function"/>itdb_get_path ()</title>
-<indexterm><primary>itdb_get_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_path                       (const <link linkend="gchar">gchar</link> *dir,
+<title><anchor id="itdb-get-path" role="function" condition="since:0.4.0"/>itdb_get_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_path                       (const <link linkend="gchar">gchar</link> *dir,
                                                          const <link linkend="gchar">gchar</link> *file);</programlisting>
 <para>
 Retrieve a path to the <parameter>file</parameter> in <parameter>dir</parameter></para>
@@ -262,15 +282,17 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>dir</parameter>&nbsp;:</term>
-<listitem><simpara> a directory
+<listitem><simpara>    a directory
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>file</parameter>&nbsp;:</term>
-<listitem><simpara> a file
+<listitem><simpara>   a file
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the <parameter>file</parameter> or NULL if non-existent. Must be <link linkend="g-free"><function>g_free()</function></link>'d 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the <parameter>file</parameter> or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
 after use.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
 <title><anchor id="itdb-resolve-path" role="function"/>itdb_resolve_path ()</title>
 <indexterm><primary>itdb_resolve_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_resolve_path                   (const <link linkend="gchar">gchar</link> *root,
@@ -279,8 +301,8 @@
 Resolve the path to a track on the iPod
 </para>
 <para>
-We start by assuming that the ipod mount point exists.  Then, for
-each component c of track-&gt;ipod_path, we try to find an entry d in
+We start by assuming that the iPod mount point exists.  Then, for
+each component c of <parameter>track->ipod_path</parameter>, we try to find an entry d in
 good_path that is case-insensitively equal to c.  If we find d, we
 append d to good_path and make the result the new good_path.
 Otherwise, we quit and return NULL.</para>
@@ -297,162 +319,129 @@
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-shuffle-write" role="function"/>itdb_shuffle_write ()</title>
-<indexterm><primary>itdb_shuffle_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_shuffle_write                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
-                                                         <link linkend="GError">GError</link> **error);</programlisting>
-<para>
-Write out an iTunesSD for the Shuffle.
-First reassigns unique IDs to all tracks.
-An existing "Play Counts" file is renamed to "Play Counts.bak" if
-the export was successful.
-An existing "OTGPlaylistInfo" file is removed if the export was
-successful.
-<parameter>itdb->mountpoint</parameter> must point to the mount point of the iPod,
-e.g. "/mnt/ipod" and be in local encoding.</para>
-<para>
-
-</para><variablelist role="params">
-<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
-set accordingly.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-shuffle-write-file" role="function"/>itdb_shuffle_write_file ()</title>
-<indexterm><primary>itdb_shuffle_write_file</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_shuffle_write_file             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
-                                                         const <link linkend="gchar">gchar</link> *filename,
-                                                         <link linkend="GError">GError</link> **error);</programlisting>
-<para>
-Do the actual writing to the iTunesSD</para>
-<para>
-
-</para><variablelist role="params">
-<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> file to write to, cannot be NULL
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
-set accordingly.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
 <title><anchor id="itdb-cp" role="function"/>itdb_cp ()</title>
 <indexterm><primary>itdb_cp</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_cp                             (const <link linkend="gchar">gchar</link> *from_file,
                                                          const <link linkend="gchar">gchar</link> *to_file,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
-Copy file "from_file" to "to_file".</para>
+Copy file <parameter>from_file</parameter> to <parameter>to_file</parameter>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>from_file</parameter>&nbsp;:</term>
-<listitem><simpara> source file
+<listitem><simpara>  source file
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>to_file</parameter>&nbsp;:</term>
-<listitem><simpara> destination file
+<listitem><simpara>    destination file
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
 set accordingly.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-cp-get-dest-filename" role="function"/>itdb_cp_get_dest_filename ()</title>
-<indexterm><primary>itdb_cp_get_dest_filename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_cp_get_dest_filename           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+<title><anchor id="itdb-cp-get-dest-filename" role="function" condition="since:0.5.0"/>itdb_cp_get_dest_filename ()</title>
+<indexterm role="0.5.0"><primary>itdb_cp_get_dest_filename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_cp_get_dest_filename           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          const <link linkend="gchar">gchar</link> *mountpoint,
                                                          const <link linkend="gchar">gchar</link> *filename,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
-Creates a valid filename on the iPod where to copy <parameter>filename</parameter>.
+Creates a valid filename on the iPod where <parameter>filename</parameter> can be copied.
 </para>
 <para>
-You must either provide <parameter>track</parameter> or <parameter>mountpoint</parameter>. Providing <parameter>track</parameter> is
+You must provide either <parameter>track</parameter> or <parameter>mountpoint</parameter>. Providing <parameter>track</parameter> is
 not thread-safe (accesses track->itdb->device and may even write to
 track->itdb->device). Providing <parameter>mountpoint</parameter> is thread-safe but
 slightly slower because the number of music directories is counted
 each time the function is called.
 </para>
 <para>
-You can use #<link linkend="itdb-cp"><function>itdb_cp()</function></link> to copy the track to the iPod or implement
+You can use <link linkend="itdb-cp"><function>itdb_cp()</function></link> to copy the track to the iPod or implement
 your own copy function. After the file was copied you have to call
-#<link linkend="itdb-cp-finalize"><function>itdb_cp_finalize()</function></link> to obtain relevant update information for
+<link linkend="itdb-cp-finalize"><function>itdb_cp_finalize()</function></link> to obtain relevant update information for
 <link linkend="Itdb-Track"><type>Itdb_Track</type></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> track to transfer or NULL
+<listitem><simpara>      track to transfer or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
 <listitem><simpara> mountpoint of your iPod or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> the source file
+<listitem><simpara>   the source file
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a valid filename on the iPod to where <parameter>filename</parameter> can
-be copied or NULL in case of an error. In that case <parameter>error</parameter> is set
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a valid filename on the iPod where <parameter>filename</parameter> can be
+copied or NULL in case of an error. In that case <parameter>error</parameter> is set
 accordingly. You must free the filename when it is no longer
 needed.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-cp-finalize" role="function"/>itdb_cp_finalize ()</title>
-<indexterm><primary>itdb_cp_finalize</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_cp_finalize                    (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+<title><anchor id="itdb-cp-finalize" role="function" condition="since:0.5.0"/>itdb_cp_finalize ()</title>
+<indexterm role="0.5.0"><primary>itdb_cp_finalize</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_cp_finalize                    (<link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          const <link linkend="gchar">gchar</link> *mountpoint,
                                                          const <link linkend="gchar">gchar</link> *dest_filename,
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
-Updates information in <parameter>track</parameter> necessary for the iPod. You must
-either supply <parameter>track</parameter> or <parameter>mountpoint</parameter>. If <parameter>track</parameter> == NULL, a new track
-structure is created that must be freed with #<link linkend="itdb-track-free"><function>itdb_track_free()</function></link>
-when it is no longer needed.
+Updates information in <parameter>track</parameter> necessary for the iPod.
 </para>
 <para>
-The following fields are updated:
+You must supply either <parameter>track</parameter> or <parameter>mountpoint</parameter>. If <parameter>track</parameter> == NULL, a
+new track structure is created that must be freed with
+<link linkend="itdb-track-free"><function>itdb_track_free()</function></link> when it is no longer needed.
 </para>
 <para>
-- ipod_path
-- filetype_marker
-- transferred
-- size</para>
+The following <parameter>track</parameter> fields are updated:
+</para>
 <para>
+<itemizedlist>
+  <listitem>
+      ipod_path
+  </listitem>
+  <listitem>
+      filetype_marker
+  </listitem>
+  <listitem>
+      transferred
+  </listitem>
+  <listitem>
+      size
+  </listitem>
+</itemizedlist></para>
+<para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> track to update or NULL
+<listitem><simpara>          track to update or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
-<listitem><simpara> mountpoint of your iPod or NULL
+<listitem><simpara>     mountpoint of your iPod or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>dest_filename</parameter>&nbsp;:</term>
-<listitem><simpara> the name of the file on the iPod copied to
+<listitem><simpara>  the name of the file on the iPod copied to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>          return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> on success a pointer to the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> item passed
 or a new <link linkend="Itdb-Track"><type>Itdb_Track</type></link> item if <parameter>track</parameter> was NULL. In the latter case
-you must free the memory using #<link linkend="itdb-track-free"><function>itdb_track_free()</function></link> when the item is
+you must free the memory using <link linkend="itdb-track-free"><function>itdb_track_free()</function></link> when the item is
 no longer used. If an error occurs NULL is returned and <parameter>error</parameter> is
 set accordingly. Errors occur when <parameter>dest_filename</parameter> cannot be
 accessed or the mountpoint is not set.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
 <refsect2>
 <title><anchor id="itdb-parse-file" role="function"/>itdb_parse_file ()</title>
 <indexterm><primary>itdb_parse_file</primary></indexterm><programlisting><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      itdb_parse_file                     (const <link linkend="gchar">gchar</link> *filename,
@@ -463,10 +452,10 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> path to a file in iTunesDB format
+<listitem><simpara>   path to a file in iTunesDB format
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> struct holding the tracks and
 the playlists present in <parameter>filename</parameter>, NULL if <parameter>filename</parameter> isn't a parsable 
@@ -481,23 +470,72 @@
                                                          <link linkend="GError">GError</link> **error);</programlisting>
 <para>
 Write the content of <parameter>itdb</parameter> to <parameter>filename</parameter>. If <parameter>filename</parameter> is NULL, it attempts
-to write to itdb-&gt;filename.</para>
+to write to <parameter>itdb->filename</parameter>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to save
+<listitem><simpara>       the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to save
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> filename to save <parameter>itdb</parameter> to
+<listitem><simpara>   filename to save <parameter>itdb</parameter> to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went well, FALSE otherwise
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
+<title><anchor id="itdb-shuffle-write" role="function"/>itdb_shuffle_write ()</title>
+<indexterm><primary>itdb_shuffle_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_shuffle_write                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Write out an iTunesSD for the Shuffle.
+</para>
+<para>
+First reassigns unique IDs to all tracks.  An existing "Play
+Counts" file is renamed to "Play Counts.bak" if the export was
+successful.  An existing "OTGPlaylistInfo" file is removed if the
+export was successful.  <parameter>itdb->mountpoint</parameter> must point to the mount
+point of the iPod, e.g. "/mnt/ipod" and be in local encoding.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-shuffle-write-file" role="function"/>itdb_shuffle_write_file ()</title>
+<indexterm><primary>itdb_shuffle_write_file</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_shuffle_write_file             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Do the actual writing to the iTunesSD</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>       the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   file to write to, cannot be NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
 <title><anchor id="itdb-duplicate" role="function"/>itdb_duplicate ()</title>
 <indexterm><primary>itdb_duplicate</primary></indexterm><programlisting><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      itdb_duplicate                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
 <para>
@@ -518,4 +556,6 @@
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/itunesdb-time.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-time.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/itunesdb-time.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -10,7 +10,8 @@
 
 <refnamediv>
 <refname>Time handling</refname>
-<refpurpose>Helper functions to convert between Epoch time and Mac (iPod) time</refpurpose>
+<refpurpose>[DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</refpurpose>
 <!--[<xref linkend="desc" endterm="desc.title"/>]-->
 </refnamediv>
 
@@ -38,11 +39,14 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-The functions provide conversion between Epoch time and Mac (iPod) time. These 
-functions are now obsolete and should no longer be used, libgpod automatically
-converts to/from Epoch time and iPod time when writing/reading the iPod 
-databases
+The functions provide conversion between Epoch time and Mac (iPod)
+time.
 </para>
+<note>
+These functions are now obsolete and should no longer be used, libgpod
+automatically converts to/from Epoch time and iPod time when
+writing/reading the iPod databases.
+</note>
 </refsect1>
 
 <refsect1 role="details">
@@ -50,7 +54,7 @@
 <refsect2>
 <title><anchor id="itdb-time-get-mac-time" role="function" condition="deprecated"/>itdb_time_get_mac_time ()</title>
 <indexterm role="deprecated"><primary>itdb_time_get_mac_time</primary></indexterm><programlisting><link linkend="time-t">time_t</link>              itdb_time_get_mac_time              (void);</programlisting>
-<warning><para><literal>itdb_time_get_mac_time</literal> is deprecated and should not be used in newly-written code. kept for compatibility with older code, directly use 
+<warning><para><literal>itdb_time_get_mac_time</literal> is deprecated and should not be used in newly-written code. kept for compatibility with older code, directly use
 <link linkend="g-get-current-time"><function>g_get_current_time()</function></link> or time(NULL) instead</para></warning>
 <para>
 Gets the current time in a format appropriate for storing in the libgpod
@@ -102,4 +106,6 @@
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/photodb.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/photodb.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/photodb.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -21,8 +21,13 @@
 
 
 
-                    <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>;
                     <link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>;
+<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       <link linkend="itdb-photodb-create">itdb_photodb_create</link>                 (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="void">void</link>                <link linkend="itdb-photodb-free">itdb_photodb_free</link>                   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb);
+<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       <link linkend="itdb-photodb-parse">itdb_photodb_parse</link>                  (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-photodb-write">itdb_photodb_write</link>                  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb,
+                                                         <link linkend="GError">GError</link> **error);
 <link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-photodb-add-photo">itdb_photodb_add_photo</link>              (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          const <link linkend="gchar">gchar</link> *filename,
                                                          <link linkend="gint">gint</link> position,
@@ -39,27 +44,22 @@
                                                          <link linkend="gint">gint</link> position,
                                                          <link linkend="gint">gint</link> rotation,
                                                          <link linkend="GError">GError</link> **error);
-<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       <link linkend="itdb-photodb-create">itdb_photodb_create</link>                 (const <link linkend="gchar">gchar</link> *mountpoint);
-<link linkend="void">void</link>                <link linkend="itdb-photodb-free">itdb_photodb_free</link>                   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb);
-<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       <link linkend="itdb-photodb-parse">itdb_photodb_parse</link>                  (const <link linkend="gchar">gchar</link> *mp,
-                                                         <link linkend="GError">GError</link> **error);
+<link linkend="void">void</link>                <link linkend="itdb-photodb-remove-photo">itdb_photodb_remove_photo</link>           (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo);
+                    <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>;
+<link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    <link linkend="itdb-photodb-photoalbum-create">itdb_photodb_photoalbum_create</link>      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *albumname,
+                                                         <link linkend="gint">gint</link> pos);
 <link linkend="void">void</link>                <link linkend="itdb-photodb-photoalbum-add-photo">itdb_photodb_photoalbum_add_photo</link>   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
                                                          <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo,
                                                          <link linkend="gint">gint</link> position);
 <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    <link linkend="itdb-photodb-photoalbum-by-name">itdb_photodb_photoalbum_by_name</link>     (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          const <link linkend="gchar">gchar</link> *albumname);
-<link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    <link linkend="itdb-photodb-photoalbum-create">itdb_photodb_photoalbum_create</link>      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
-                                                         const <link linkend="gchar">gchar</link> *albumname,
-                                                         <link linkend="gint">gint</link> pos);
 <link linkend="void">void</link>                <link linkend="itdb-photodb-photoalbum-remove">itdb_photodb_photoalbum_remove</link>      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
                                                          <link linkend="gboolean">gboolean</link> remove_pics);
-<link linkend="void">void</link>                <link linkend="itdb-photodb-remove-photo">itdb_photodb_remove_photo</link>           (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
-                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
-                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo);
-<link linkend="gboolean">gboolean</link>            <link linkend="itdb-photodb-write">itdb_photodb_write</link>                  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb,
-                                                         <link linkend="GError">GError</link> **error);
 </synopsis>
 </refsynopsisdiv>
 
@@ -128,19 +128,20 @@
 <para>
 If you cannot add photos because your iPod is not recognized,
 you may have to set the iPod model by calling
+<link linkend="itdb-device-set-sysinfo"><function>itdb_device_set_sysinfo()</function></link>, e.g. for an 80 GB 6th generation
+iPod Video, you would use:
 </para>
+<programlisting>
+itdb_device_set_sysinfo (db->device, "ModelNumStr", "MA450");
+</programlisting>
 <para>
-itdb_device_set_sysinfo (db->device, "ModelNumStr", model);
-</para>
-<para>
-For example, "MA450" would stand for an 80 GB 6th generation iPod Video. See
-<ulink type="http"
+See <ulink type="http"
 url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c">itdb_device.c</ulink>
 for a list of supported models.
 </para>
 <para>
-This information will be written to the iPod when the PhotoDB is
-saved (<link linkend="itdb-device-write-sysinfo"><function>itdb_device_write_sysinfo()</function></link> is called).
+The model number will be saved on the iPod when the PhotoDB is
+written (<link linkend="itdb-photodb-write"><function>itdb_photodb_write()</function></link> calls <link linkend="itdb-device-write-sysinfo"><function>itdb_device_write_sysinfo()</function></link>).
 </para>
 <para>
 Have a look at the <ulink type="http"
@@ -154,34 +155,11 @@
 <refsect1 role="details">
 <title role="details.title">Details</title>
 <refsect2>
-<title><anchor id="Itdb-PhotoAlbum" role="struct"/>Itdb_PhotoAlbum</title>
-<indexterm><primary>Itdb_PhotoAlbum</primary></indexterm><programlisting>typedef struct {
-    gchar *name;                 /* name of photoalbum in UTF8            */
-    GList *members;              /* photos in album (Itdb_Artwork *)      */
-    guint8 album_type;           /* 0x01 for master (Photo Library),
-				    0x02 otherwise (sometimes 4 and 5)    */
-    guint8 playmusic;            /* play music during slideshow (from
-				    iPhoto setting)                       */
-    guint8 repeat;               /* repeat the slideshow (from iPhoto
-				    setting)                              */
-    guint8 random;               /* show the slides in random order
-			            (from iPhoto setting)                 */
-    guint8 show_titles;          /* show slide captions (from iPhoto
-				    setting)                              */
-    guint8 transition_direction; /* 0=none, 1=left-to-right,
-				    2=right-to-left, 3=top-to-bottom,
-				    4=bottom-to-top (from iPhoto setting) */
-    gint32 slide_duration;       /* in seconds (from iPhoto setting)      */
-    gint32 transition_duration;  /* in milliseconds (from iPhoto setting) */
-    gint64 song_id;              /* dbid2 of track in iTunesDB to play
-				    during slideshow (from iPhoto setting)*/
-    gint32 unk024;               /* unknown, seems to be always 0         */
-    gint16 unk028;               /* unknown, seems to be always 0         */
-    gint32 unk044;               /* unknown, seems to always be 0         */
-    gint32 unk048;               /* unknown, seems to always be 0         */
-    /* set automatically at time of writing the PhotoDB */
-    gint32  album_id;
-    gint32  prev_album_id;
+<title><anchor id="Itdb-PhotoDB" role="struct" condition="since:0.4.0"/>Itdb_PhotoDB</title>
+<indexterm role="0.4.0"><primary>Itdb_PhotoDB</primary></indexterm><programlisting>typedef struct {
+    GList *photos;
+    GList *photoalbums;
+    Itdb_Device *device;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -193,36 +171,149 @@
     /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
     ItdbUserDataDestroyFunc userdata_destroy;
-} Itdb_PhotoAlbum;
+} Itdb_PhotoDB;
 </programlisting>
 <para>
+Structure representing an iTunes Photo database</para>
+<para>
 
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>photos</structfield>;</term>
+<listitem><simpara>             A list of photos in the database (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>photoalbums</structfield>;</term>
+<listitem><simpara>        A list of albums in the database (<link linkend="Itdb-PhotoAlbum"><type>Itdb_PhotoAlbum</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-Device">Itdb_Device</link>&nbsp;*<structfield>device</structfield>;</term>
+<listitem><simpara>             iPod device info (<link linkend="Itdb-Device"><type>Itdb_Device</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="Itdb-PhotoDB" role="struct"/>Itdb_PhotoDB</title>
-<indexterm><primary>Itdb_PhotoDB</primary></indexterm><programlisting>typedef struct {
-    GList *photos;      /* (Itdb_Artwork *)     */
-    GList *photoalbums; /* (Itdb_PhotoAlbum *)  */
-    Itdb_Device *device;/* iPod device info     */
-    /* reserved for future use */
-    gint32 reserved_int1;
-    gint32 reserved_int2;
-    gpointer reserved1;
-    gpointer reserved2;
-    /* below is for use by application */
-    guint64 usertype;
-    gpointer userdata;
-    /* functions called to duplicate/free userdata */
-    ItdbUserDataDuplicateFunc userdata_duplicate;
-    ItdbUserDataDestroyFunc userdata_destroy;
-} Itdb_PhotoDB;
-</programlisting>
+<title><anchor id="itdb-photodb-create" role="function" condition="since:0.4.2"/>itdb_photodb_create ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_create</primary></indexterm><programlisting><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       itdb_photodb_create                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
 <para>
+Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
+set it manually later by calling <link linkend="itdb-device-set-mountpoint"><function>itdb_device_set_mountpoint()</function></link>.</para>
+<para>
 
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> mountpoint or NULL.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly created Itdb_PhotoDB to be freed with
+<link linkend="itdb-photodb-free"><function>itdb_photodb_free()</function></link> when it's no longer needed. The Photo Library
+Album is created automatically.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
 </para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-add-photo" role="function"/>itdb_photodb_add_photo ()</title>
-<indexterm><primary>itdb_photodb_add_photo</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo              (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+<title><anchor id="itdb-photodb-free" role="function" condition="since:0.4.0"/>itdb_photodb_free ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_free                   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb);</programlisting>
+<para>
+Free the memory taken by <parameter>photodb</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>photodb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-parse" role="function" condition="since:0.4.0"/>itdb_photodb_parse ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_parse</primary></indexterm><programlisting><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       itdb_photodb_parse                  (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Parses the photo database of an iPod mounted at <parameter>mp</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
+<listitem><simpara>     mountpoint of the iPod
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  will contain the error description when an error occured.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the imported PhotoDB or NULL in case of an error.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-write" role="function" condition="since:0.4.0"/>itdb_photodb_write ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_photodb_write                  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Write out a PhotoDB.
+</para>
+<para>
+FIXME: error is not set yet.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>photodb</parameter>&nbsp;:</term>
+<listitem><simpara>    the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-add-photo" role="function" condition="since:0.4.0"/>itdb_photodb_add_photo ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_add_photo</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo              (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          const <link linkend="gchar">gchar</link> *filename,
                                                          <link linkend="gint">gint</link> position,
                                                          <link linkend="gint">gint</link> rotation,
@@ -234,34 +325,36 @@
 </para>
 <para>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</para>
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to.
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
-<listitem><simpara> file with the photo to add.
+<listitem><simpara>   path of the photo to add.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>position</parameter>&nbsp;:</term>
-<listitem><simpara> position where to insert the new photo (-1 to append at
-the end)
+<listitem><simpara>   position where to insert the new photo (-1 to append
+             at the end)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
-<listitem><simpara> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the added photo.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-add-photo-from-data" role="function"/>itdb_photodb_add_photo_from_data ()</title>
-<indexterm><primary>itdb_photodb_add_photo_from_data</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo_from_data    (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+<title><anchor id="itdb-photodb-add-photo-from-data" role="function" condition="since:0.4.0"/>itdb_photodb_add_photo_from_data ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_add_photo_from_data</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo_from_data    (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          const <link linkend="guchar">guchar</link> *image_data,
                                                          <link linkend="gsize">gsize</link> image_data_len,
                                                          <link linkend="gint">gint</link> position,
@@ -274,38 +367,40 @@
 </para>
 <para>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</para>
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to.
+<listitem><simpara>             the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>image_data</parameter>&nbsp;:</term>
-<listitem><simpara> chunk of memory containing the image data (for example
-a jpg file)
+<listitem><simpara>     chunk of memory containing the image data (for
+                 example a jpg file)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>image_data_len</parameter>&nbsp;:</term>
 <listitem><simpara> length of above chunk of memory
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>position</parameter>&nbsp;:</term>
-<listitem><simpara> position where to insert the new photo (-1 to append at
-the end)
+<listitem><simpara>       position where to insert the new photo (-1 to
+                 append at the end)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
-<listitem><simpara> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<listitem><simpara>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>          return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the added photo.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-add-photo-from-pixbuf" role="function"/>itdb_photodb_add_photo_from_pixbuf ()</title>
-<indexterm><primary>itdb_photodb_add_photo_from_pixbuf</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo_from_pixbuf  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+<title><anchor id="itdb-photodb-add-photo-from-pixbuf" role="function" condition="since:0.5.0"/>itdb_photodb_add_photo_from_pixbuf ()</title>
+<indexterm role="0.5.0"><primary>itdb_photodb_add_photo_from_pixbuf</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo_from_pixbuf  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          <link linkend="gpointer">gpointer</link> pixbuf,
                                                          <link linkend="gint">gint</link> position,
                                                          <link linkend="gint">gint</link> rotation,
@@ -317,81 +412,270 @@
 </para>
 <para>
 For the rotation angle you can also use the gdk constants
-GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
-..._CLOCKWISE.</para>
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to.
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
-<listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to use as the image data
+<listitem><simpara>     a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to use as the image data
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>position</parameter>&nbsp;:</term>
-<listitem><simpara> position where to insert the new photo (-1 to append at
-the end)
+<listitem><simpara>   position where to insert the new photo (-1 to append
+             at the end)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
-<listitem><simpara> angle by which the image should be rotated
-counterclockwise. Valid values are 0, 90, 180 and 270.
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the added photo.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-create" role="function"/>itdb_photodb_create ()</title>
-<indexterm><primary>itdb_photodb_create</primary></indexterm><programlisting><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       itdb_photodb_create                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<title><anchor id="itdb-photodb-remove-photo" role="function" condition="since:0.4.0"/>itdb_photodb_remove_photo ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_remove_photo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_remove_photo           (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo);</programlisting>
 <para>
-Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
-set it manually later by calling <link linkend="itdb-device-set-mountpoint"><function>itdb_device_set_mountpoint()</function></link>.</para>
+Removes a photo. If <parameter>album</parameter> is not the first photoalbum, the photo
+will be removed from that album only. If <parameter>album</parameter> is NULL or the
+first photoalbum (Photo Library), the photo will be removed from
+all albums and the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link>.
+</para>
 <para>
+<note>
+<parameter>photo</parameter> will be freed and can no longer be used if removed from the
+first photoalbum.
+</note></para>
+<para>
 
 </para><variablelist role="params">
-<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
-<listitem><simpara> mountpoint or NULL.
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>     the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to remove the photo from
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly created Itdb_PhotoDB to be freed with
-<link linkend="itdb-photodb-free"><function>itdb_photodb_free()</function></link> when it's no longer needed. The Photo Library
-Album is created automatically.
+<varlistentry><term><parameter>album</parameter>&nbsp;:</term>
+<listitem><simpara>  the album to remove the photo from. If album is NULL, then
+         it will first be removed from all photoalbums and then
+         from the photo database as well.
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+<varlistentry><term><parameter>photo</parameter>&nbsp;:</term>
+<listitem><simpara>  <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> (photo) to remove.
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-free" role="function"/>itdb_photodb_free ()</title>
-<indexterm><primary>itdb_photodb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_free                   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb);</programlisting>
+<title><anchor id="Itdb-PhotoAlbum" role="struct" condition="since:0.4.0"/>Itdb_PhotoAlbum</title>
+<indexterm role="0.4.0"><primary>Itdb_PhotoAlbum</primary></indexterm><programlisting>typedef struct {
+    Itdb_PhotoDB *photodb;
+    gchar *name;
+    GList *members;
+    guint8 album_type;
+    guint8 playmusic;
+    guint8 repeat;
+    guint8 random;
+    guint8 show_titles;
+    guint8 transition_direction;
+    gint32 slide_duration;
+    gint32 transition_duration;
+    gint64 song_id;
+    gint32 unk024;
+    gint16 unk028;
+    gint32 unk044;
+    gint32 unk048;
+    /* set automatically at time of writing the PhotoDB */
+    gint32  album_id;
+    gint32  prev_album_id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_PhotoAlbum;
+</programlisting>
 <para>
-Free the memory taken by <parameter>photodb</parameter>.</para>
+Structure representing an iTunes Photo Album</para>
 <para>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>photodb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link>
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>&nbsp;*<structfield>photodb</structfield>;</term>
+<listitem><simpara>              A pointer to the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> (for convenience)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>name</structfield>;</term>
+<listitem><simpara>                 The name of photoalbum in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>members</structfield>;</term>
+<listitem><simpara>              A list of photos in album (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>album_type</structfield>;</term>
+<listitem><simpara>           The album type.  0x01 for master (Photo Library),
+                       0x02 for a normal album.  (4 and 5 have also been
+                       seen.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>playmusic</structfield>;</term>
+<listitem><simpara>            Play music during slideshow
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>repeat</structfield>;</term>
+<listitem><simpara>               Repeat the slideshow
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>random</structfield>;</term>
+<listitem><simpara>               Show slides in random order
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>show_titles</structfield>;</term>
+<listitem><simpara>          Show slide captions
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>transition_direction</structfield>;</term>
+<listitem><simpara> Transition direction.  0=none, 1=left-to-right,
+                       2=right-to-left, 3=top-to-bottom, 4=bottom-to-top
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>slide_duration</structfield>;</term>
+<listitem><simpara>       Slide duration in seconds
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>transition_duration</structfield>;</term>
+<listitem><simpara>  Transition duration, in milliseconds
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint64">gint64</link>&nbsp;<structfield>song_id</structfield>;</term>
+<listitem><simpara>              The <parameter>dbid2</parameter> of a track to play during slideshow
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk024</structfield>;</term>
+<listitem><simpara>               Unknown, seems to be always 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint16">gint16</link>&nbsp;<structfield>unk028</structfield>;</term>
+<listitem><simpara>               Unknown, seems to be always 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk044</structfield>;</term>
+<listitem><simpara>               Unknown, seems to always be 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk048</structfield>;</term>
+<listitem><simpara>               Unknown, seems to always be 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>album_id</structfield>;</term>
+<listitem><simpara>             The id of the album.  This is set automatically when
+                       the PhotoDB is written.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>prev_album_id</structfield>;</term>
+<listitem><simpara>        The id of the previous playlist.  This is set
+                       automatically when the PhotoDB is written.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>        Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>        Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>            Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>            Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>             For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>             For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara>   A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>     A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-parse" role="function"/>itdb_photodb_parse ()</title>
-<indexterm><primary>itdb_photodb_parse</primary></indexterm><programlisting><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       itdb_photodb_parse                  (const <link linkend="gchar">gchar</link> *mp,
-                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<title><anchor id="itdb-photodb-photoalbum-create" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_create ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_create</primary></indexterm><programlisting><link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    itdb_photodb_photoalbum_create      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *albumname,
+                                                         <link linkend="gint">gint</link> pos);</programlisting>
 <para>
-Parses the photo database of an iPod mounted at <parameter>mp</parameter>.</para>
+Create and add a new photoalbum.</para>
 <para>
 
 </para><variablelist role="params">
-<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
-<listitem><simpara> mountpoint of the iPod
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>         The database to create a new album in
 </simpara></listitem></varlistentry>
-<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> will contain the error description when an error occured.
+<varlistentry><term><parameter>albumname</parameter>&nbsp;:</term>
+<listitem><simpara>  the name of the new album
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the imported PhotoDB or NULL in case of an error.
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>        position where to insert the newly created album (-1
+             to append at the end).
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the album which was created and added.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-photoalbum-add-photo" role="function"/>itdb_photodb_photoalbum_add_photo ()</title>
-<indexterm><primary>itdb_photodb_photoalbum_add_photo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_photoalbum_add_photo   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+<title><anchor id="itdb-photodb-photoalbum-add-photo" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_add_photo ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_add_photo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_photoalbum_add_photo   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
                                                          <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo,
                                                          <link linkend="gint">gint</link> position);</programlisting>
@@ -405,22 +689,24 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to act on
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to act on
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>album</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoAlbum"><type>Itdb_PhotoAlbum</type></link> to add the photo to
+<listitem><simpara>      the <link linkend="Itdb-PhotoAlbum"><type>Itdb_PhotoAlbum</type></link> to add the photo to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>photo</parameter>&nbsp;:</term>
-<listitem><simpara> a pointer to the photo (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>) to add to the album
+<listitem><simpara>      a pointer to the photo (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>) to add to the
+             album
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>position</parameter>&nbsp;:</term>
-<listitem><simpara> position where to insert the new photo (-1 to append at
-the end)
+<listitem><simpara>   position where to insert the new photo (-1 to append
+             at the end)
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-photoalbum-by-name" role="function"/>itdb_photodb_photoalbum_by_name ()</title>
-<indexterm><primary>itdb_photodb_photoalbum_by_name</primary></indexterm><programlisting><link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    itdb_photodb_photoalbum_by_name     (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+<title><anchor id="itdb-photodb-photoalbum-by-name" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_by_name ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_by_name</primary></indexterm><programlisting><link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    itdb_photodb_photoalbum_by_name     (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          const <link linkend="gchar">gchar</link> *albumname);</programlisting>
 <para>
 Find the first photoalbum with a given name or the Photo Library
@@ -429,120 +715,53 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to retrieve the album from
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to retrieve the album from
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>albumname</parameter>&nbsp;:</term>
-<listitem><simpara> the name of the photoalbum to get or NULL for the
-master photoalbum.
+<listitem><simpara>  the name of the photoalbum to get or NULL for the
+             master photoalbum.
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the first photoalbum named <parameter>albumname</parameter>,
 else NULL
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-photodb-photoalbum-create" role="function"/>itdb_photodb_photoalbum_create ()</title>
-<indexterm><primary>itdb_photodb_photoalbum_create</primary></indexterm><programlisting><link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    itdb_photodb_photoalbum_create      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
-                                                         const <link linkend="gchar">gchar</link> *albumname,
-                                                         <link linkend="gint">gint</link> pos);</programlisting>
-<para>
-Create and add a new photoalbum.</para>
-<para>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> The database to create a new album in
 </simpara></listitem></varlistentry>
-<varlistentry><term><parameter>albumname</parameter>&nbsp;:</term>
-<listitem><simpara> the name of the new album
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> position where to insert the newly created album (-1 for
-append to end).
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the album which was created and added.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-photodb-photoalbum-remove" role="function"/>itdb_photodb_photoalbum_remove ()</title>
-<indexterm><primary>itdb_photodb_photoalbum_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_photoalbum_remove      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+<title><anchor id="itdb-photodb-photoalbum-remove" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_remove ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_photoalbum_remove      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
                                                          <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
                                                          <link linkend="gboolean">gboolean</link> remove_pics);</programlisting>
 <para>
-Remove <parameter>album</parameter> from the Photo Database. If remove_pics is TRUE,
+Remove <parameter>album</parameter> from the Photo Database. If <parameter>remove_pics</parameter> is TRUE,
 remove all photos contained in <parameter>album</parameter> from the Photo Database.
 </para>
 <para>
+<note>
 Memory used by the removed album will be freed and the album cannot
-be accessed any more.</para>
+be accessed any more.
+</note></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to apply changes to
+<listitem><simpara>             the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to apply changes to
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>album</parameter>&nbsp;:</term>
-<listitem><simpara> the album to be removed from the database
+<listitem><simpara>          the album to be removed from the database
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>remove_pics</parameter>&nbsp;:</term>
-<listitem><simpara> TRUE to remove pics in that album permanently from
-the database.
+<listitem><simpara>    TRUE to remove pics in that album permanently
+                 from the database.
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-photodb-remove-photo" role="function"/>itdb_photodb_remove_photo ()</title>
-<indexterm><primary>itdb_photodb_remove_photo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_remove_photo           (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
-                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
-                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo);</programlisting>
-<para>
-Remove photo. If <parameter>album</parameter> is not the first photoalbum, the photo will
-be removed from that album only. If <parameter>album</parameter> is NULL or the first
-photoalbum (Photo Library), the photo will be removed from all
-albums and the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link>.
-</para>
-<para>
-<parameter>photo</parameter> will be freed and can no longer be used if removed from the
-first photoalbum.</para>
-<para>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to remove the photo from
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>album</parameter>&nbsp;:</term>
-<listitem><simpara> the album to remove the photo from. If album is NULL, then
-it will first be removed from all photoalbums and then from the
-photo database as well.
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>photo</parameter>&nbsp;:</term>
-<listitem><simpara> <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> (photo) to remove.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
-<refsect2>
-<title><anchor id="itdb-photodb-write" role="function"/>itdb_photodb_write ()</title>
-<indexterm><primary>itdb_photodb_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_photodb_write                  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb,
-                                                         <link linkend="GError">GError</link> **error);</programlisting>
-<para>
-Write out a PhotoDB.
-</para>
-<para>
-FIXME: error is not set yet.</para>
-<para>
+</refsect1>
 
-</para><variablelist role="params">
-<varlistentry><term><parameter>photodb</parameter>&nbsp;:</term>
-<listitem><simpara> the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to write to disk
-</simpara></listitem></varlistentry>
-<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
-<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link> or NULL
-</simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
-set accordingly.
-</simpara></listitem></varlistentry>
-</variablelist></refsect2>
 
-</refsect1>
 
 
 
-
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/playlists.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/playlists.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/playlists.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -83,23 +83,23 @@
 <refsect2>
 <title><anchor id="Itdb-Playlist" role="struct"/>Itdb_Playlist</title>
 <indexterm><primary>Itdb_Playlist</primary></indexterm><programlisting>typedef struct {
-    Itdb_iTunesDB *itdb;  /* pointer to iTunesDB (for convenience) */
-    gchar *name;          /* name of playlist in UTF8              */
-    guint8 type;          /* ITDB_PL_TYPE_NORM/_MPL                */
-    guint8 flag1;         /* unknown, usually set to 0             */
-    guint8 flag2;         /* unknown, always set to 0              */
-    guint8 flag3;         /* unknown, always set to 0              */
-    gint  num;            /* number of tracks in playlist          */
-    GList *members;       /* tracks in playlist (Track *)          */
-    gboolean is_spl;      /* smart playlist?                       */
-    time_t timestamp;     /* timestamp of playlist creation        */
-    guint64 id;           /* playlist ID                           */
-    guint32 sortorder;    /* How to sort playlist -- see below     */
-    guint32 podcastflag;  /* ITDB_PL_FLAG_NORM/_PODCAST            */
-    Itdb_SPLPref splpref;      /* smart playlist prefs                  */
-    Itdb_SPLRules splrules;    /* rules for smart playlists             */
-    gpointer reserved100; /* reserved for MHOD100 implementation   */
-    gpointer reserved101; /* reserved for MHOD100 implementation   */
+    Itdb_iTunesDB *itdb;
+    gchar *name;
+    guint8 type;
+    guint8 flag1;
+    guint8 flag2;
+    guint8 flag3;
+    gint  num;
+    GList *members;
+    gboolean is_spl;
+    time_t timestamp;
+    guint64 id;
+    guint32 sortorder;
+    guint32 podcastflag;
+    Itdb_SPLPref splpref;
+    Itdb_SPLRules splrules;
+    gpointer reserved100;
+    gpointer reserved101;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -114,11 +114,145 @@
 } Itdb_Playlist;
 </programlisting>
 <para>
+Structure representing an iTunes Playlist</para>
+<para>
 
-</para></refsect2>
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>&nbsp;*<structfield>itdb</structfield>;</term>
+<listitem><simpara>               A pointer to the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> (for convenience)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>name</structfield>;</term>
+<listitem><simpara>               The name of the playlist in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>type</structfield>;</term>
+<listitem><simpara>               The playlist type (normal or master)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag1</structfield>;</term>
+<listitem><simpara>              Unknown, usually set to 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag2</structfield>;</term>
+<listitem><simpara>              Unknown, always set to 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag3</structfield>;</term>
+<listitem><simpara>              Unknown, always set to 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>num</structfield>;</term>
+<listitem><simpara>                The number of tracks in the playlist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>members</structfield>;</term>
+<listitem><simpara>            A list of tracks in the playlist (<link linkend="Itdb-Track"><type>Itdb_Track</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>is_spl</structfield>;</term>
+<listitem><simpara>             True if the playlist is a smart playlist, otherwise
+                     false
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>timestamp</structfield>;</term>
+<listitem><simpara>          When the playlist was created
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                 The playlist ID
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>sortorder</structfield>;</term>
+<listitem><simpara>          The playlist sort order (<link linkend="ItdbPlaylistSortOrder"><type>ItdbPlaylistSortOrder</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>podcastflag</structfield>;</term>
+<listitem><simpara>        This is set to 0 on normal playlists and to 1 for the
+                     Podcast playlist. If set to 1, the playlist will not be
+                     shown under 'Playlists' on the iPod, but as 'Podcasts'
+                     under the Music menu. The actual title of the Playlist
+                     does not matter. If more than one playlist is set to 1,
+                     they don't show up at all.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-SPLPref">Itdb_SPLPref</link>&nbsp;<structfield>splpref</structfield>;</term>
+<listitem><simpara>            Smart playlist preferences (<link linkend="Itdb-SPLPref"><type>Itdb_SPLPref</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-SPLRules">Itdb_SPLRules</link>&nbsp;<structfield>splrules</structfield>;</term>
+<listitem><simpara>           Smart playlist rules (<link linkend="Itdb-SPLRules"><type>Itdb_SPLRules</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved100</structfield>;</term>
+<listitem><simpara>        Reserved for MHOD100 implementation
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved101</structfield>;</term>
+<listitem><simpara>        Reserved for MHOD100 implementation
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
 <refsect2>
-<title><anchor id="ItdbPlaylistSortOrder" role="enum"/>enum ItdbPlaylistSortOrder</title>
-<indexterm><primary>ItdbPlaylistSortOrder</primary></indexterm><programlisting>typedef enum
+<title><anchor id="ItdbPlaylistSortOrder" role="enum" condition="since:0.1.3"/>enum ItdbPlaylistSortOrder</title>
+<indexterm role="0.1.3"><primary>ItdbPlaylistSortOrder</primary></indexterm><programlisting>typedef enum
 {
     ITDB_PSO_MANUAL = 1,
 /*    ITDB_PSO_UNKNOWN = 2, */
@@ -151,26 +285,160 @@
 } ItdbPlaylistSortOrder;
 </programlisting>
 <para>
+Playlist Sort Order</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-PSO-MANUAL:CAPS" role="constant"/><literal>ITDB_PSO_MANUAL</literal></term>
+<listitem><simpara>        Sort by playlist order (manual sort)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TITLE:CAPS" role="constant"/><literal>ITDB_PSO_TITLE</literal></term>
+<listitem><simpara>         Sort by track title
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-ALBUM:CAPS" role="constant"/><literal>ITDB_PSO_ALBUM</literal></term>
+<listitem><simpara>         Sort by album
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-ARTIST:CAPS" role="constant"/><literal>ITDB_PSO_ARTIST</literal></term>
+<listitem><simpara>        Sort by artist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-BIRATE:CAPS" role="constant"/><literal>ITDB_PSO_BIRATE</literal></term>
+<listitem><simpara>        Sort by bitrate
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-GENRE:CAPS" role="constant"/><literal>ITDB_PSO_GENRE</literal></term>
+<listitem><simpara>         Sort by genre
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-FILETYPE:CAPS" role="constant"/><literal>ITDB_PSO_FILETYPE</literal></term>
+<listitem><simpara>      Sort by filetype
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME-MODIFIED:CAPS" role="constant"/><literal>ITDB_PSO_TIME_MODIFIED</literal></term>
+<listitem><simpara> Sort by date modified
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TRACK-NR:CAPS" role="constant"/><literal>ITDB_PSO_TRACK_NR</literal></term>
+<listitem><simpara>      Sort by track number
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-SIZE:CAPS" role="constant"/><literal>ITDB_PSO_SIZE</literal></term>
+<listitem><simpara>          Sort by track size
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME:CAPS" role="constant"/><literal>ITDB_PSO_TIME</literal></term>
+<listitem><simpara>          Sort by track time
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-YEAR:CAPS" role="constant"/><literal>ITDB_PSO_YEAR</literal></term>
+<listitem><simpara>          Sort by year
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-SAMPLERATE:CAPS" role="constant"/><literal>ITDB_PSO_SAMPLERATE</literal></term>
+<listitem><simpara>    Sort by samplerate
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-COMMENT:CAPS" role="constant"/><literal>ITDB_PSO_COMMENT</literal></term>
+<listitem><simpara>       Sort by comments
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME-ADDED:CAPS" role="constant"/><literal>ITDB_PSO_TIME_ADDED</literal></term>
+<listitem><simpara>    Sort by date added
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-EQUALIZER:CAPS" role="constant"/><literal>ITDB_PSO_EQUALIZER</literal></term>
+<listitem><simpara>     Sort by equilizer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-COMPOSER:CAPS" role="constant"/><literal>ITDB_PSO_COMPOSER</literal></term>
+<listitem><simpara>      Sort by composer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-PLAYCOUNT:CAPS" role="constant"/><literal>ITDB_PSO_PLAYCOUNT</literal></term>
+<listitem><simpara>     Sort by playcount
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME-PLAYED:CAPS" role="constant"/><literal>ITDB_PSO_TIME_PLAYED</literal></term>
+<listitem><simpara>   Sort by date last played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-CD-NR:CAPS" role="constant"/><literal>ITDB_PSO_CD_NR</literal></term>
+<listitem><simpara>         Sort by disc number
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-RATING:CAPS" role="constant"/><literal>ITDB_PSO_RATING</literal></term>
+<listitem><simpara>        Sort by rating
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-RELEASE-DATE:CAPS" role="constant"/><literal>ITDB_PSO_RELEASE_DATE</literal></term>
+<listitem><simpara>  Sort by release date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-BPM:CAPS" role="constant"/><literal>ITDB_PSO_BPM</literal></term>
+<listitem><simpara>           Sort by beats per minute
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-GROUPING:CAPS" role="constant"/><literal>ITDB_PSO_GROUPING</literal></term>
+<listitem><simpara>      Sort by grouping
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-CATEGORY:CAPS" role="constant"/><literal>ITDB_PSO_CATEGORY</literal></term>
+<listitem><simpara>      Sort by category
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-DESCRIPTION:CAPS" role="constant"/><literal>ITDB_PSO_DESCRIPTION</literal></term>
+<listitem><simpara>   Sort by description
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.1.3
 </para></refsect2>
 <refsect2>
 <title><anchor id="itdb-playlist-new" role="function"/>itdb_playlist_new ()</title>
 <indexterm><primary>itdb_playlist_new</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_new                   (const <link linkend="gchar">gchar</link> *title,
                                                          <link linkend="gboolean">gboolean</link> spl);</programlisting>
 <para>
-Creates a new playlist. If <parameter>spl</parameter> is TRUE, a smart
-playlist is generated. pl->id is set by <link linkend="itdb-playlist-add"><function>itdb_playlist_add()</function></link> when the 
-playlist is added to an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link></para>
+Creates a new playlist. If <parameter>spl</parameter> is TRUE, a smart playlist is
+generated. pl->id is set by <link linkend="itdb-playlist-add"><function>itdb_playlist_add()</function></link> when the playlist
+is added to an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>title</parameter>&nbsp;:</term>
-<listitem><simpara> playlist title
+<listitem><simpara>  playlist title
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>spl</parameter>&nbsp;:</term>
-<listitem><simpara> smart playlist flag
+<listitem><simpara>    smart playlist flag
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> which must be freed with 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> which must be freed with
 <link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link> after use
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
@@ -190,17 +458,18 @@
 <title><anchor id="itdb-playlist-duplicate" role="function"/>itdb_playlist_duplicate ()</title>
 <indexterm><primary>itdb_playlist_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_duplicate             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
-Duplicates an existing playlist. pl_dup-&gt;id is set to zero, so that
-it will be set to a unique value when adding it to an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>. The
-returned playlist won't be associated with an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>.</para>
+Duplicates an existing playlist. <parameter>pl_dup->id</parameter> is set to zero, so
+that it will be set to a unique value when adding it to an
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>. The returned playlist won't be associated with an
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> that you'll have to free
-with <link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link> when you no longer need it. 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> that you'll have to
+free with <link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link> when you no longer need it.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -210,20 +479,21 @@
                                                          <link linkend="gint32">gint32</link> pos);</programlisting>
 <para>
 Adds playlist <parameter>pl</parameter> to the database <parameter>itdb</parameter> at position <parameter>pos</parameter> (-1 for
-"append to end"). A unique id is created if pl-&gt;id is equal to
-zero. After calling this function, <parameter>itdb</parameter> manages the memory of <parameter>pl</parameter>, which
-means you no longer need to explicitly call <link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link></para>
+"append to end"). A unique id is created if <parameter>pl->id</parameter> is equal to
+zero. After calling this function, <parameter>itdb</parameter> manages the memory of <parameter>pl</parameter>,
+which means you no longer need to explicitly call
+<link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> position to insert <parameter>pl</parameter> at
+<listitem><simpara>    position to insert <parameter>pl</parameter> at
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -236,17 +506,17 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> new position
+<listitem><simpara>    new position
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
 <title><anchor id="itdb-playlist-remove" role="function"/>itdb_playlist_remove ()</title>
 <indexterm><primary>itdb_playlist_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_remove                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
-Removes <parameter>pl</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with 
+Removes <parameter>pl</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with
 and frees memory</para>
 <para>
 
@@ -259,8 +529,8 @@
 <title><anchor id="itdb-playlist-unlink" role="function"/>itdb_playlist_unlink ()</title>
 <indexterm><primary>itdb_playlist_unlink</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_unlink                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
-Remove <parameter>pl</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with but do not free 
-memory. pl-&gt;itdb is set to NULL after this function returns</para>
+Remove <parameter>pl</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with but do not
+free memory. <parameter>pl->itdb</parameter> is set to NULL after this function returns</para>
 <para>
 
 </para><variablelist role="params">
@@ -274,19 +544,18 @@
                                                          <link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          <link linkend="gint32">gint32</link> pos);</programlisting>
 <para>
-Adds <parameter>track</parameter> to <parameter>pl</parameter> at position <parameter>pos</parameter> (-1 for "append to
-end")</para>
+Adds <parameter>track</parameter> to <parameter>pl</parameter> at position <parameter>pos</parameter> (-1 to append at the end)</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> position to insert <parameter>track</parameter> at
+<listitem><simpara>    position to insert <parameter>track</parameter> at
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -295,17 +564,17 @@
                                                          <link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
 <para>
 Removes <parameter>track</parameter> from <parameter>pl</parameter>. If <parameter>pl</parameter> is NULL, removes <parameter>track</parameter> from the
-master playlist. If <parameter>track</parameter> can't be found in <parameter>pl</parameter>, nothing happens. If after
-removing <parameter>track</parameter>, <parameter>pl</parameter> is empty, it's not removed from the database
-The memory used by <parameter>track</parameter> isn't freed.</para>
+master playlist. If <parameter>track</parameter> can't be found in <parameter>pl</parameter>, nothing happens.
+If after removing <parameter>track</parameter>, <parameter>pl</parameter> is empty, it's not removed from the
+database The memory used by <parameter>track</parameter> isn't freed.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -313,15 +582,15 @@
 <indexterm><primary>itdb_playlist_contains_track</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_contains_track        (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
                                                          <link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
 <para>
-Checks if <parameter>track</parameter> is in <parameter>pl</parameter>.</para>
+Checks if <parameter>track</parameter> is in <parameter>pl</parameter></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>track</parameter> is in <parameter>pl</parameter>, FALSE otherwise
 </simpara></listitem></varlistentry>
@@ -330,15 +599,15 @@
 <title><anchor id="itdb-playlist-contain-track-number" role="function"/>itdb_playlist_contain_track_number ()</title>
 <indexterm><primary>itdb_playlist_contain_track_number</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_playlist_contain_track_number  (<link linkend="Itdb-Track">Itdb_Track</link> *tr);</programlisting>
 <para>
-Counts the number of playlist <parameter>track</parameter> is a member of (not including the 
-master playlist)</para>
+Counts the number of playlist <parameter>track</parameter> is a member of (not including
+the master playlist)</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>tr</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> number of playlist containing <parameter>track</parameter>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of playlist containing <parameter>track</parameter>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -352,7 +621,7 @@
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> track count
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of tracks in <parameter>pl</parameter>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -366,12 +635,12 @@
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the master playlist of <parameter>itdb</parameter> 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the master playlist of <parameter>itdb</parameter>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-playlist-is-mpl" role="function"/>itdb_playlist_is_mpl ()</title>
-<indexterm><primary>itdb_playlist_is_mpl</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_is_mpl                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<title><anchor id="itdb-playlist-is-mpl" role="function" condition="since:0.1.6"/>itdb_playlist_is_mpl ()</title>
+<indexterm role="0.1.6"><primary>itdb_playlist_is_mpl</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_is_mpl                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
 Checks if <parameter>pl</parameter> is the master playlist</para>
 <para>
@@ -380,12 +649,14 @@
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> is the master playlist, FALSE otherwise 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> is the master playlist, FALSE otherwise
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.1.6
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-playlist-set-mpl" role="function"/>itdb_playlist_set_mpl ()</title>
-<indexterm><primary>itdb_playlist_set_mpl</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_set_mpl               (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<title><anchor id="itdb-playlist-set-mpl" role="function" condition="since:0.2.0"/>itdb_playlist_set_mpl ()</title>
+<indexterm role="0.2.0"><primary>itdb_playlist_set_mpl</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_set_mpl               (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
 Sets <parameter>pl</parameter> to be a master playlist</para>
 <para>
@@ -394,10 +665,11 @@
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.2.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-playlist-podcasts" role="function"/>itdb_playlist_podcasts ()</title>
-<indexterm><primary>itdb_playlist_podcasts</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_podcasts              (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<title><anchor id="itdb-playlist-podcasts" role="function" condition="since:0.1.6"/>itdb_playlist_podcasts ()</title>
+<indexterm role="0.1.6"><primary>itdb_playlist_podcasts</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_podcasts              (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
 <para>
 Gets the podcasts playlist of <parameter>itdb</parameter></para>
 <para>
@@ -406,12 +678,15 @@
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the podcasts playlist of <parameter>itdb</parameter>, or NULL if it's there is none
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the podcasts playlist of <parameter>itdb</parameter>, or NULL if there is
+not one
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.1.6
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-playlist-is-podcasts" role="function"/>itdb_playlist_is_podcasts ()</title>
-<indexterm><primary>itdb_playlist_is_podcasts</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_is_podcasts           (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<title><anchor id="itdb-playlist-is-podcasts" role="function" condition="since:0.1.6"/>itdb_playlist_is_podcasts ()</title>
+<indexterm role="0.1.6"><primary>itdb_playlist_is_podcasts</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_is_podcasts           (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
 Checks if <parameter>pl</parameter> is the podcasts playlist</para>
 <para>
@@ -420,12 +695,14 @@
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> is the podcasts playlist, FALSE otherwise 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> is the podcasts playlist, FALSE otherwise
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.1.6
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-playlist-set-podcasts" role="function"/>itdb_playlist_set_podcasts ()</title>
-<indexterm><primary>itdb_playlist_set_podcasts</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_set_podcasts          (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<title><anchor id="itdb-playlist-set-podcasts" role="function" condition="since:0.2.0"/>itdb_playlist_set_podcasts ()</title>
+<indexterm role="0.2.0"><primary>itdb_playlist_set_podcasts</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_set_podcasts          (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
 Set <parameter>pl</parameter> to be a podcasts playlist</para>
 <para>
@@ -434,23 +711,24 @@
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.2.0
+</para></refsect2>
 <refsect2>
 <title><anchor id="itdb-playlist-exists" role="function"/>itdb_playlist_exists ()</title>
 <indexterm><primary>itdb_playlist_exists</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_exists                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                                          <link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
 <para>
-Checks if <parameter>pl</parameter> is present in <parameter>db</parameter></para>
+Checks if <parameter>pl</parameter> is present in <parameter>itdb</parameter></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> exists in <parameter>db</parameter>, FALSE otherwise 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> exists in <parameter>itdb</parameter>, FALSE otherwise
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -463,13 +741,13 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>id</parameter>&nbsp;:</term>
-<listitem><simpara> ID of the playlist to look for
+<listitem><simpara>     ID of the playlist to look for
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> with ID <parameter>id</parameter> or NULL if there is no such
-playlist.
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> with ID <parameter>id</parameter> or NULL if there is no
+such playlist.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -482,12 +760,13 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>num</parameter>&nbsp;:</term>
-<listitem><simpara> the position of the playlist, counting from 0
+<listitem><simpara>    the position of the playlist, counting from 0
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>, or NULL if there is no playlist at <parameter>pos</parameter>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>, or NULL if there is no playlist
+at <parameter>pos</parameter>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -500,13 +779,13 @@
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>name</parameter>&nbsp;:</term>
-<listitem><simpara> name of the playlist to look for
+<listitem><simpara>   name of the playlist to look for
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the first <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> with name <parameter>name</parameter>, NULL if there is no
-such playlist
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the first <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> with name <parameter>name</parameter>, NULL if
+there is no such playlist
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -527,4 +806,6 @@
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/smart-playlists.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/smart-playlists.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/smart-playlists.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -73,18 +73,15 @@
 <refsect1 role="details">
 <title role="details.title">Details</title>
 <refsect2>
-<title><anchor id="Itdb-SPLPref" role="struct"/>Itdb_SPLPref</title>
-<indexterm><primary>Itdb_SPLPref</primary></indexterm><programlisting>typedef struct {
-    guint8  liveupdate;        /* "live Updating" check box */
-    guint8  checkrules;        /* "Match X of the following
-				  conditions" check box */
-    guint8  checklimits;       /* "Limit To..." check box */
-    guint32 limittype;         /* See types defined above */
-    guint32 limitsort;         /* See types defined above */
-    guint32 limitvalue;        /* The value typed next to "Limit
-				  type" */
-    guint8  matchcheckedonly;  /* "Match only checked songs" check box */
-    /* reserved for future use */
+<title><anchor id="Itdb-SPLPref" role="struct" condition="since:0.5.0"/>Itdb_SPLPref</title>
+<indexterm role="0.5.0"><primary>Itdb_SPLPref</primary></indexterm><programlisting>typedef struct {
+    guint8  liveupdate;
+    guint8  checkrules;
+    guint8  checklimits;
+    guint32 limittype;
+    guint32 limitsort;
+    guint32 limitvalue;
+    guint8  matchcheckedonly;
     gint32 reserved_int1;
     gint32 reserved_int2;
     gpointer reserved1;
@@ -92,24 +89,74 @@
 } Itdb_SPLPref;
 </programlisting>
 <para>
+Smart Playlist preferences are for various flags that are not strictly smart
+playlist "rules."</para>
+<para>
 
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>liveupdate</structfield>;</term>
+<listitem><simpara>         Live Updating
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>checkrules</structfield>;</term>
+<listitem><simpara>         Match this number of rules.  If set to 0, ignore rules.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>checklimits</structfield>;</term>
+<listitem><simpara>        Limit to this number of <parameter>limittype</parameter>.  If 0, no limits.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>limittype</structfield>;</term>
+<listitem><simpara>          an <link linkend="ItdbLimitType"><type>ItdbLimitType</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>limitsort</structfield>;</term>
+<listitem><simpara>          an <link linkend="ItdbLimitSort"><type>ItdbLimitSort</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>limitvalue</structfield>;</term>
+<listitem><simpara>         The value typed next to "Limit type"
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>matchcheckedonly</structfield>;</term>
+<listitem><simpara>   Match only checked songs
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="Itdb-SPLRule" role="struct"/>Itdb_SPLRule</title>
-<indexterm><primary>Itdb_SPLRule</primary></indexterm><programlisting>typedef struct {
+<title><anchor id="Itdb-SPLRule" role="struct" condition="since:0.5.0"/>Itdb_SPLRule</title>
+<indexterm role="0.5.0"><primary>Itdb_SPLRule</primary></indexterm><programlisting>typedef struct {
     guint32 field;
     guint32 action;
-    gchar *string;             /* data in UTF8  */
-    /* from and to are pretty stupid.. if it's a date type of field,
-       then
-         value = 0x2dae2dae2dae2dae,
-         date = some number, like 2 or -2
-         units = unit in seconds, like 604800 = a week
-       but if this is actually some kind of integer comparison, like
-       rating = 60 (3 stars)
-         value = the value we care about
-	 date = 0
-	 units = 1 */
+    gchar *string;
     guint64 fromvalue;
     gint64 fromdate;
     guint64 fromunits;
@@ -129,14 +176,120 @@
 } Itdb_SPLRule;
 </programlisting>
 <para>
+Smart Playlist Rule
+</para>
+<para>
+The from and to fields require some explanation.  If <parameter>field</parameter> is a date type,
+then <parameter>value</parameter> would be set to 0x2dae2dae2dae2dae, <parameter>date</parameter> would be a number,
+(e.g. 2 or -2), and <parameter>units</parameter> would be a time unit in seconds (e.g. one week
+would be 604800).  If <parameter>field</parameter> is an integer comparison, like rating = 60 (i.e.
+3 stars), then <parameter>value</parameter> would be the value we care about (e.g. 60), <parameter>date</parameter> would
+be 0, and <parameter>units</parameter> would be 1.  Binary AND types are similar, <parameter>value</parameter> is the
+important part, with <parameter>date</parameter> = 0 and <parameter>units</parameter> = 1.  Clear as mud, right?
+</para>
+<para>
+For more details see <ulink
+url="http://ipodlinux.org/ITunesDB.html&num;Smart_Playlist_Rule_Values">ipodlinux.org</ulink>.</para>
+<para>
 
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>field</structfield>;</term>
+<listitem><simpara>          an <link linkend="ItdbSPLFieldType"><type>ItdbSPLFieldType</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>action</structfield>;</term>
+<listitem><simpara>         an <link linkend="ItdbSPLActionType"><type>ItdbSPLActionType</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>string</structfield>;</term>
+<listitem><simpara>         data in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>fromvalue</structfield>;</term>
+<listitem><simpara>      from value
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint64">gint64</link>&nbsp;<structfield>fromdate</structfield>;</term>
+<listitem><simpara>       from date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>fromunits</structfield>;</term>
+<listitem><simpara>      from units
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>tovalue</structfield>;</term>
+<listitem><simpara>        to value
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint64">gint64</link>&nbsp;<structfield>todate</structfield>;</term>
+<listitem><simpara>         to date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>tounits</structfield>;</term>
+<listitem><simpara>        to units
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk052</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk056</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk060</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk064</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk068</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="Itdb-SPLRules" role="struct"/>Itdb_SPLRules</title>
-<indexterm><primary>Itdb_SPLRules</primary></indexterm><programlisting>typedef struct {
+<title><anchor id="Itdb-SPLRules" role="struct" condition="since:0.5.0"/>Itdb_SPLRules</title>
+<indexterm role="0.5.0"><primary>Itdb_SPLRules</primary></indexterm><programlisting>typedef struct {
     guint32 unk004;
-    guint32 match_operator;  /* "All" (logical AND): Itdb_SPLMATCH_AND,
-				"Any" (logical OR): Itdb_SPLMATCH_OR */
+    guint32 match_operator;
     GList *rules;
     /* reserved for future use */
     gint32 reserved_int1;
@@ -146,11 +299,51 @@
 } Itdb_SPLRules;
 </programlisting>
 <para>
+Smart Playlist Rules</para>
+<para>
 
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk004</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>match_operator</structfield>;</term>
+<listitem><simpara> Whether all rules must match (<link linkend="ITDB-SPLMATCH-AND:CAPS"><type>ITDB_SPLMATCH_AND</type></link>) or any
+                 rules may match (<link linkend="ITDB-SPLMATCH-OR:CAPS"><type>ITDB_SPLMATCH_OR</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>rules</structfield>;</term>
+<listitem><simpara>          list of <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>'s
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbLimitSort" role="enum"/>enum ItdbLimitSort</title>
-<indexterm><primary>ItdbLimitSort</primary></indexterm><programlisting>typedef enum {
+<title><anchor id="ItdbLimitSort" role="enum" condition="since:0.5.0"/>enum ItdbLimitSort</title>
+<indexterm role="0.5.0"><primary>ItdbLimitSort</primary></indexterm><programlisting>typedef enum {
     ITDB_LIMITSORT_RANDOM = 0x02,
     ITDB_LIMITSORT_SONG_NAME = 0x03,
     ITDB_LIMITSORT_ALBUM = 0x04,
@@ -167,11 +360,95 @@
 } ItdbLimitSort;
 </programlisting>
 <para>
+Which songs to pick when using a limit type
+</para>
+<para>
+Note: the values for <link linkend="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><type>ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</type></link>,
+<link linkend="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS"><type>ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</type></link>, <link linkend="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS"><type>ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</type></link>,
+and <link linkend="ITDB-LIMITSORT-LOWEST-RATING:CAPS"><type>ITDB_LIMITSORT_LOWEST_RATING</type></link> are really 0x10, 0x14, 0x15, 0x17, with the
+'limitsort_opposite' flag set.  This is the same value as the "positive"
+value (i.e. <link linkend="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><type>ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</type></link>), and is really very
+terribly awfully weird, so we map the values to iPodDB specific values with
+the high bit set.
+</para>
+<para>
+On writing, we check the high bit and write the limitsort_opposite from that.
+That way, we don't have to deal with programs using the class needing to set
+the wrong limit and then make it into the "opposite", which would be frickin'
+annoying.</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-RANDOM:CAPS" role="constant"/><literal>ITDB_LIMITSORT_RANDOM</literal></term>
+<listitem><simpara>                Sort randomly
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-SONG-NAME:CAPS" role="constant"/><literal>ITDB_LIMITSORT_SONG_NAME</literal></term>
+<listitem><simpara>             Sort by track name
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-ALBUM:CAPS" role="constant"/><literal>ITDB_LIMITSORT_ALBUM</literal></term>
+<listitem><simpara>                 Sort by album name
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-ARTIST:CAPS" role="constant"/><literal>ITDB_LIMITSORT_ARTIST</literal></term>
+<listitem><simpara>                Sort by artist name
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-GENRE:CAPS" role="constant"/><literal>ITDB_LIMITSORT_GENRE</literal></term>
+<listitem><simpara>                 Sort by genre
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_MOST_RECENTLY_ADDED</literal></term>
+<listitem><simpara>   Sort by most recently added
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</literal></term>
+<listitem><simpara>  Sort by least recently added
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_MOST_OFTEN_PLAYED</literal></term>
+<listitem><simpara>     Sort by most often played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</literal></term>
+<listitem><simpara>    Sort by least often played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_MOST_RECENTLY_PLAYED</literal></term>
+<listitem><simpara>  Sort by most recently played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</literal></term>
+<listitem><simpara> Sort by least recently played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-HIGHEST-RATING:CAPS" role="constant"/><literal>ITDB_LIMITSORT_HIGHEST_RATING</literal></term>
+<listitem><simpara>        Sort by highest rating
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LOWEST-RATING:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LOWEST_RATING</literal></term>
+<listitem><simpara>         Sort by lowest rating
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbLimitType" role="enum"/>enum ItdbLimitType</title>
-<indexterm><primary>ItdbLimitType</primary></indexterm><programlisting>typedef enum {
+<title><anchor id="ItdbLimitType" role="enum" condition="since:0.5.0"/>enum ItdbLimitType</title>
+<indexterm role="0.5.0"><primary>ItdbLimitType</primary></indexterm><programlisting>typedef enum {
     ITDB_LIMITTYPE_MINUTES = 0x01,
     ITDB_LIMITTYPE_MB      = 0x02,
     ITDB_LIMITTYPE_SONGS   = 0x03,
@@ -180,14 +457,43 @@
 } ItdbLimitType;
 </programlisting>
 <para>
+The type of unit to use when limiting a playlist</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-MINUTES:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_MINUTES</literal></term>
+<listitem><simpara> Limit in minutes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-MB:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_MB</literal></term>
+<listitem><simpara>      Limit in megabytes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-SONGS:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_SONGS</literal></term>
+<listitem><simpara>   Limit in number of songs
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-HOURS:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_HOURS</literal></term>
+<listitem><simpara>   Limit in hours
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-GB:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_GB</literal></term>
+<listitem><simpara>      Limit in gigabytes
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbSPLAction" role="enum"/>enum ItdbSPLAction</title>
-<indexterm><primary>ItdbSPLAction</primary></indexterm><programlisting>typedef enum {
-    ITDB_SPLACTION_IS_INT = 0x00000001,          /* "Is Set" in iTunes */
-    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010, /* "Is After" in iTunes */
-    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,    /* "Is Before" in iTunes */
+<title><anchor id="ItdbSPLAction" role="enum" condition="since:0.5.0"/>enum ItdbSPLAction</title>
+<indexterm role="0.5.0"><primary>ItdbSPLAction</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLACTION_IS_INT = 0x00000001,
+    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010,
+    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,
     ITDB_SPLACTION_IS_IN_THE_RANGE = 0x00000100,
     ITDB_SPLACTION_IS_IN_THE_LAST = 0x00000200,
     ITDB_SPLACTION_BINARY_AND = 0x00000400,
@@ -197,43 +503,178 @@
     ITDB_SPLACTION_STARTS_WITH = 0x01000004,
     ITDB_SPLACTION_ENDS_WITH = 0x01000008,
 
-    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,     /* "Is Not Set" in iTunes */
-
-    /* Note: Not available in iTunes 4.5 (untested on iPod) */
+    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,
     ITDB_SPLACTION_IS_NOT_GREATER_THAN = 0x02000010,
-    /* Note: Not available in iTunes 4.5 (untested on iPod) */
     ITDB_SPLACTION_IS_NOT_LESS_THAN = 0x02000040,
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_IS_NOT_IN_THE_RANGE = 0x02000100,
+    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
 
-    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
     ITDB_SPLACTION_IS_NOT = 0x03000001,
     ITDB_SPLACTION_DOES_NOT_CONTAIN = 0x03000002,
-
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_DOES_NOT_START_WITH = 0x03000004,
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_DOES_NOT_END_WITH = 0x03000008,
 } ItdbSPLAction;
 </programlisting>
 <para>
+Smartlist Actions used in smart playlist rules.
+</para>
+<para>
+Note by Otto (Samuel Wood):
+<informalexample>
+ <programlisting>
+ really this is a bitmapped field...
+ high byte
+ bit 0 = "string" values if set, "int" values if not set
+ bit 1 = "not", or to negate the check.
+ lower 2 bytes
+ bit 0 = simple "IS" query
+ bit 1 = contains
+ bit 2 = begins with
+ bit 3 = ends with
+ bit 4 = greater than
+ bit 5 = unknown, but probably greater than or equal to
+ bit 6 = less than
+ bit 7 = unknown, but probably less than or equal to
+ bit 8 = a range selection
+ bit 9 = "in the last"
+ </programlisting>
+</informalexample></para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-INT:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_INT</literal></term>
+<listitem><simpara>              is integer ("Is Set" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-GREATER-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_GREATER_THAN</literal></term>
+<listitem><simpara>     is greater than ("Is after" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-LESS-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_LESS_THAN</literal></term>
+<listitem><simpara>        is less than ("Is Before" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_IN_THE_RANGE</literal></term>
+<listitem><simpara>     is in the range
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-IN-THE-LAST:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_IN_THE_LAST</literal></term>
+<listitem><simpara>      is in the last
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-BINARY-AND:CAPS" role="constant"/><literal>ITDB_SPLACTION_BINARY_AND</literal></term>
+<listitem><simpara>          binary AND
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-STRING:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_STRING</literal></term>
+<listitem><simpara>           is a string
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-CONTAINS:CAPS" role="constant"/><literal>ITDB_SPLACTION_CONTAINS</literal></term>
+<listitem><simpara>            contains
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-STARTS-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_STARTS_WITH</literal></term>
+<listitem><simpara>         starts with
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-ENDS-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_ENDS_WITH</literal></term>
+<listitem><simpara>           ends with
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-INT:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_INT</literal></term>
+<listitem><simpara>          is not an integer ("Is Not Set" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_GREATER_THAN</literal></term>
+<listitem><simpara> is not greater than (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_LESS_THAN</literal></term>
+<listitem><simpara>    is not less than (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_IN_THE_RANGE</literal></term>
+<listitem><simpara> is not in the range (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_IN_THE_LAST</literal></term>
+<listitem><simpara>  is not in the last
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT</literal></term>
+<listitem><simpara>              is not
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS" role="constant"/><literal>ITDB_SPLACTION_DOES_NOT_CONTAIN</literal></term>
+<listitem><simpara>    does not contain
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_DOES_NOT_START_WITH</literal></term>
+<listitem><simpara> does not start with (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_DOES_NOT_END_WITH</literal></term>
+<listitem><simpara>   does not end with (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbSPLActionLast" role="enum"/>enum ItdbSPLActionLast</title>
-<indexterm><primary>ItdbSPLActionLast</primary></indexterm><programlisting>typedef enum {
+<title><anchor id="ItdbSPLActionLast" role="enum" condition="since:0.5.0"/>enum ItdbSPLActionLast</title>
+<indexterm role="0.5.0"><primary>ItdbSPLActionLast</primary></indexterm><programlisting>typedef enum {
     ITDB_SPLACTION_LAST_DAYS_VALUE = 86400,    /* nr of secs in 24 hours */
     ITDB_SPLACTION_LAST_WEEKS_VALUE = 604800,  /* nr of secs in 7 days   */
     ITDB_SPLACTION_LAST_MONTHS_VALUE = 2628000,/* nr of secs in 30.4167
-					     days ~= 1 month */
+						  days ~= 1 month */
 } ItdbSPLActionLast;
 </programlisting>
 <para>
+These are to pass to <link linkend="AddRule"><function>AddRule()</function></link> when you need a unit for the two "in the last"
+action types.  In theory, you can use any time range.  iTunes might not
+like it, but the iPod shouldn't care.</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS" role="constant"/><literal>ITDB_SPLACTION_LAST_DAYS_VALUE</literal></term>
+<listitem><simpara>   Seconds in 24 hours
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS" role="constant"/><literal>ITDB_SPLACTION_LAST_WEEKS_VALUE</literal></term>
+<listitem><simpara>  Seconds in 7 days
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS" role="constant"/><literal>ITDB_SPLACTION_LAST_MONTHS_VALUE</literal></term>
+<listitem><simpara> Seconds in 1 month (approximately)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbSPLActionType" role="enum"/>enum ItdbSPLActionType</title>
-<indexterm><primary>ItdbSPLActionType</primary></indexterm><programlisting>typedef enum
+<title><anchor id="ItdbSPLActionType" role="enum" condition="since:0.5.0"/>enum ItdbSPLActionType</title>
+<indexterm role="0.5.0"><primary>ItdbSPLActionType</primary></indexterm><programlisting>typedef enum
 {
     ITDB_SPLAT_STRING = 1,
     ITDB_SPLAT_INT,
@@ -249,60 +690,268 @@
 } ItdbSPLActionType;
 </programlisting>
 <para>
+Smart Playlist Action Types</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-STRING:CAPS" role="constant"/><literal>ITDB_SPLAT_STRING</literal></term>
+<listitem><simpara>      string
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-INT:CAPS" role="constant"/><literal>ITDB_SPLAT_INT</literal></term>
+<listitem><simpara>         from integer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-DATE:CAPS" role="constant"/><literal>ITDB_SPLAT_DATE</literal></term>
+<listitem><simpara>        from date ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-RANGE-INT:CAPS" role="constant"/><literal>ITDB_SPLAT_RANGE_INT</literal></term>
+<listitem><simpara>   an integer range ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-RANGE-DATE:CAPS" role="constant"/><literal>ITDB_SPLAT_RANGE_DATE</literal></term>
+<listitem><simpara>  a date range ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-INTHELAST:CAPS" role="constant"/><literal>ITDB_SPLAT_INTHELAST</literal></term>
+<listitem><simpara>   in the last ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-PLAYLIST:CAPS" role="constant"/><literal>ITDB_SPLAT_PLAYLIST</literal></term>
+<listitem><simpara>    in playlist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-NONE:CAPS" role="constant"/><literal>ITDB_SPLAT_NONE</literal></term>
+<listitem><simpara>        none
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-INVALID:CAPS" role="constant"/><literal>ITDB_SPLAT_INVALID</literal></term>
+<listitem><simpara>     invalid
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-UNKNOWN:CAPS" role="constant"/><literal>ITDB_SPLAT_UNKNOWN</literal></term>
+<listitem><simpara>     unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-BINARY-AND:CAPS" role="constant"/><literal>ITDB_SPLAT_BINARY_AND</literal></term>
+<listitem><simpara>  is / is not (binary AND)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbSPLField" role="enum"/>enum ItdbSPLField</title>
-<indexterm><primary>ItdbSPLField</primary></indexterm><programlisting>typedef enum {
-    ITDB_SPLFIELD_SONG_NAME = 0x02,    /* String */
-    ITDB_SPLFIELD_ALBUM = 0x03,        /* String */
-    ITDB_SPLFIELD_ARTIST = 0x04,       /* String */
-    ITDB_SPLFIELD_BITRATE = 0x05,      /* Int (e.g. from/to = 128) */
-    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,  /* Int  (e.g. from/to = 44100) */
-    ITDB_SPLFIELD_YEAR = 0x07,         /* Int  (e.g. from/to = 2004) */
-    ITDB_SPLFIELD_GENRE = 0x08,        /* String */
-    ITDB_SPLFIELD_KIND = 0x09,         /* String */
-    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,/* Int (e.g. from/to = bcf93280 ==
-				     is before 6/19/2004)*/
-    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,  /* Int (e.g. from = 1, to = 2) */
-    ITDB_SPLFIELD_SIZE = 0x0c,         /* Int (e.g. from/to = 0x00600000
-				     for 6MB) */
-    ITDB_SPLFIELD_TIME = 0x0d,         /* Int (e.g. from/to = 83999 for
-				     1:23/83 seconds) */
-    ITDB_SPLFIELD_COMMENT = 0x0e,      /* String */
-    ITDB_SPLFIELD_DATE_ADDED = 0x10,   /* Int (e.g. from/to = bcfa83ff ==
-				     is after 6/19/2004) */
-    ITDB_SPLFIELD_COMPOSER = 0x12,     /* String */
-    ITDB_SPLFIELD_PLAYCOUNT = 0x16,    /* Int  (e.g. from/to = 1) */
-    ITDB_SPLFIELD_LAST_PLAYED = 0x17,  /* Int/ (e.g. from = bcfa83ff (6/19/2004)
-				     to = 0xbcfbd57f (6/20/2004)) */
-    ITDB_SPLFIELD_DISC_NUMBER = 0x18,  /* Int  (e.g. from/to = 1) */
-    ITDB_SPLFIELD_RATING = 0x19,       /* Int/Stars Rating (e.g. from/to =
-                                     60 (3 stars)) */
-    ITDB_SPLFIELD_COMPILATION = 0x1f,  /* Int (e.g. is set -&gt;
-				     ITDB_SPLACTION_IS_INT/from=1,
-				     is not set -&gt;
-				     ITDB_SPLACTION_IS_NOT_INT/from=1) */
-    ITDB_SPLFIELD_BPM = 0x23,          /* Int  (e.g. from/to = 60) */
-    ITDB_SPLFIELD_GROUPING = 0x27,     /* String */
-    ITDB_SPLFIELD_PLAYLIST = 0x28,     /* FIXME - Unknown...not parsed
-				     correctly...from/to = 0xb6fbad5f
-				     for "Purchased Music".  Extra
-				     data after "to"... */
-    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,   /* Logic Int */
-    ITDB_SPLFIELD_TVSHOW = 0x3e,       /* String */
-    ITDB_SPLFIELD_SEASON_NR = 0x3f,    /* Int */
-    ITDB_SPLFIELD_SKIPCOUNT = 0x44,    /* Int */
-    ITDB_SPLFIELD_LAST_SKIPPED = 0x45, /* Int */
-    ITDB_SPLFIELD_ALBUMARTIST = 0x47   /* String */
+<title><anchor id="ItdbSPLField" role="enum" condition="since:0.5.0"/>enum ItdbSPLField</title>
+<indexterm role="0.5.0"><primary>ItdbSPLField</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLFIELD_SONG_NAME = 0x02,
+    ITDB_SPLFIELD_ALBUM = 0x03,
+    ITDB_SPLFIELD_ARTIST = 0x04,
+    ITDB_SPLFIELD_BITRATE = 0x05,
+    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,
+    ITDB_SPLFIELD_YEAR = 0x07,
+    ITDB_SPLFIELD_GENRE = 0x08,
+    ITDB_SPLFIELD_KIND = 0x09,
+    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,
+    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,
+    ITDB_SPLFIELD_SIZE = 0x0c,
+    ITDB_SPLFIELD_TIME = 0x0d,
+    ITDB_SPLFIELD_COMMENT = 0x0e,
+    ITDB_SPLFIELD_DATE_ADDED = 0x10,
+    ITDB_SPLFIELD_COMPOSER = 0x12,
+    ITDB_SPLFIELD_PLAYCOUNT = 0x16,
+    ITDB_SPLFIELD_LAST_PLAYED = 0x17,
+    ITDB_SPLFIELD_DISC_NUMBER = 0x18,
+    ITDB_SPLFIELD_RATING = 0x19,
+    ITDB_SPLFIELD_COMPILATION = 0x1f,
+    ITDB_SPLFIELD_BPM = 0x23,
+    ITDB_SPLFIELD_GROUPING = 0x27,
+    ITDB_SPLFIELD_PLAYLIST = 0x28,
+    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,
+    ITDB_SPLFIELD_TVSHOW = 0x3e,
+    ITDB_SPLFIELD_SEASON_NR = 0x3f,
+    ITDB_SPLFIELD_SKIPCOUNT = 0x44,
+    ITDB_SPLFIELD_LAST_SKIPPED = 0x45,
+    ITDB_SPLFIELD_ALBUMARTIST = 0x47
 } ItdbSPLField;
 </programlisting>
 <para>
+Smart Playlist Fields, used for Smart Playlist Rules (<link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>).</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SONG-NAME:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SONG_NAME</literal></term>
+<listitem><simpara>        Song name (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-ALBUM:CAPS" role="constant"/><literal>ITDB_SPLFIELD_ALBUM</literal></term>
+<listitem><simpara>            Album (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-ARTIST:CAPS" role="constant"/><literal>ITDB_SPLFIELD_ARTIST</literal></term>
+<listitem><simpara>           Artist (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-BITRATE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_BITRATE</literal></term>
+<listitem><simpara>          Bitrate (integer, e.g. from/to = 128)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SAMPLE-RATE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SAMPLE_RATE</literal></term>
+<listitem><simpara>      Sample rate (integer, e.g. from/to = 44100)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-YEAR:CAPS" role="constant"/><literal>ITDB_SPLFIELD_YEAR</literal></term>
+<listitem><simpara>             Year (integer, e.g. from/to = 2004)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-GENRE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_GENRE</literal></term>
+<listitem><simpara>            Genre (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-KIND:CAPS" role="constant"/><literal>ITDB_SPLFIELD_KIND</literal></term>
+<listitem><simpara>             File type (string, e.g. MP3-File)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-DATE-MODIFIED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_DATE_MODIFIED</literal></term>
+<listitem><simpara>    Date modified (integer, e.g.
+                                 from/to = bcf93280 == is before 6/19/2004)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-TRACKNUMBER:CAPS" role="constant"/><literal>ITDB_SPLFIELD_TRACKNUMBER</literal></term>
+<listitem><simpara>      Track number (integer, e.g. from/to = 2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SIZE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SIZE</literal></term>
+<listitem><simpara>             Size (integer, e.g.
+                                 from/to = 0x00600000 for 6MB)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-TIME:CAPS" role="constant"/><literal>ITDB_SPLFIELD_TIME</literal></term>
+<listitem><simpara>             Time (integer, e.g.
+                                 from/to = 83999 for 1:23/83 seconds)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-COMMENT:CAPS" role="constant"/><literal>ITDB_SPLFIELD_COMMENT</literal></term>
+<listitem><simpara>          Comment (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-DATE-ADDED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_DATE_ADDED</literal></term>
+<listitem><simpara>       Date added (integer, e.g.
+                                 from/to = bcfa83ff == is after 6/19/2004)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-COMPOSER:CAPS" role="constant"/><literal>ITDB_SPLFIELD_COMPOSER</literal></term>
+<listitem><simpara>         Composer (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-PLAYCOUNT:CAPS" role="constant"/><literal>ITDB_SPLFIELD_PLAYCOUNT</literal></term>
+<listitem><simpara>        Playcount (integer, e.g. from/to = 1)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-LAST-PLAYED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_LAST_PLAYED</literal></term>
+<listitem><simpara>      Date last played (integer, e.g.
+                                 from = bcfa83ff (6/19/2004)
+                                 to = 0xbcfbd57f (6/20/2004))
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-DISC-NUMBER:CAPS" role="constant"/><literal>ITDB_SPLFIELD_DISC_NUMBER</literal></term>
+<listitem><simpara>      Disc number (integer, e.g. from/to = 1)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-RATING:CAPS" role="constant"/><literal>ITDB_SPLFIELD_RATING</literal></term>
+<listitem><simpara>           Rating (integer, e.g.
+                                 from/to = 60 (3 stars))
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-COMPILATION:CAPS" role="constant"/><literal>ITDB_SPLFIELD_COMPILATION</literal></term>
+<listitem><simpara>      Compilation (integer, e.g.
+                                 is set -> ITDB_SPLACTION_IS_INT/from=1,
+                                 not set -> ITDB_SPLACTION_IS_NOT_INT/from=1)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-BPM:CAPS" role="constant"/><literal>ITDB_SPLFIELD_BPM</literal></term>
+<listitem><simpara>              Beats per minute (integer, e.g.
+                                 from/to = 60)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-GROUPING:CAPS" role="constant"/><literal>ITDB_SPLFIELD_GROUPING</literal></term>
+<listitem><simpara>         Grouping (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-PLAYLIST:CAPS" role="constant"/><literal>ITDB_SPLFIELD_PLAYLIST</literal></term>
+<listitem><simpara>         FIXME Unknown...not parsed correctly...
+                                 from/to = 0xb6fbad5f for "Purchased Music".
+                                 Extra data after "to"...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-VIDEO-KIND:CAPS" role="constant"/><literal>ITDB_SPLFIELD_VIDEO_KIND</literal></term>
+<listitem><simpara>       Logical integer (works on mediatype)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-TVSHOW:CAPS" role="constant"/><literal>ITDB_SPLFIELD_TVSHOW</literal></term>
+<listitem><simpara>           TV Show (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SEASON-NR:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SEASON_NR</literal></term>
+<listitem><simpara>        Season number (integer)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SKIPCOUNT:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SKIPCOUNT</literal></term>
+<listitem><simpara>        Skipcount (integer)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-LAST-SKIPPED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_LAST_SKIPPED</literal></term>
+<listitem><simpara>     Last skipped (integer)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-ALBUMARTIST:CAPS" role="constant"/><literal>ITDB_SPLFIELD_ALBUMARTIST</literal></term>
+<listitem><simpara>      Album artist (string)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ItdbSPLFieldType" role="enum"/>enum ItdbSPLFieldType</title>
-<indexterm><primary>ItdbSPLFieldType</primary></indexterm><programlisting>typedef enum
+<title><anchor id="ItdbSPLFieldType" role="enum" condition="since:0.5.0"/>enum ItdbSPLFieldType</title>
+<indexterm role="0.5.0"><primary>ItdbSPLFieldType</primary></indexterm><programlisting>typedef enum
 {
     ITDB_SPLFT_STRING = 1,
     ITDB_SPLFT_INT,
@@ -314,32 +963,90 @@
 } ItdbSPLFieldType;
 </programlisting>
 <para>
+Smart Playlist Field Types</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-STRING:CAPS" role="constant"/><literal>ITDB_SPLFT_STRING</literal></term>
+<listitem><simpara>      string
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-INT:CAPS" role="constant"/><literal>ITDB_SPLFT_INT</literal></term>
+<listitem><simpara>         integer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-BOOLEAN:CAPS" role="constant"/><literal>ITDB_SPLFT_BOOLEAN</literal></term>
+<listitem><simpara>     boolean
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-DATE:CAPS" role="constant"/><literal>ITDB_SPLFT_DATE</literal></term>
+<listitem><simpara>        date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-PLAYLIST:CAPS" role="constant"/><literal>ITDB_SPLFT_PLAYLIST</literal></term>
+<listitem><simpara>    playlist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-UNKNOWN:CAPS" role="constant"/><literal>ITDB_SPLFT_UNKNOWN</literal></term>
+<listitem><simpara>     unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-BINARY-AND:CAPS" role="constant"/><literal>ITDB_SPLFT_BINARY_AND</literal></term>
+<listitem><simpara>  binary AND
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
 <title><anchor id="ItdbSPLMatch" role="enum"/>enum ItdbSPLMatch</title>
-<indexterm><primary>ItdbSPLMatch</primary></indexterm><programlisting>typedef enum { /* types for match_operator */
-    ITDB_SPLMATCH_AND = 0, /* AND rule - all of the rules must be true in
-			 order for the combined rule to be applied */
-    ITDB_SPLMATCH_OR = 1   /* OR rule */
+<indexterm><primary>ItdbSPLMatch</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLMATCH_AND = 0,
+    ITDB_SPLMATCH_OR = 1
 } ItdbSPLMatch;
 </programlisting>
 <para>
+Types for smart playlist rules match_operator</para>
+<para>
 
-</para></refsect2>
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLMATCH-AND:CAPS" role="constant"/><literal>ITDB_SPLMATCH_AND</literal></term>
+<listitem><simpara> Logical AND - all of the rules must be true in order for
+                    the combined rule to be applied
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLMATCH-OR:CAPS" role="constant"/><literal>ITDB_SPLMATCH_OR</literal></term>
+<listitem><simpara>  Logical OR - any of the rules may be true
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
 <refsect2>
-<title><anchor id="ITDB-SPL-DATE-IDENTIFIER:CAPS" role="macro"/>ITDB_SPL_DATE_IDENTIFIER</title>
-<indexterm><primary>ITDB_SPL_DATE_IDENTIFIER</primary></indexterm><programlisting>#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
+<title><anchor id="ITDB-SPL-DATE-IDENTIFIER:CAPS" role="macro" condition="since:0.5.0"/>ITDB_SPL_DATE_IDENTIFIER</title>
+<indexterm role="0.5.0"><primary>ITDB_SPL_DATE_IDENTIFIER</primary></indexterm><programlisting>#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
 </programlisting>
 <para>
+Identifier for smart playlist date fields</para>
+<para>
 
+</para><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
-<title><anchor id="ITDB-SPL-STRING-MAXLEN:CAPS" role="macro"/>ITDB_SPL_STRING_MAXLEN</title>
-<indexterm><primary>ITDB_SPL_STRING_MAXLEN</primary></indexterm><programlisting>#define ITDB_SPL_STRING_MAXLEN 255
+<title><anchor id="ITDB-SPL-STRING-MAXLEN:CAPS" role="macro" condition="since:0.5.0"/>ITDB_SPL_STRING_MAXLEN</title>
+<indexterm role="0.5.0"><primary>ITDB_SPL_STRING_MAXLEN</primary></indexterm><programlisting>#define ITDB_SPL_STRING_MAXLEN 255
 </programlisting>
 <para>
+Maximum string length for smart playlists</para>
+<para>
 
+</para><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
 <title><anchor id="itdb-splr-get-field-type" role="function"/>itdb_splr_get_field_type ()</title>
@@ -352,8 +1059,8 @@
 <varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an <link linkend="Itdb-SPLFieldType"><type>Itdb_SPLFieldType</type></link> corresponding to <parameter>splr</parameter> field type 
-(string, int, date, ...)
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an <link linkend="Itdb-SPLFieldType"><type>Itdb_SPLFieldType</type></link> corresponding to <parameter>splr</parameter> field
+type (string, int, date, ...)
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -367,14 +1074,14 @@
 <varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> type (range, date, string...) of the action field 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> type (range, date, string...) of the action field
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
 <title><anchor id="itdb-splr-validate" role="function"/>itdb_splr_validate ()</title>
 <indexterm><primary>itdb_splr_validate</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_splr_validate                  (<link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);</programlisting>
 <para>
-Validates a rule</para>
+Validates a smart playlist rule</para>
 <para>
 
 </para><variablelist role="params">
@@ -387,8 +1094,8 @@
 <indexterm><primary>itdb_splr_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_splr_remove                    (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
                                                          <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);</programlisting>
 <para>
-Removes the smart playlist rule <parameter>splr</parameter> from playlist <parameter>pl</parameter>. The memory used by
-<parameter>splr</parameter> is freed.</para>
+Removes the smart playlist rule <parameter>splr</parameter> from playlist <parameter>pl</parameter>. The memory
+used by <parameter>splr</parameter> is freed.</para>
 <para>
 
 </para><variablelist role="params">
@@ -407,7 +1114,7 @@
 <para>
 
 </para><variablelist role="params">
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link> that must be freed with <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link> when 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link> that must be freed with <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link> when
 no longer needed
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
@@ -417,20 +1124,20 @@
                                                          <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr,
                                                          <link linkend="gint">gint</link> pos);</programlisting>
 <para>
-Adds the smart rule <parameter>splr</parameter> to <parameter>pl</parameter> at position <parameter>pos</parameter>. If <parameter>pos</parameter> is -1, <parameter>splr</parameter> gets
-appended to the end. After this call, <parameter>splr</parameter> memory is managed by <parameter>pl</parameter>, so 
-you no longer need to call <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link></para>
+Adds the smart rule <parameter>splr</parameter> to <parameter>pl</parameter> at position <parameter>pos</parameter>. If <parameter>pos</parameter> is -1,
+<parameter>splr</parameter> gets appended to the end. After this call, <parameter>splr</parameter> memory is
+managed by <parameter>pl</parameter>, so you no longer need to call <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+<listitem><simpara>   an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> position of the rule
+<listitem><simpara>    position of the rule
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -438,19 +1145,20 @@
 <indexterm><primary>itdb_splr_add_new</primary></indexterm><programlisting><link linkend="Itdb-SPLRule">Itdb_SPLRule</link>*       itdb_splr_add_new                   (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
                                                          <link linkend="gint">gint</link> pos);</programlisting>
 <para>
-Creates a new smart rule and inserts it at position <parameter>pos</parameter> in <parameter>pl</parameter>. If <parameter>pos</parameter> is
--1, the new rule gets appended to the end.</para>
+Creates a new smart rule and inserts it at position <parameter>pos</parameter> in <parameter>pl</parameter>. If
+<parameter>pos</parameter> is -1, the new rule gets appended to the end.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> position to insert the rule at
+<listitem><simpara>    position to insert the rule at
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to the newly created <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>. Its memory is handled 
-by <parameter>pl</parameter> though, so you don't need to explicitly call <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link> on it
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to the newly created <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>. Its
+memory is handled by <parameter>pl</parameter> though, so you don't need to explicitly
+call <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link> on it
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -459,16 +1167,16 @@
                                                          <link linkend="Itdb-Playlist">Itdb_Playlist</link> *src);</programlisting>
 <para>
 Copy all relevant information for smart playlist from playlist <parameter>src</parameter>
-to playlist <parameter>dest</parameter>. If <parameter>dest</parameter> is already a smart playlist, the existing data
-is overwritten/deleted.</para>
+to playlist <parameter>dest</parameter>. If <parameter>dest</parameter> is already a smart playlist, the
+existing data is overwritten/deleted.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
-<listitem><simpara> destination <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>   destination <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>src</parameter>&nbsp;:</term>
-<listitem><simpara> source <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+<listitem><simpara>    source <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -476,15 +1184,15 @@
 <indexterm><primary>itdb_splr_eval</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_splr_eval                      (<link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr,
                                                          <link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
 <para>
-Evaluates <parameter>splr</parameter>'s truth against <parameter>track</parameter>. track-&gt;itdb must be set.</para>
+Evaluates <parameter>splr</parameter>'s truth against <parameter>track</parameter>. <parameter>track->itdb</parameter> must be set.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+<listitem><simpara>   an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>track</parameter> matches <parameter>splr</parameter>, FALSE otherwise.
 </simpara></listitem></varlistentry>
@@ -493,10 +1201,11 @@
 <title><anchor id="itdb-spl-update" role="function"/>itdb_spl_update ()</title>
 <indexterm><primary>itdb_spl_update</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_update                     (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *spl);</programlisting>
 <para>
-Updates the content of the smart playlist <parameter>spl</parameter> (meant to be called if the 
-tracks stored in the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> associated with <parameter>spl</parameter> have changed 
-somehow and you want spl-&gt;members to be accurate with regards to those 
-changes. Does nothing if <parameter>spl</parameter> isn't a smart playlist.</para>
+Updates the content of the smart playlist <parameter>spl</parameter> (meant to be called
+if the tracks stored in the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> associated with <parameter>spl</parameter>
+have changed somehow and you want <parameter>spl->members</parameter> to be accurate
+with regards to those changes. Does nothing if <parameter>spl</parameter> isn't a smart
+playlist.</para>
 <para>
 
 </para><variablelist role="params">
@@ -517,18 +1226,19 @@
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-spl-update-live" role="function"/>itdb_spl_update_live ()</title>
-<indexterm><primary>itdb_spl_update_live</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_update_live                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<title><anchor id="itdb-spl-update-live" role="function" condition="since:0.2.0"/>itdb_spl_update_live ()</title>
+<indexterm role="0.2.0"><primary>itdb_spl_update_live</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_update_live                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
 <para>
-Updates all 'live' smart playlists contained in <parameter>itdb</parameter>, ie those which have 
-the 'live updating' flag set</para>
+Updates all smart playlists contained in <parameter>itdb</parameter> which have the
+<parameter>liveupdate</parameter> flag set.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.2.0
+</para></refsect2>
 
 </refsect1>
 
@@ -541,4 +1251,6 @@
 </para>
 </refsect1>
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/track.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/track.xml	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/docs/reference/xml/track.xml	2009-01-24 12:10:00 UTC (rev 341)
@@ -38,6 +38,10 @@
 <link linkend="void">void</link>                <link linkend="itdb-track-id-tree-destroy">itdb_track_id_tree_destroy</link>          (<link linkend="GTree">GTree</link> *idtree);
 <link linkend="Itdb-Track">Itdb_Track</link>*         <link linkend="itdb-track-id-tree-by-id">itdb_track_id_tree_by_id</link>            (<link linkend="GTree">GTree</link> *idtree,
                                                          <link linkend="guint32">guint32</link> id);
+<link linkend="gpointer">gpointer</link>            <link linkend="itdb-track-get-thumbnail">itdb_track_get_thumbnail</link>            (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-has-thumbnails">itdb_track_has_thumbnails</link>           (<link linkend="Itdb-Track">Itdb_Track</link> *track);
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-set-thumbnails">itdb_track_set_thumbnails</link>           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          const <link linkend="gchar">gchar</link> *filename);
 <link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-set-thumbnails-from-data">itdb_track_set_thumbnails_from_data</link> (<link linkend="Itdb-Track">Itdb_Track</link> *track,
@@ -71,29 +75,28 @@
 <refsect2>
 <title><anchor id="Itdb-Track" role="struct"/>Itdb_Track</title>
 <indexterm><primary>Itdb_Track</primary></indexterm><programlisting>typedef struct {
-  Itdb_iTunesDB *itdb;       /* pointer to iTunesDB (for convenience)   */
-  gchar   *title;            /* title (utf8)                            */
-  gchar   *ipod_path;        /* name of file on iPod: uses ":" instead
-				of "/" and is relative to mountpoint    */
-  gchar   *album;            /* album (utf8)                            */
-  gchar   *artist;           /* artist (utf8)                           */
-  gchar   *genre;            /* genre (utf8)                            */
-  gchar   *filetype;         /* eg. "MP3-File"...(utf8)                 */
-  gchar   *comment;          /* comment (utf8)                          */
-  gchar   *category;         /* Category for podcast                    */
-  gchar   *composer;         /* Composer (utf8)                         */
-  gchar   *grouping;         /* ? (utf8)                                */
-  gchar   *description;      /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *podcasturl;       /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *podcastrss;       /* see note for MHOD_ID in itdb_itunesdb.c */
-  gpointer chapterdata;      /* not yet supported. Help welcome.        */
-  gchar   *subtitle;         /* see note for MHOD_ID in itdb_itunesdb.c */
-/* the following 6 are new in libgpod 0.4.2... */
-  gchar   *tvshow;           /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *tvepisode;        /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *tvnetwork;        /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *albumartist;      /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *keywords;         /* see note for MHOD_ID in itdb_itunesdb.c */
+  Itdb_iTunesDB *itdb;
+  gchar   *title;
+  gchar   *ipod_path;
+  gchar   *album;
+  gchar   *artist;
+  gchar   *genre;
+  gchar   *filetype;
+  gchar   *comment;
+  gchar   *category;
+  gchar   *composer;
+  gchar   *grouping;
+  gchar   *description;
+  gchar   *podcasturl;
+  gchar   *podcastrss;
+  Itdb_Chapterdata *chapterdata;
+  gchar   *subtitle;
+/* the following 5 are new in libgpod 0.4.2... */
+  gchar   *tvshow;
+  gchar   *tvepisode;
+  gchar   *tvnetwork;
+  gchar   *albumartist;
+  gchar   *keywords;
 /* the following 6 are new in libgpod 0.5.0... */
   /* You can set these strings to override the standard
      sortorder. When set they take precedence over the default
@@ -108,205 +111,93 @@
      the lists displayed by the iPod according to "Artist, The",
      without setting the field.
   */
-  gchar   *sort_artist;      /* artist (for sorting)                    */
-  gchar   *sort_title;       /* title (for sorting)                     */
-  gchar   *sort_album;       /* album (for sorting)                     */
-  gchar   *sort_albumartist; /* album artist (for sorting)              */
-  gchar   *sort_composer;    /* composer (for sorting)                  */
-  gchar   *sort_tvshow;      /* tv show (for sorting)                   */
-/* new fields in libgpod 0.5.0 up to here */
-  guint32 id;                /* unique ID of track                      */
-  gint32  size;              /* size of file in bytes                   */
-  gint32  tracklen;          /* Length of track in ms                   */
-  gint32  cd_nr;             /* CD number                               */
-  gint32  cds;               /* number of CDs                           */
-  gint32  track_nr;          /* track number                            */
-  gint32  tracks;            /* number of tracks                        */
-  gint32  bitrate;           /* bitrate                                 */
-  guint16 samplerate;        /* samplerate (CD: 44100)                  */
-  guint16 samplerate_low;    /* in the iTunesDB the samplerate is
-                                multiplied by 0x10000 -- these are the
-				lower 16 bit, which are usually 0       */
-  gint32  year;              /* year                                    */
-  gint32  volume;            /* volume adjustment                       */
-  guint32 soundcheck;        /* volume adjustment "soundcheck"          */
-  time_t  time_added;        /* time when added                         */
-  time_t  time_modified;     /* time of last modification               */
-  time_t  time_played;       /* time of last play                       */
-  guint32 bookmark_time;     /* bookmark set for (AudioBook) in ms      */
-  guint32 rating;            /* star rating (stars * RATING_STEP (20))  */
-  guint32 playcount;         /* number of times track was played        */
-  guint32 playcount2;        /* Also stores the play count of the
-				song.  Don't know if it ever differs
-				from the above value. During sync itdb
-				sets playcount2 to the same value as
-				playcount.                              */
-  guint32 recent_playcount;  /* times track was played since last sync  */
-  gboolean transferred;      /* has file been transferred to iPod?      */
-  gint16  BPM;               /* BPM (beats per minute) of this track    */
-  guint8  app_rating;        /* star rating set by appl. (not
-			      * iPod). If the rating set on the iPod
-			        and the rating field above differ, the
-				original rating is copied here and the
-				new rating is stored above. */
-  guint8  type1;             /* CBR MP3s and AAC are 0x00, VBR MP3s are
-			        0x01                                    */
-  guint8  type2;             /* MP3s are 0x01, AAC are 0x00             */
+  gchar   *sort_artist;
+  gchar   *sort_title;
+  gchar   *sort_album;
+  gchar   *sort_albumartist;
+  gchar   *sort_composer;
+  gchar   *sort_tvshow;
+/* end of new fields in libgpod 0.5.0 */
+  guint32 id;
+  gint32  size;
+  gint32  tracklen;
+  gint32  cd_nr;
+  gint32  cds;
+  gint32  track_nr;
+  gint32  tracks;
+  gint32  bitrate;
+  guint16 samplerate;
+  guint16 samplerate_low;
+  gint32  year;
+  gint32  volume;
+  guint32 soundcheck;
+  time_t  time_added;
+  time_t  time_modified;
+  time_t  time_played;
+  guint32 bookmark_time;
+  guint32 rating;
+  guint32 playcount;
+  guint32 playcount2;
+  guint32 recent_playcount;
+  gboolean transferred;
+  gint16  BPM;
+  guint8  app_rating;
+  guint8  type1;
+  guint8  type2;
   guint8  compilation;
   guint32 starttime;
   guint32 stoptime;
-  guint8  checked;           /* 0x0: checkmark on track is set 0x1: not set */
-  guint64 dbid;              /* unique database ID                      */
-  guint32 drm_userid;        /* Apple Store/Audible User ID (for DRM'ed
-				files only, set to 0 otherwise).        */
-  guint32 visible;           /*  If this value is 1, the song is visible
-				 on the iPod. All other values cause
-				 the file to be hidden.                 */
-  guint32 filetype_marker;   /* This appears to always be 0 on hard
-                                drive based iPods, but for the
-                                iTunesDB that is written to an iPod
-                                Shuffle, iTunes 4.7.1 writes out the
-                                file's type as an ANSI string(!). For
-                                example, a MP3 file has a filetype of
-                                0x4d503320 -&gt; 0x4d = 'M', 0x50 = 'P',
-                                0x33 = '3', 0x20 = &lt;space&gt;. (set to
-				the filename extension by itdb when
-				copying track to iPod)                  */
-  guint16 artwork_count;     /* The number of album artwork items
-				associated with this song. libgpod
-				updates this value when syncing */
-  guint32 artwork_size;      /* The total size of artwork (in bytes)
-				attached to this song, when it is
-				converted to JPEG format. Observed in
-				iPodDB version 0x0b and with an iPod
-				Photo. libgpod updates this value when
-				syncing                                 */
-  float samplerate2;         /* The sample rate of the song expressed
-				as an IEEE 32 bit floating point
-				number.  It's uncertain why this is
-				here.  itdb will set this when adding
-				a track                                 */
-
-  guint16 unk126;     /* unknown, but always seems to be 0xffff for
-			 MP3/AAC songs, 0x0 for uncompressed songs
-			 (like WAVE format), 0x1 for Audible. itdb
-			 will try to set this when adding a new track */
-  guint32 unk132;     /* unknown */
-  time_t  time_released;/* date/time added to music store? 
-			   For podcasts: release date as displayed next to the 
-			   title in the Podcast playlist */
-  guint16 unk144;     /* unknown, but MP3 songs appear to be always
-			 0x000c, AAC songs are always 0x0033, Audible
-			 files are 0x0029, WAV files are 0x0. itdb
-			 will attempt to set this value when adding a
-			 track. */ 
-  guint16 unk146;     /* unknown, but appears to be 1 if played at
-			 least once in iTunes and 0 otherwise. */
-  guint32 unk148;     /* unknown - used for Apple Store DRM songs
-			 (always 0x01010100?), zero otherwise */
-  guint32 unk152;     /* unknown */
-  guint32 skipcount;  /* Number of times the track has been skipped.
-			 Formerly unk156 (added in dbversion 0x0c) */
-  guint32 recent_skipcount; /* number of times track was skipped since
-			       last sync */
-  guint32 last_skipped;/* Date/time last skipped. Formerly unk160
-			 (added in dbversion 0x0c) */
-  guint8 has_artwork; /* 0x01: artwork is present. 0x02: no artwork is
-			 present for this track (used by the iPod to
-			 decide whether to display Artwork or not) */
-  guint8 skip_when_shuffling;/* "Skip when shuffling" when set to
-			 0x01, set to 0x00 otherwise. .m4b and .aa
-			 files always seem to be skipped when
-			 shuffling, however */
-  guint8 remember_playback_position;/* "Remember playback position"
-			 when set to 0x01, set to 0x00 otherwise. .m4b
-			 and .aa files always seem to remember the
-			 playback position, however. */
-  guint8 flag4;       /* Used for podcasts, 0x00 otherwise.  If set to
-			 0x01 the "Now Playing" page will show
-			 Title/Album, when set to 0x00 it will also
-			 show the Artist. When set to 0x02 a sub-page
-			 (middle button) with further information
-			 about the track will be shown. */
-  guint64 dbid2;      /* not clear. if not set, itdb will set this to
-			 the same value as dbid when adding a
-			 track. (With iTunes, since V0x12, this field
-			 value differs from the dbid one.) */
-  guint8 lyrics_flag; /* set to 0x01 if lyrics are present in MP3 tag
-			 ("ULST"), 0x00 otherwise */
-  guint8 movie_flag;  /* set to 0x01 if it's a movie file, 0x00
-		         otherwise */
-  guint8 mark_unplayed; /* A value of 0x02 marks a podcast as unplayed
-			   on the iPod (bullet) once played it is set to
-			   0x01. Non-podcasts have this set to 0x01. */
-  guint8 unk179;      /* unknown (always 0x00 so far) */
+  guint8  checked;
+  guint64 dbid;
+  guint32 drm_userid;
+  guint32 visible;
+  guint32 filetype_marker;
+  guint16 artwork_count;
+  guint32 artwork_size;
+  float samplerate2;
+  guint16 unk126;
+  guint32 unk132;
+  time_t  time_released;
+  guint16 unk144;
+  guint16 explicit_flag;
+  guint32 unk148;
+  guint32 unk152;
+  guint32 skipcount;
+  guint32 recent_skipcount;
+  guint32 last_skipped;
+  guint8 has_artwork;
+  guint8 skip_when_shuffling;
+  guint8 remember_playback_position;
+  guint8 flag4;
+  guint64 dbid2;
+  guint8 lyrics_flag;
+  guint8 movie_flag;
+  guint8 mark_unplayed;
+  guint8 unk179;
   guint32 unk180;
-  guint32 pregap;     /* Number of samples of silence before the songs
-			 starts (for gapless playback). */
-  guint64 samplecount;/* Number of samples in the song. First observed
-			 in dbversion 0x0d, and only for AAC and WAV
-			 files (for gapless playback). */
+  guint32 pregap;
+  guint64 samplecount;
   guint32 unk196;
-  guint32 postgap;    /* Number of samples of silence at the end of
-			 the song (for gapless playback). */
-  guint32 unk204;     /* unknown - added in dbversion 0x0c, first
-			 values observed in 0x0d. Observed to be 0x0
-			 or 0x1. */
-  guint32 mediatype;  /* It seems that this field denotes the type of
-		         the file on (e.g.) the 5g video iPod. It must
-			 be set to 0x00000001 for audio files, and set
-			 to 0x00000002 for video files. If set to
-			 0x00, the files show up in both, the audio
-			 menus ("Songs", "Artists", etc.) and the
-			 video menus ("Movies", "Music Videos",
-			 etc.). It appears to be set to 0x20 for music
-			 videos, and if set to 0x60 the file shows up
-			 in "TV Shows" rather than "Movies". 
-
-			 The following list summarizes all observed types:
-
-			 * 0x00 00 00 00 - Audio/Video
-			 * 0x00 00 00 01 - Audio
-			 * 0x00 00 00 02 - Video
-			 * 0x00 00 00 04 - Podcast
-			 * 0x00 00 00 06 - Video Podcast
-			 * 0x00 00 00 08 - Audiobook
-			 * 0x00 00 00 20 - Music Video
-			 * 0x00 00 00 40 - TV Show (shows up ONLY in TV Shows
-			 * 0x00 00 00 60 - TV Show (shows up in the
-			                            Music lists as well) */
-  guint32 season_nr;  /* the season number of the track, for TV shows only. */
-  guint32 episode_nr; /* the episode number of the track, for TV shows
-			 only - although not displayed on the iPod,
-			 the episodes are sorted by episode number. */
-  guint32 unk220;     /* Has something to do with protected files -
-			 set to 0x0 for non-protected files. */
+  guint32 postgap;
+  guint32 unk204;
+  guint32 mediatype;
+  guint32 season_nr;
+  guint32 episode_nr;
+  guint32 unk220;
   guint32 unk224;
   guint32 unk228, unk232, unk236, unk240, unk244;
-  guint32 gapless_data;/* some magic number needed for gapless playback
-			  (added in dbversion 0x13) It has been observed
-			  that gapless playback does not work if this is
-			  set to zero. This number is related to the the
-			  filesize in bytes, but it is a couple of bytes
-			  less than the filesize. Maybe ID3 tags
-			  etc... taken off? */
+  guint32 gapless_data;
   guint32 unk252;
-  guint16 gapless_track_flag; /* if 1, this track has gapless playback data
-			         (added in dbversion 0x13) */
-  guint16 gapless_album_flag; /* if 1, this track does not use crossfading
-			         in iTunes (added in dbversion 0x13) */
+  guint16 gapless_track_flag;
+  guint16 gapless_album_flag;
+  guint16 album_id;
 
-    /* Chapter data: defines where the chapter stops are in the track,
-       as well as what info should be displayed for each section of
-       the track. Until it can be parsed and interpreted, the
-       chapterdata will just be read as a block and written back on
-       sync. This will be changed at a later time */
-  void *chapterdata_raw;
-  guint32 chapterdata_raw_length;
-
   /* This is for Cover Art support */
   struct _Itdb_Artwork *artwork;
 
+  /* This is for sparse artwork support, new in libgpod-0.7.0 */
+  guint32 mhii_link;
+
   /* reserved for future use */
   gint32 reserved_int1;
   gint32 reserved_int2;
@@ -335,11 +226,802 @@
 } Itdb_Track;
 </programlisting>
 <para>
+Structure representing a track in an iTunesDB
+</para>
+<para>
+<note><para>When adding string fields don't forget to add them in
+<link linkend="itdb-track-duplicate"><function>itdb_track_duplicate()</function></link> as well.</para></note>
+</para>
+<para>
+Many of the parameter descriptions are copied verbatim from
+http://ipodlinux.org/ITunesDB, which is the best source for information about
+the iTunesDB and related files.</para>
+<para>
 
-</para></refsect2>
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>&nbsp;*<structfield>itdb</structfield>;</term>
+<listitem><simpara>                       A pointer to the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> (for convenience)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>title</structfield>;</term>
+<listitem><simpara>                      The title of the track in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>ipod_path</structfield>;</term>
+<listitem><simpara>                  The file path on the iPod.  Directories are
+                             separated with ":" instead of "/".  The path is
+                             relative to the iPod mountpoint.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>album</structfield>;</term>
+<listitem><simpara>                      The album name in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>artist</structfield>;</term>
+<listitem><simpara>                     The artist name in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>genre</structfield>;</term>
+<listitem><simpara>                      The genre in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>filetype</structfield>;</term>
+<listitem><simpara>                   A UTF8 string describing the file type.  E.g.
+                             "MP3-File".
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>comment</structfield>;</term>
+<listitem><simpara>                    A comment in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>category</structfield>;</term>
+<listitem><simpara>                   The category ("Technology", "Music", etc.)
+                             where the podcast was located.  (Added in
+                             dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>composer</structfield>;</term>
+<listitem><simpara>                   The composer name in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>grouping</structfield>;</term>
+<listitem><simpara>                   ??? (UTF8)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>description</structfield>;</term>
+<listitem><simpara>                Description text (such as podcast show notes).
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>podcasturl</structfield>;</term>
+<listitem><simpara>                 Podcast Enclosure URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>podcastrss</structfield>;</term>
+<listitem><simpara>                 Podcast RSS URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>&nbsp;*<structfield>chapterdata</structfield>;</term>
+<listitem><simpara>                This is an m4a-style entry that is used to
+                             display subsongs within a mhit.  (Added in
+                             dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>subtitle</structfield>;</term>
+<listitem><simpara>                   Subtitle (usually the same as Description).
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>tvshow</structfield>;</term>
+<listitem><simpara>                     Name of the TV show (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>tvepisode</structfield>;</term>
+<listitem><simpara>                  The episode number (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>tvnetwork</structfield>;</term>
+<listitem><simpara>                  The TV network (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>albumartist</structfield>;</term>
+<listitem><simpara>                The album artist (Added in dbversion 0x13?)
+                             (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>keywords</structfield>;</term>
+<listitem><simpara>                   List of keywords pertaining to the track.
+                             (Added in dbversion 0x13?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_artist</structfield>;</term>
+<listitem><simpara>                The artist name used for sorting.  Artists with
+                             names like "The Artist" would have "Artist,
+                             The" here.  If you do not set this field,
+                             libgpod will pre-sort the lists displayed by
+                             the iPod according to "Artist, The", without
+                             setting this field.
+                             (Added in dbversion 0x13?) (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_title</structfield>;</term>
+<listitem><simpara>                 The track title used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_album</structfield>;</term>
+<listitem><simpara>                 The album name used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_albumartist</structfield>;</term>
+<listitem><simpara>           The album artist used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_composer</structfield>;</term>
+<listitem><simpara>              The composer used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_tvshow</structfield>;</term>
+<listitem><simpara>                The name of the TV show used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                         Unique ID of track
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>size</structfield>;</term>
+<listitem><simpara>                       The size of the file in bytes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>tracklen</structfield>;</term>
+<listitem><simpara>                   The length of the track in ms
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>cd_nr</structfield>;</term>
+<listitem><simpara>                      The CD number the track comes from.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>cds</structfield>;</term>
+<listitem><simpara>                        The total number of CDs.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>track_nr</structfield>;</term>
+<listitem><simpara>                   The track number.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>tracks</structfield>;</term>
+<listitem><simpara>                     The total number of tracks.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>bitrate</structfield>;</term>
+<listitem><simpara>                    The bitrate at which the file is encoded.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>samplerate</structfield>;</term>
+<listitem><simpara>                 The samplerate of the track (e.g. CD = 44100)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>samplerate_low</structfield>;</term>
+<listitem><simpara>             In the iTunesDB the samplerate is
+                             multiplied by 0x10000 -- these are the
+                             lower 16 bit, which are usually 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>year</structfield>;</term>
+<listitem><simpara>                       The year the track was released
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>volume</structfield>;</term>
+<listitem><simpara>                     Volume adjustment field.  This is a value from
+                             -255 to 255 that will be applied to the track
+                             on playback.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>soundcheck</structfield>;</term>
+<listitem><simpara>                 The SoundCheck value to apply to the song, when
+                             SoundCheck is switched on in the iPod settings.
+                             The value for this field can be determined by
+                             the equation: X = 1000 * 10 ^ (-.1 * Y) where Y
+                             is the adjustment value in dB and X is the
+                             value that goes into the SoundCheck field. The
+                             value 0 is special, the equation is not used
+                             and it is treated as "no Soundcheck" (basically
+                             the same as the value 1000). This equation
+                             works perfectly well with ReplayGain derived
+                             data instead of the iTunes SoundCheck derived
+                             information.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_added</structfield>;</term>
+<listitem><simpara>                 The time the track was added.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_modified</structfield>;</term>
+<listitem><simpara>              The time the track was last modified
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_played</structfield>;</term>
+<listitem><simpara>                The time the track was last played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>bookmark_time</structfield>;</term>
+<listitem><simpara>              The time, in milliseconds, that the track will
+                             start playing at. This is used for AudioBook
+                             filetypes (.aa and .m4b).  Note that there is
+                             also a bookmark value in the play counts file
+                             that will be set by the iPod and can be used
+                             instead of this value.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>rating</structfield>;</term>
+<listitem><simpara>                     The track rating (stars * <link linkend="ITDB-RATING-STEP:CAPS"><type>ITDB_RATING_STEP</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>playcount</structfield>;</term>
+<listitem><simpara>                  The number of times the track has been played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>playcount2</structfield>;</term>
+<listitem><simpara>                 This also stores the play count of the
+                             track.  It is unclear if this ever differs
+                             from the above value. During sync, this is set
+                             to the same value as <parameter>playcount</parameter>.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>recent_playcount</structfield>;</term>
+<listitem><simpara>           The number of times the track was played since
+                             the last sync.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>transferred</structfield>;</term>
+<listitem><simpara>                Whether the file been transferred to iPod.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint16">gint16</link>&nbsp;<structfield>BPM</structfield>;</term>
+<listitem><simpara>                        BPM (beats per minute) of the track
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>app_rating</structfield>;</term>
+<listitem><simpara>                 The last rating set by an application (e.g.
+                             iTunes).  If the rating on the iPod and the
+                             <parameter>rating</parameter> field above differ, the original
+                             rating is copied here and the new rating is
+                             stored in <parameter>rating</parameter>.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>type1</structfield>;</term>
+<listitem><simpara>                      CBR MP3s and AAC are 0x00, VBR MP3s are 0x01
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>type2</structfield>;</term>
+<listitem><simpara>                      MP3s are 0x01, AAC are 0x00
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>compilation</structfield>;</term>
+<listitem><simpara>                Flag to mark the track as a compilation.  True
+                             if set to 0x1, false if set to 0x0.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>starttime</structfield>;</term>
+<listitem><simpara>                  The time, in milliseconds, at which the song
+                             will start playing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>stoptime</structfield>;</term>
+<listitem><simpara>                   The time, in milliseconds, at which the song
+                             will stop playing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>checked</structfield>;</term>
+<listitem><simpara>                    Flag for whether the track is checked.  True if
+                             set to 0x0, false if set to 0x1
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>dbid</structfield>;</term>
+<listitem><simpara>                       Unique database ID that identifies this song
+                             across the databases on the iPod. For example,
+                             this id joins an iTunesDB mhit with an
+                             ArtworkDB mhii.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>drm_userid</structfield>;</term>
+<listitem><simpara>                 Apple Store/Audible User ID (for DRM'ed files
+                             only, set to 0 otherwise).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>visible</structfield>;</term>
+<listitem><simpara>                    If this value is 1, the song is visible on the
+                             iPod. All other values cause the file to be
+                             hidden.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>filetype_marker</structfield>;</term>
+<listitem><simpara>            This appears to always be 0 on hard drive based
+                             iPods, but for the iTunesDB that is written to
+                             an iPod Shuffle, iTunes 4.7.1 writes out the
+                             file's type as an ANSI string(!). For example,
+                             a MP3 file has a filetype of 0x4d503320 ->
+                             0x4d = 'M', 0x50 = 'P', 0x33 = '3', 0x20 =
+                             &lt;space&gt;.  This is set to the filename
+                             extension by libgpod when copying the track to
+                             the iPod.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>artwork_count</structfield>;</term>
+<listitem><simpara>              The number of album artwork items associated
+                             with this song.  libgpod updates this value
+                             when syncing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>artwork_size</structfield>;</term>
+<listitem><simpara>               The total size of artwork (in bytes) attached
+                             to this song, when it is converted to JPEG
+                             format. Observed in dbversion 0x0b and with
+                             an iPod Photo. libgpod updates this value when
+                             syncing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="float">float</link>&nbsp;<structfield>samplerate2</structfield>;</term>
+<listitem><simpara>                The sample rate of the song expressed as an
+                             IEEE 32 bit floating point number.  It is
+                             uncertain why this is here.  libgpod will set
+                             this when adding a track.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>unk126</structfield>;</term>
+<listitem><simpara>                     Unknown, but always seems to be 0xffff for
+                             MP3/AAC songs, 0x0 for uncompressed songs
+                             (like WAVE format), 0x1 for Audible.  libgpod
+                             will try to set this when adding a new track.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk132</structfield>;</term>
+<listitem><simpara>                     Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_released</structfield>;</term>
+<listitem><simpara>              The date/time the track was added to the iTunes
+                             music store?  For podcasts this is the release
+                             date that is displayed next to the title in the
+                             Podcast playlist.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>unk144</structfield>;</term>
+<listitem><simpara>                     Unknown, but MP3 songs appear to be always
+                             0x000c, AAC songs are always 0x0033, Audible
+                             files are 0x0029, WAV files are 0x0.  libgpod
+                             will attempt to set this value when adding a
+                             track.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>explicit_flag</structfield>;</term>
+<listitem><simpara>              Flag to mark a track as "explicit" in iTunes.
+                             True if to 0x1, false if set to 0x0.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk148</structfield>;</term>
+<listitem><simpara>                     Unknown - used for Apple Store DRM songs
+                             (always 0x01010100?), zero otherwise
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk152</structfield>;</term>
+<listitem><simpara>                     Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>skipcount</structfield>;</term>
+<listitem><simpara>                  The number of times the track has been skipped.
+                             (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>recent_skipcount</structfield>;</term>
+<listitem><simpara>           The number of times the track was skipped since
+                             the last sync.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>last_skipped</structfield>;</term>
+<listitem><simpara>               The time the track was last skipped.  (Added in
+                             dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>has_artwork</structfield>;</term>
+<listitem><simpara>                Whether the track has artwork.
+                             True if set to 0x01, false if set to 0x02.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>skip_when_shuffling</structfield>;</term>
+<listitem><simpara>        Flag to skip the track when shuffling.  True if
+                             set to 0x01, false if set to 0x00. Audiobooks
+                             (.aa and .m4b) always seem to be skipped when
+                             shuffling, regardless of this flag.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>remember_playback_position</structfield>;</term>
+<listitem><simpara> Flag to remember playback position.
+                             True when set to 0x01, false when set to 0x00.
+                             Audiobooks (.aa and .m4b) always seem to
+                             remember the playback position, regardless of
+                             this flag.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag4</structfield>;</term>
+<listitem><simpara>                      Used for podcasts, 0x00 otherwise.  If set to
+                             0x01 the "Now Playing" page will show
+                             Title/Album, when set to 0x00 it will also show
+                             the Artist.  When set to 0x02 a sub-page
+                             (middle button) with further information about
+                             the track will be shown.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>dbid2</structfield>;</term>
+<listitem><simpara>                      The purpose of the field is unclear.  If not
+                             set, libgpod will set this to the same value as
+                             <parameter>dbid</parameter> when adding a track.  (With iTunes, since
+                             dbversion 0x12, this field value differs from
+                             <parameter>dbid</parameter>.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>lyrics_flag</structfield>;</term>
+<listitem><simpara>                Whether the track has lyrics (e.g. it has a
+                             USLT ID3 tag in an MP3 or a <parameter>lyr</parameter> atom in an
+                             MP4).  True if set to 0x01, false if set to
+                             0x00.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>movie_flag</structfield>;</term>
+<listitem><simpara>                 Whether the track is a movie.  True if set to
+                             0x01, false if set to 0x00.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>mark_unplayed</structfield>;</term>
+<listitem><simpara>              A value of 0x02 marks a podcast as unplayed on
+                             the iPod, with a bullet.  Once played it is set
+                             to 0x01. Non-podcasts have this set to 0x01.
+                             (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>unk179</structfield>;</term>
+<listitem><simpara>                     Unknown, always 0x00 so far.  (Added in
+                             dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk180</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>pregap</structfield>;</term>
+<listitem><simpara>                     The number of samples of silence before the
+                             track starts (for gapless playback).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>samplecount</structfield>;</term>
+<listitem><simpara>                The number of samples in the track (for gapless
+                             playback).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk196</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>postgap</structfield>;</term>
+<listitem><simpara>                    The number of samples of silence at the end of
+                             the track (for gapless playback).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk204</structfield>;</term>
+<listitem><simpara>                     Unknown.  Appears to be 0x1 for files encoded
+                             using the MP3 encoder, 0x0 otherwise.  (Added
+                             in dbversion 0x0c, first values observed in
+                             0x0d.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>mediatype</structfield>;</term>
+<listitem><simpara>                  The type of file.  It must be set to 0x00000001
+                             for audio files, and set to 0x00000002 for
+                             video files.  If set to 0x00, the files show up
+                             in both, the audio menus ("Songs", "Artists",
+                             etc.) and the video menus ("Movies", "Music
+                             Videos", etc.).  It appears to be set to 0x20
+                             for music videos, and if set to 0x60 the file
+                             shows up in "TV Shows" rather than "Movies".
+                             <para>
+                             The following list summarizes all observed types:
+                             </para>
+                             <itemizedlist>
+                             <listitem>0x00 00 00 00 - Audio/Video</listitem>
+                             <listitem>0x00 00 00 01 - Audio</listitem>
+                             <listitem>0x00 00 00 02 - Video</listitem>
+                             <listitem>0x00 00 00 04 - Podcast</listitem>
+                             <listitem>0x00 00 00 06 - Video Podcast</listitem>
+                             <listitem>0x00 00 00 08 - Audiobook</listitem>
+                             <listitem>0x00 00 00 20 - Music Video</listitem>
+                             <listitem>0x00 00 00 40 - TV Show (shows up ONLY
+                             in TV Shows)</listitem>
+                             <listitem>0x00 00 00 60 - TV Show (shows up in
+                             the Music lists as well)</listitem>
+                             </itemizedlist>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>season_nr</structfield>;</term>
+<listitem><simpara>                  The season number of the track (only used for
+                             TV Shows).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>episode_nr</structfield>;</term>
+<listitem><simpara>                 The episode number of the track (only used for
+                             TV Shows).  Although this is not displayed on
+                             the iPod, the episodes are sorted by episode
+                             number.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk220</structfield>;</term>
+<listitem><simpara>                     Unknown.  This has something to do with
+                             protected files.  It is set to 0x0 for
+                             non-protected files.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk224</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk228</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk232</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk236</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk240</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk244</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>gapless_data</structfield>;</term>
+<listitem><simpara>               The size in bytes from first Synch Frame
+                             (which is usually the XING frame that
+                             includes the LAME tag) until the 8th before
+                             the last frame. The gapless playback does not
+                             work for MP3 files if this is set to zero. For
+                             AAC tracks, this may be zero.  (Added in
+                             dbversion 0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk252</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>gapless_track_flag</structfield>;</term>
+<listitem><simpara>         If set to 1, this track has gapless playback
+                             data.  (Added in dbversion 0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>gapless_album_flag</structfield>;</term>
+<listitem><simpara>         If set to 1, this track does not use
+                             crossfading in iTunes.  (Added in dbversion
+                             0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>album_id</structfield>;</term>
+<listitem><simpara>                   The Album ID from the album list (currently
+                             unused by libgpod)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>struct&nbsp;<link linkend="Itdb-Artwork">_Itdb_Artwork</link>&nbsp;*<structfield>artwork</structfield>;</term>
+<listitem><simpara>                    An <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> for cover art
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>mhii_link</structfield>;</term>
+<listitem><simpara>                  This is set to the id of the corresponding
+                             ArtworkDB mhii, used for sparse artwork
+                             support.  (Since libgpod-0.7.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int3</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int4</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int5</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int6</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved3</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved4</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved5</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved6</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>                   For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>                   For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara>         A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>           A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
 <refsect2>
-<title><anchor id="Itdb-Mediatype" role="enum"/>enum Itdb_Mediatype</title>
-<indexterm><primary>Itdb_Mediatype</primary></indexterm><programlisting>typedef enum
+<title><anchor id="Itdb-Mediatype" role="enum" condition="since:0.5.0"/>enum Itdb_Mediatype</title>
+<indexterm role="0.5.0"><primary>Itdb_Mediatype</primary></indexterm><programlisting>typedef enum
 {
     ITDB_MEDIATYPE_AUDIO      = 0x0001,
     ITDB_MEDIATYPE_MOVIE      = 0x0002,
@@ -350,13 +1032,54 @@
 } Itdb_Mediatype;
 </programlisting>
 <para>
+Mediatype definitions
+</para>
+<para>
+The mediatype is used to determine what menu a track appears under.  For
+example, setting the mediatype to <link linkend="ITDB-MEDIATYPE-PODCAST:CAPS"><type>ITDB_MEDIATYPE_PODCAST</type></link> makes the track
+appear on the Podcast menu.</para>
+<para>
 
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-AUDIO:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_AUDIO</literal></term>
+<listitem><simpara>      Audio files
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-MOVIE:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_MOVIE</literal></term>
+<listitem><simpara>      Movies
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-PODCAST:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_PODCAST</literal></term>
+<listitem><simpara>    Podcasts
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-AUDIOBOOK:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_AUDIOBOOK</literal></term>
+<listitem><simpara>  Audio books
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-MUSICVIDEO:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_MUSICVIDEO</literal></term>
+<listitem><simpara> Music videos
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-TVSHOW:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_TVSHOW</literal></term>
+<listitem><simpara>     TV Shows
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
 </para></refsect2>
 <refsect2>
 <title><anchor id="ITDB-RATING-STEP:CAPS" role="macro"/>ITDB_RATING_STEP</title>
 <indexterm><primary>ITDB_RATING_STEP</primary></indexterm><programlisting>#define ITDB_RATING_STEP 20
 </programlisting>
 <para>
+The multiplier for each star in <link linkend="track-"><type>track-</type></link>>rating</para>
+<para>
 
 </para></refsect2>
 <refsect2>
@@ -391,19 +1114,19 @@
 <para>
 Adds <parameter>track</parameter> to <parameter>itdb->tracks</parameter> at position <parameter>pos</parameter> (or at the end if pos
 is -1). The application is responsible to also add it to the master
-playlist. The <parameter>itdb</parameter> gets ownership of the <parameter>track</parameter> and will take care of 
+playlist. The <parameter>itdb</parameter> gets ownership of the <parameter>track</parameter> and will take care of
 freeing the memory it uses when it's no longer necessary.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
-<listitem><simpara> position of the track to add
+<listitem><simpara>    position of the track to add
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -425,9 +1148,9 @@
 <indexterm><primary>itdb_track_unlink</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_unlink                   (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
 <para>
 Removes <parameter>track</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with, but do not free
-memory. It doesn't remove the track from the playlists it may have been 
+memory. It doesn't remove the track from the playlists it may have been
 added to, in particular it won't be removed from the master playlist.
-track->itdb is set to NULL.</para>
+<parameter>track->itdb</parameter> is set to NULL.</para>
 <para>
 
 </para><variablelist role="params">
@@ -446,7 +1169,7 @@
 <varlistentry><term><parameter>tr</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Track"><type>Itdb_Track</type></link> 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -454,25 +1177,30 @@
 <indexterm><primary>itdb_track_by_id</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_track_by_id                    (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                                          <link linkend="guint32">guint32</link> id);</programlisting>
 <para>
-Looks up a track using its ID in <parameter>itdb</parameter>. 
+Looks up a track using its ID in <parameter>itdb</parameter>.
+</para>
+<para>
 Looking up tracks by ID is not really a good idea because the IDs
 are created by itdb just before export. The functions are here
 because they are needed during import of the iTunesDB which is
 referencing tracks by IDs.
-This function is very slow (linear in the number of tracks contained in the 
-database). If you need to lookup many IDs use <link linkend="itdb-track-id-tree-create"><function>itdb_track_id_tree_create()</function></link>, 
-<link linkend="itdb-track-id-tree-destroy"><function>itdb_track_id_tree_destroy()</function></link>, and <link linkend="itdb-track-id-tree-by-id"><function>itdb_track_id_tree_by_id()</function></link>.</para>
+</para>
 <para>
+This function is very slow (linear in the number of tracks
+contained in the database). If you need to lookup many IDs use
+<link linkend="itdb-track-id-tree-create"><function>itdb_track_id_tree_create()</function></link>, <link linkend="itdb-track-id-tree-destroy"><function>itdb_track_id_tree_destroy()</function></link>, and
+<link linkend="itdb-track-id-tree-by-id"><function>itdb_track_id_tree_by_id()</function></link>.</para>
+<para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>id</parameter>&nbsp;:</term>
-<listitem><simpara> ID of the track to look for
+<listitem><simpara>   ID of the track to look for
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="Itdb-Track"><type>Itdb_Track</type></link> with the ID <parameter>id</parameter> or NULL if the ID cannot be
-found. 
+found.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
@@ -480,14 +1208,14 @@
 <indexterm><primary>itdb_track_id_tree_create</primary></indexterm><programlisting><link linkend="GTree">GTree</link>*              itdb_track_id_tree_create           (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
 <para>
 Creates a balanced-binary tree for quick ID lookup that is used in
-<link linkend="itdb-track-by-id-tree"><function>itdb_track_by_id_tree()</function></link> function below</para>
+<link linkend="itdb-track-by-id-tree"><function>itdb_track_by_id_tree()</function></link></para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GTree"><type>GTree</type></link> indexed by track IDs to be freed with 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GTree"><type>GTree</type></link> indexed by track IDs to be freed with
 <link linkend="itdb-track-id-tree-destroy"><function>itdb_track_id_tree_destroy()</function></link> when no longer used
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
@@ -508,8 +1236,8 @@
 <indexterm><primary>itdb_track_id_tree_by_id</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_track_id_tree_by_id            (<link linkend="GTree">GTree</link> *idtree,
                                                          <link linkend="guint32">guint32</link> id);</programlisting>
 <para>
-Lookup an <link linkend="Itdb-Track"><type>Itdb_Track</type></link> by <parameter>id</parameter> using <parameter>idtree</parameter> for faster lookup (compared to
-itdb_track_by_id)</para>
+Lookup an <link linkend="Itdb-Track"><type>Itdb_Track</type></link> by <parameter>id</parameter> using <parameter>idtree</parameter> for faster lookup
+(compared to <link linkend="itdb-track-by-id"><function>itdb_track_by_id()</function></link>)</para>
 <para>
 
 </para><variablelist role="params">
@@ -517,83 +1245,135 @@
 <listitem><simpara> a <link linkend="GTree"><type>GTree</type></link> created using <link linkend="itdb-track-id-tree-create"><function>itdb_track_id_tree_create()</function></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>id</parameter>&nbsp;:</term>
-<listitem><simpara> the ID of the track to search for
+<listitem><simpara>     the ID of the track to search for
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> whose ID is <parameter>id</parameter>, or NULL if such a track 
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> whose ID is <parameter>id</parameter>, or NULL if such a track
 couldn't be found
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>
-<title><anchor id="itdb-track-set-thumbnails" role="function"/>itdb_track_set_thumbnails ()</title>
-<indexterm><primary>itdb_track_set_thumbnails</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+<title><anchor id="itdb-track-get-thumbnail" role="function" condition="since:0.7.0"/>itdb_track_get_thumbnail ()</title>
+<indexterm role="0.7.0"><primary>itdb_track_get_thumbnail</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_track_get_thumbnail            (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);</programlisting>
+<para>
+Get a thumbnail representing the cover associated with the current track,
+scaling it if appropriate. If either height or width is -1, then the biggest
+unscaled thumbnail available will be returned.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
+<listitem><simpara>  width of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
+<listitem><simpara> height of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-has-thumbnails" role="function" condition="since:0.7.0"/>itdb_track_has_thumbnails ()</title>
+<indexterm role="0.7.0"><primary>itdb_track_has_thumbnails</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_has_thumbnails           (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Determine if a <parameter>track</parameter> has thumbnails</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>track</parameter> has artwork available, FALSE otherwise
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-set-thumbnails" role="function" condition="since:0.3.0"/>itdb_track_set_thumbnails ()</title>
+<indexterm role="0.3.0"><primary>itdb_track_set_thumbnails</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          const <link linkend="gchar">gchar</link> *filename);</programlisting>
 <para>
 Uses the image contained in <parameter>filename</parameter> to generate iPod thumbnails. The image
 can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
-will only be generated when necessary, ie when <link linkend="itdb-save"><function>itdb_save()</function></link> or a similar 
+will only be generated when necessary, i.e. when <link linkend="itdb-save"><function>itdb_save()</function></link> or a similar
 function is called.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>    an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
 <listitem><simpara> image file to use as a thumbnail
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be added, FALSE otherwise.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-track-set-thumbnails-from-data" role="function"/>itdb_track_set_thumbnails_from_data ()</title>
-<indexterm><primary>itdb_track_set_thumbnails_from_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails_from_data (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+<title><anchor id="itdb-track-set-thumbnails-from-data" role="function" condition="since:0.4.0"/>itdb_track_set_thumbnails_from_data ()</title>
+<indexterm role="0.4.0"><primary>itdb_track_set_thumbnails_from_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails_from_data (<link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          const <link linkend="guchar">guchar</link> *image_data,
                                                          <link linkend="gsize">gsize</link> image_data_len);</programlisting>
 <para>
 Uses <parameter>image_data</parameter> to generate iPod thumbnails. The image can be in
 any format supported by gdk-pixbuf. To save memory, the thumbnails
-will only be generated when necessary, ie when <link linkend="itdb-save"><function>itdb_save()</function></link> or a
+will only be generated when necessary, i.e. when <link linkend="itdb-save"><function>itdb_save()</function></link> or a
 similar function is called.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>          an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>image_data</parameter>&nbsp;:</term>
-<listitem><simpara> data used to create the thumbnail (the raw contents of
-             an image file)
+<listitem><simpara>     data used to create the thumbnail (the raw contents of
+                 an image file)
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>image_data_len</parameter>&nbsp;:</term>
 <listitem><simpara> length of above data block
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be added, FALSE otherwise.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-track-set-thumbnails-from-pixbuf" role="function"/>itdb_track_set_thumbnails_from_pixbuf ()</title>
-<indexterm><primary>itdb_track_set_thumbnails_from_pixbuf</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails_from_pixbuf
+<title><anchor id="itdb-track-set-thumbnails-from-pixbuf" role="function" condition="since:0.5.0"/>itdb_track_set_thumbnails_from_pixbuf ()</title>
+<indexterm role="0.5.0"><primary>itdb_track_set_thumbnails_from_pixbuf</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails_from_pixbuf
                                                         (<link linkend="Itdb-Track">Itdb_Track</link> *track,
                                                          <link linkend="gpointer">gpointer</link> pixbuf);</programlisting>
 <para>
 Uses <parameter>pixbuf</parameter> to generate iPod thumbnails. To save memory, the thumbnails
-will only be generated when necessary, ie when <link linkend="itdb-save"><function>itdb_save()</function></link> or a
+will only be generated when necessary, i.e. when <link linkend="itdb-save"><function>itdb_save()</function></link> or a
 similar function is called.</para>
 <para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
-<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
 <varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
 <listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> used to generate the thumbnail
 </simpara></listitem></varlistentry>
 <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be added, FALSE otherwise.
+
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
 <refsect2>
-<title><anchor id="itdb-track-remove-thumbnails" role="function"/>itdb_track_remove_thumbnails ()</title>
-<indexterm><primary>itdb_track_remove_thumbnails</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_remove_thumbnails        (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<title><anchor id="itdb-track-remove-thumbnails" role="function" condition="since:0.3.0"/>itdb_track_remove_thumbnails ()</title>
+<indexterm role="0.3.0"><primary>itdb_track_remove_thumbnails</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_remove_thumbnails        (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
 <para>
 Removes the thumbnails associated with <parameter>track</parameter></para>
 <para>
@@ -602,11 +1382,14 @@
 <varlistentry><term><parameter>track</parameter>&nbsp;:</term>
 <listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
 </simpara></listitem></varlistentry>
-</variablelist></refsect2>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
 
 </refsect1>
 
 
 
 
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
 </refentry>

Modified: libgpod/trunk/gtk-doc.make
===================================================================
--- libgpod/trunk/gtk-doc.make	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/gtk-doc.make	2009-01-24 12:10:00 UTC (rev 341)
@@ -38,8 +38,13 @@
 	$(DOC_MODULE).prerequisites \
 	$(DOC_MODULE).signals
 
-CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+REPORT_FILES = \
+	$(DOC_MODULE)-undocumented.txt \
+	$(DOC_MODULE)-undeclared.txt \
+	$(DOC_MODULE)-unused.txt
 
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
 if ENABLE_GTK_DOC
 all-local: html-build.stamp
 else
@@ -79,6 +84,10 @@
 tmpl.stamp: tmpl-build.stamp
 	@true
 
+tmpl/*.sgml:
+	@true
+
+
 #### xml ####
 
 sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
@@ -96,11 +105,11 @@
 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 	@echo 'gtk-doc: Building HTML'
 	@-chmod -R u+w $(srcdir)
-	rm -rf $(srcdir)/html 
+	rm -rf $(srcdir)/html
 	mkdir $(srcdir)/html
 	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
 	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
-	@echo 'gtk-doc: Fixing cross-references' 
+	@echo 'gtk-doc: Fixing cross-references'
 	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
 	touch html-build.stamp
 
@@ -110,8 +119,13 @@
 	rm -f *~ *.bak
 	rm -rf .libs
 
+distclean-local:
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
 maintainer-clean-local: clean
-	cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+	cd $(srcdir) && rm -rf xml html
 
 install-data-local:
 	installfiles=`echo $(srcdir)/html/*`; \
@@ -125,7 +139,10 @@
 	  done; \
 	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
 	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+	  (which gtkdoc-rebase >& /dev/null && \
+            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || : ; \
 	fi
+	
 
 uninstall-local:
 	rm -f $(DESTDIR)$(TARGET_DIR)/*
@@ -148,8 +165,9 @@
 	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
 	-cp $(srcdir)/xml/*.xml $(distdir)/xml
 	cp $(srcdir)/html/* $(distdir)/html
-	if test -f $(srcdir)/$(DOC_MODULE).types; then \
-	  cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \
-	fi
+	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+	cd $(distdir) && rm -f $(DISTCLEANFILES)
+	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
 
 .PHONY : dist-hook-local docs

Modified: libgpod/trunk/install-sh
===================================================================
--- libgpod/trunk/install-sh	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/install-sh	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2005-05-14.22
+scriptversion=2006-12-25.00
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,38 +39,68 @@
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
+
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-chmodcmd="$chmodprog 0755"
+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
+
+chgrpcmd=
+chmodcmd=$chmodprog
 chowncmd=
-chgrpcmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
 stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+
 src=
 dst=
 dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
 no_target_directory=
 
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -80,81 +110,86 @@
 In the 4th, create DIRECTORIES.
 
 Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
+     --help     display this help and exit.
+     --version  display version info and exit.
 
+  -c            (ignored)
+  -C            install only if different (preserve the last 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.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 "
 
-while test -n "$1"; do
+while test $# -ne 0; do
   case $1 in
-    -c) shift
-        continue;;
+    -c) ;;
 
-    -d) dir_arg=true
-        shift
-        continue;;
+    -C) copy_on_change=true;;
 
+    -d) dir_arg=true;;
+
     -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
+	shift;;
 
     --help) echo "$usage"; exit $?;;
 
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
+	shift;;
 
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
+    -s) stripcmd=$stripprog;;
 
-    -t) dstarg=$2
-	shift
-	shift
-	continue;;
+    -t) dst_arg=$2
+	shift;;
 
-    -T) no_target_directory=true
-	shift
-	continue;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    *)  # When -d is used, all remaining arguments are directories to create.
-	# When -t is used, the destination is already specified.
-	test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-	for arg
-	do
-          if test -n "$dstarg"; then
-	    # $@ is not empty: it contains at least $arg.
-	    set fnord "$@" "$dstarg"
-	    shift # fnord
-	  fi
-	  shift # arg
-	  dstarg=$arg
-	done
+    --)	shift
 	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
   esac
+  shift
 done
 
-if test -z "$1"; then
+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.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
   if test -z "$dir_arg"; then
     echo "$0: no input file specified." >&2
     exit 1
@@ -164,24 +199,47 @@
   exit 0
 fi
 
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
 for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src ;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
     dst=$src
-    src=
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
 
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
     # might cause directories to be created, which would be especially bad
     # if $src (and thus $dsttmp) contains '*'.
@@ -190,71 +248,199 @@
       exit 1
     fi
 
-    if test -z "$dstarg"; then
+    if test -z "$dst_arg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dstarg
+    dst=$dst_arg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst ;;
+      -*) dst=./$dst;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-	echo "$0: $dstarg: Is a directory" >&2
+	echo "$0: $dst_arg: Is a directory" >&2
 	exit 1
       fi
-      dst=$dst/`basename "$src"`
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      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'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
     fi
   fi
 
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+  obsolete_mkdir_used=false
 
-  # Make sure that the destination directory exists.
+  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;;
 
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-	 '
-    IFS="${IFS-$defaultIFS}"
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
 
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
+	# 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
 
-    pathcomp=
+	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
 
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
+	    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;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or 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='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
       shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-	# mkdir can fail with a `File exist' error in case several
-	# install-sh are creating the directory concurrently.  This
-	# is OK.
-	test -d "$pathcomp" || exit
+      $posix_glob 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/
+      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
       fi
-      pathcomp=$pathcomp/
-    done
+    fi
   fi
 
   if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
   else
-    dstfile=`basename "$dst"`
 
     # Make a couple of temp file names in the proper directory.
     dsttmp=$dstdir/_inst.$$_
@@ -262,10 +448,9 @@
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
 
     # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -273,48 +458,59 @@
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-	   # The rename failed, perhaps because mv can't rename something else
-	   # to itself, or perhaps because mv is so ancient that it does not
-	   # support -f.
+    # 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` &&
 
-	   # 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.
-	   {
-	     if test -f "$dstdir/$dstfile"; then
-	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-	       || {
-		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		 (exit 1); exit 1
-	       }
-	     else
-	       :
-	     fi
-	   } &&
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
 
-	   # Now rename the file to the real destination.
-	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-	 }
-    }
-  fi || { (exit 1); exit 1; }
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # 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"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
 done
 
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="

Modified: libgpod/trunk/intltool-extract.in
===================================================================
--- libgpod/trunk/intltool-extract.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/intltool-extract.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -32,7 +32,7 @@
 ## Release information
 my $PROGRAM      = "intltool-extract";
 my $PACKAGE      = "intltool";
-my $VERSION      = "0.36.2";
+my $VERSION      = "0.37.1";
 
 ## Loaded modules
 use strict; 
@@ -161,7 +161,8 @@
       --type=TYPE   Specify the file type of FILENAME. Currently supports:
                     "gettext/glade", "gettext/ini", "gettext/keys"
                     "gettext/rfc822deb", "gettext/schemas",
-                    "gettext/scheme", "gettext/xml", "gettext/quoted"
+                    "gettext/scheme", "gettext/xml", "gettext/quoted",
+                    "gettext/quotedxml"
   -l, --local       Writes output into current working directory
                     (conflicts with --update)
       --update      Writes output into the same directory the source file 
@@ -218,6 +219,7 @@
     &type_schemas  if $gettext_type eq "schemas";
     &type_rfc822deb  if $gettext_type eq "rfc822deb";
     &type_quoted if $gettext_type eq "quoted";
+    &type_quotedxml if $gettext_type eq "quotedxml";
 }
 
 sub entity_decode_minimal
@@ -731,6 +733,18 @@
     }
 }
 
+sub type_quotedxml {
+    while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
+        my $message = $1;
+        my $before = $`;
+        $message =~ s/\\\"/\"/g;
+        $message = entity_decode($message);
+        $before =~ s/[^\n]//g;
+        $messages{$message} = [];
+        $loc{$message} = length ($before) + 2;
+    }
+}
+
 sub type_glade {
     ### For translatable Glade XML files ###
 

Modified: libgpod/trunk/intltool-merge.in
===================================================================
--- libgpod/trunk/intltool-merge.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/intltool-merge.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -35,7 +35,7 @@
 ## Release information
 my $PROGRAM = "intltool-merge";
 my $PACKAGE = "intltool";
-my $VERSION = "0.36.2";
+my $VERSION = "0.37.1";
 
 ## Loaded modules
 use strict; 
@@ -61,6 +61,7 @@
 my $SCHEMAS_STYLE_ARG = 0;
 my $RFC822DEB_STYLE_ARG = 0;
 my $QUOTED_STYLE_ARG = 0;
+my $QUOTEDXML_STYLE_ARG = 0;
 my $QUIET_ARG = 0;
 my $PASS_THROUGH_ARG = 0;
 my $UTF8_ARG = 0;
@@ -81,6 +82,7 @@
  "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
  "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
  "quoted-style" => \$QUOTED_STYLE_ARG,
+ "quotedxml-style" => \$QUOTEDXML_STYLE_ARG,
  "pass-through|p" => \$PASS_THROUGH_ARG,
  "utf8|u" => \$UTF8_ARG,
  "multiple-output|m" => \$MULTIPLE_OUTPUT,
@@ -148,7 +150,7 @@
 	&utf8_sanity_check;
 	&preparation;
 	&print_message;
-	&keys_merge_translations;
+        &keys_merge_translations;
 	&finalize;
 } 
 elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) 
@@ -174,12 +176,12 @@
 	&rfc822deb_merge_translations;
 	&finalize;
 } 
-elsif ($QUOTED_STYLE_ARG && @ARGV > 2) 
+elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2)
 {
 	&utf8_sanity_check;
 	&preparation;
 	&print_message;
-	&quoted_merge_translations;
+	&quoted_merge_translations($QUOTEDXML_STYLE_ARG);
 	&finalize;
 } 
 else 
@@ -219,6 +221,7 @@
   -s, --schemas-style    includes translations in the schemas style
   -r, --rfc822deb-style  includes translations in the RFC822 style
       --quoted-style     includes translations in the quoted string style
+      --quotedxml-style  includes translations in the quoted xml string style
   -x, --xml-style        includes translations in the standard xml style
 
 Other options:
@@ -292,10 +295,9 @@
             {
                 next if /^#/;
 
-                if (/([-a-zA-Z_ at .]+)\n/)
+                for my $lang (split)
                 {
-                    my $lang = $1;
-
+                    chomp ($lang);
                     my $po_file = $PO_DIR . "/" . $lang . ".po";
                     if (-e $po_file) {
                         $po_files_by_lang{$lang} = $po_file;
@@ -576,6 +578,7 @@
     return "&amp;" if $_ == 38;
     return "&apos;" if $_ == 39;
     return "&lt;" if $_ == 60;
+    return "&gt;" if $_ == 62;
     return chr $_;
 }
 
@@ -1076,43 +1079,74 @@
             close OUTPUT;
             print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
         }
-    } 
-    open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
-    binmode (OUTPUT) if $^O eq 'MSWin32';
-    my $tree = readXml($FILE);
-    print_header($FILE, \*OUTPUT);
-    parseTree(\*OUTPUT, $tree);
-    close OUTPUT;
-    print "CREATED $OUTFILE\n" unless $QUIET_ARG;
+        if ( ! -d "C" ) {
+            mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n";
+        }
+        open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n";
+        binmode (OUTPUT) if $^O eq 'MSWin32';
+        my $tree = readXml($FILE);
+        print_header($FILE, \*OUTPUT);
+        parseTree(\*OUTPUT, $tree);
+        close OUTPUT;
+        print "CREATED C/$OUTFILE\n" unless $QUIET_ARG;
+    } else {
+        open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
+        binmode (OUTPUT) if $^O eq 'MSWin32';
+        my $tree = readXml($FILE);
+        print_header($FILE, \*OUTPUT);
+        parseTree(\*OUTPUT, $tree);
+        close OUTPUT;
+        print "CREATED $OUTFILE\n" unless $QUIET_ARG;
+    }
 }
 
-sub keys_merge_translations
+sub keys_merge_translation
 {
-    open INPUT, "<${FILE}" or die;
-    open OUTPUT, ">${OUTFILE}" or die;
+    my ($lang) = @_;
+
+    if ( ! -d $lang && $MULTIPLE_OUTPUT)
+    {
+        mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+    }
+
+    open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n";
+    open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
     binmode (OUTPUT) if $^O eq 'MSWin32';
 
-    while (<INPUT>) 
+    while (<INPUT>)
     {
-        if (s/^(\s*)_(\w+=(.*))/$1$2/)  
+        if (s/^(\s*)_(\w+=(.*))/$1$2/)
         {
-	    my $string = $3;
+            my $string = $3;
 
-            print OUTPUT;
+            if (!$MULTIPLE_OUTPUT)
+            {
+                print OUTPUT;
 
-	    my $non_translated_line = $_;
+                my $non_translated_line = $_;
 
-            for my $lang (sort keys %po_files_by_lang) 
+                for my $lang (sort keys %po_files_by_lang)
+                {
+                    my $translation = $translations{$lang, $string};
+                    next if !$translation;
+
+                    $_ = $non_translated_line;
+                    s/(\w+)=.*/[$lang]$1=$translation/;
+                    print OUTPUT;
+                }
+            }
+            else
             {
-		my $translation = $translations{$lang, $string};
-                next if !$translation;
+                my $non_translated_line = $_;
+                my $translation = $translations{$lang, $string};
+                $translation = $string if !$translation;
 
                 $_ = $non_translated_line;
-		s/(\w+)=.*/[$lang]$1=$translation/;
+                s/(\w+)=.*/$1=$translation/;
                 print OUTPUT;
             }
-	} 
-        else 
+        }
+        else
         {
             print OUTPUT;
         }
@@ -1120,8 +1154,26 @@
 
     close OUTPUT;
     close INPUT;
+
+    print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
 }
 
+sub keys_merge_translations
+{
+    if ($MULTIPLE_OUTPUT)
+    {
+        for my $lang (sort keys %po_files_by_lang)
+        {
+            keys_merge_translation ($lang);
+        }
+        keys_merge_translation ("C");
+    }
+    else
+    {
+        keys_merge_translation (".");
+    }
+}
+
 sub desktop_merge_translations
 {
     open INPUT, "<${FILE}" or die;
@@ -1415,19 +1467,22 @@
 
 sub quoted_translation
 {
-    my ($lang, $string) = @_;
+    my ($xml_mode, $lang, $string) = @_;
 
+    $string = entity_decode($string) if $xml_mode;
     $string =~ s/\\\"/\"/g;
 
     my $translation = $translations{$lang, $string};
     $translation = $string if !$translation;
-
+    $translation = entity_encode($translation) if $xml_mode;
     $translation =~ s/\"/\\\"/g;
     return $translation
 }
 
 sub quoted_merge_translations
 {
+    my ($xml_mode) = @_;
+
     if (!$MULTIPLE_OUTPUT) {
         print "Quoted only supports Multiple Output.\n";
         exit(1);
@@ -1442,7 +1497,7 @@
         binmode (OUTPUT) if $^O eq 'MSWin32';
         while (<INPUT>) 
         {
-            s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($lang, $1) . "\""/ge;
+            s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($xml_mode, $lang, $1) . "\""/ge;
             print OUTPUT;
         }
         close OUTPUT;

Modified: libgpod/trunk/intltool-update.in
===================================================================
--- libgpod/trunk/intltool-update.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/intltool-update.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -30,7 +30,7 @@
 
 ## Release information
 my $PROGRAM = "intltool-update";
-my $VERSION = "0.36.2";
+my $VERSION = "0.37.1";
 my $PACKAGE = "intltool";
 
 ## Loaded modules
@@ -334,7 +334,7 @@
 	push @buf_i18n_xml,          "$File::Find::name" if /\.($xml_support)$/;
 	push @buf_i18n_ini,          "$File::Find::name" if /\.($ini_support)$/;
 	push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
-	}, "$SRCDIR/..";
+	}, "$SRCDIR/.." if "$SRCDIR" ne ".";
 
     open POTFILES, $POTFILES_in or die "$PROGRAM:  there's no POTFILES.in!\n";
     @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
@@ -434,8 +434,8 @@
 		last;
 	    }
 
-            ## N_ Q_ and _ are the three macros defined in gi8n.h
-	    if (/[NQ]?_ *\(QUOTEDTEXT/)
+            ## C_ N_ Q_ and _ are the macros defined in gi8n.h
+	    if (/[CNQ]?_ *\(QUOTEDTEXT/)
 	    {
                 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
                     ## Remove the first 3 chars and add newline
@@ -777,7 +777,7 @@
     my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
     push @xgettext_argument, $XGETTEXT_KEYWORDS;
     my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
-    push @xgettext_argument, "--msgid-bugs-address\=$MSGID_BUGS_ADDRESS" if $MSGID_BUGS_ADDRESS;
+    push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS;
     push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
     push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
     my $xgettext_command = join ' ', @xgettext_argument;
@@ -1118,6 +1118,8 @@
 	close IN;
     }
 
+    # unwrap lines split with a trailing \
+    $make_source =~  s/\\ $ \n/ /mxg;
     $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m;
     
     return $keywords;

Modified: libgpod/trunk/libgpod-1.0.pc.in
===================================================================
--- libgpod/trunk/libgpod-1.0.pc.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/libgpod-1.0.pc.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -6,6 +6,6 @@
 Name: libgpod
 Description: A library to manipulate songs and playlists stored on an ipod
 Version: @VERSION@
-Requires: glib-2.0 >= 2.8.0 gobject-2.0
+Requires: glib-2.0 >= 2.8.0 gobject-2.0 @GDKPIXBUF_REQ@
 Libs: -L${libdir} -lgpod
 Cflags: -I${includedir}/gpod-1.0

Modified: libgpod/trunk/ltmain.sh
===================================================================
--- libgpod/trunk/ltmain.sh	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/ltmain.sh	2009-01-24 12:10:00 UTC (rev 341)
@@ -43,7 +43,7 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="1.5.24 Debian 1.5.24-1ubuntu1"
+VERSION=1.5.24
 TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
 
 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
@@ -2122,10 +2122,7 @@
 	case $pass in
 	dlopen) libs="$dlfiles" ;;
 	dlpreopen) libs="$dlprefiles" ;;
-	link)
-	  libs="$deplibs %DEPLIBS%"
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-	  ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 	esac
       fi
       if test "$pass" = dlopen; then
@@ -3247,11 +3244,6 @@
 	    revision="$number_minor"
 	    lt_irix_increment=no
 	    ;;
-	  *)
-	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	    exit $EXIT_FAILURE
-	    ;;
 	  esac
 	  ;;
 	no)

Modified: libgpod/trunk/m4/Makefile.in
===================================================================
--- libgpod/trunk/m4/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/m4/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -13,15 +13,11 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -52,8 +48,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -80,35 +74,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -149,15 +132,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -193,13 +178,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -211,6 +196,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -242,8 +228,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = python.m4 swig.m4
 all: all-am
 
@@ -283,10 +272,6 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -295,22 +280,21 @@
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -355,7 +339,7 @@
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -369,12 +353,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -393,17 +385,20 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
+.MAKE: install-am install-strip
+
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	distclean distclean-generic distclean-libtool distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
+	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-ps install-ps-am install-strip \
 	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-info-am
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
 
 # 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.

Modified: libgpod/trunk/m4/gtk-doc.m4
===================================================================
--- libgpod/trunk/m4/gtk-doc.m4	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/m4/gtk-doc.m4	2009-01-24 12:10:00 UTC (rev 341)
@@ -21,33 +21,19 @@
                    [use gtk-doc to build documentation [[default=no]]]),,
     [enable_gtk_doc=no])
 
-  have_gtk_doc=no
   if test x$enable_gtk_doc = xyes; then
-    if test -z "$PKG_CONFIG"; then
-      AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
-    fi
-    if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
-      have_gtk_doc=yes
-    fi
-
-  dnl do we want to do a version check?
-ifelse([$1],[],,
-    [gtk_doc_min_version=$1
-    if test "$have_gtk_doc" = yes; then
-      AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
-      if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
-        AC_MSG_RESULT([yes])
-      else
-        AC_MSG_RESULT([no])
-        have_gtk_doc=no
-      fi
-    fi
-])
-    if test "$have_gtk_doc" != yes; then
-      enable_gtk_doc=no
-    fi
+    ifelse([$1],[],
+      [PKG_CHECK_EXISTS([gtk-doc],,
+                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
+      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
+                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
   fi
 
+  AC_MSG_CHECKING([whether to build gtk-doc documentation])
+  AC_MSG_RESULT($enable_gtk_doc)
+
+  AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
+
   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
 ])

Modified: libgpod/trunk/m4/intltool.m4
===================================================================
--- libgpod/trunk/m4/intltool.m4	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/m4/intltool.m4	2009-01-24 12:10:00 UTC (rev 341)
@@ -87,6 +87,20 @@
 AC_SUBST(INTLTOOL_SERVICE_RULE)
 AC_SUBST(INTLTOOL_POLICY_RULE)
 
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
 # Use the tools built into the package, not the ones that are installed.
 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')

Modified: libgpod/trunk/m4/python.m4
===================================================================
--- libgpod/trunk/m4/python.m4	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/m4/python.m4	2009-01-24 12:10:00 UTC (rev 341)
@@ -99,7 +99,7 @@
     fi
     AC_MSG_RESULT($with_python)
 
-    if test "X$with_python" == Xyes; then
+    if test "X$with_python" = Xyes; then
         if test -z "$PYTHON"; then
             AC_PATH_PROG(PYTHON, python)
         fi
@@ -108,7 +108,7 @@
             AM_PATH_PYTHON($PYTHON_MIN_VERSION)
             AM_CHECK_PYTHON_HEADERS(with_python="yes",with_python="no")
     
-            if test "X$with_python" == Xyes; then
+            if test "X$with_python" = Xyes; then
                 dnl test for python ldflags
                 dnl copied from the Redland RDF bindings, http://librdf.org/
                 if test `uname` = Darwin; then
@@ -127,13 +127,13 @@
                 AM_CHECK_PYMOD(mutagen,$PYTHON_MUTAGEN_MIN_VERSION,mutagen.version_string,,with_python=no)
 
                 dnl this test should perhaps be re-enabled, but only produce a warning -- tmz
-                dnl if test "X$have_gdkpixbuf" == "Xyes" -a "X$have_pygobject" == "Xyes"; then
+                dnl if test "X$have_gdkpixbuf" = "Xyes" -a "X$have_pygobject" = "Xyes"; then
                 dnl     dnl check for gtk module >= $PYTHON_GTK_MIN_VERSION
                 dnl     AM_CHECK_PYMOD(gtk,$PYTHON_GTK_MIN_VERSION,'.'.join(map(str, gtk.ver)),,with_python=no)
                 dnl fi
 
                 dnl check for swig
-                if test "X$with_python" == Xyes; then
+                if test "X$with_python" = Xyes; then
                     AC_PROG_SWIG($SWIG_MIN_VERSION)
                     with_python="$has_swig"
                 fi

Modified: libgpod/trunk/missing
===================================================================
--- libgpod/trunk/missing	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/missing	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
 #   Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
@@ -33,6 +33,8 @@
 fi
 
 run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
 # In the cases where this matters, `missing' is being run in the
 # srcdir already.
@@ -44,7 +46,7 @@
 
 msg="missing on your system"
 
-case "$1" in
+case $1 in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
@@ -77,6 +79,7 @@
   aclocal      touch file \`aclocal.m4'
   autoconf     touch file \`configure'
   autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
   automake     touch all \`Makefile.in' files
   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
   flex         create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
 # the program).
-case "$1" in
+case $1 in
   lex|yacc)
     # Not GNU programs, they don't have --version.
     ;;
@@ -135,7 +138,7 @@
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case "$1" in
+case $1 in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -164,7 +167,7 @@
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
-      case "$f" in
+      case $f in
       *:*) touch_files="$touch_files "`echo "$f" |
 				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
       *) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -f "$file"; then
 	touch $file
     else
@@ -214,25 +217,25 @@
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-	case "$LASTARG" in
+	case $LASTARG in
 	*.y)
 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if [ -f "$SRCFILE" ]; then
+	    if test -f "$SRCFILE"; then
 	         cp "$SRCFILE" y.tab.c
 	    fi
 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if [ -f "$SRCFILE" ]; then
+	    if test -f "$SRCFILE"; then
 	         cp "$SRCFILE" y.tab.h
 	    fi
 	  ;;
 	esac
     fi
-    if [ ! -f y.tab.h ]; then
+    if test ! -f y.tab.h; then
 	echo >y.tab.h
     fi
-    if [ ! -f y.tab.c ]; then
+    if test ! -f y.tab.c; then
 	echo 'main() { return 0; }' >y.tab.c
     fi
     ;;
@@ -244,18 +247,18 @@
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-	case "$LASTARG" in
+	case $LASTARG in
 	*.l)
 	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if [ -f "$SRCFILE" ]; then
+	    if test -f "$SRCFILE"; then
 	         cp "$SRCFILE" lex.yy.c
 	    fi
 	  ;;
 	esac
     fi
-    if [ ! -f lex.yy.c ]; then
+    if test ! -f lex.yy.c; then
 	echo 'main() { return 0; }' >lex.yy.c
     fi
     ;;
@@ -267,11 +270,9 @@
 	 \`Help2man' package in order for those modifications to take
 	 effect.  You can get \`Help2man' from any GNU archive site."
 
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
 	touch $file
     else
 	test -z "$file" || exec >$file
@@ -289,11 +290,17 @@
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -z "$file"; then
       # ... or it is the one specified with @setfilename ...
       infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
       # ... or it is derived from the source name (dir/f.texi becomes f.info)
       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
@@ -317,13 +324,13 @@
     fi
     firstarg="$1"
     if shift; then
-	case "$firstarg" in
+	case $firstarg in
 	*o*)
 	    firstarg=`echo "$firstarg" | sed s/o//`
 	    tar "$firstarg" "$@" && exit 0
 	    ;;
 	esac
-	case "$firstarg" in
+	case $firstarg in
 	*h*)
 	    firstarg=`echo "$firstarg" | sed s/h//`
 	    tar "$firstarg" "$@" && exit 0

Modified: libgpod/trunk/mkinstalldirs
===================================================================
--- libgpod/trunk/mkinstalldirs	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/mkinstalldirs	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2005-06-29.22
+scriptversion=2006-05-11.19
 
 # Original author: Noah Friedman <friedman at prep.ai.mit.edu>
 # Created: 1993-05-16
@@ -11,6 +11,9 @@
 # bugs to <bug-automake at gnu.org> or send patches to
 # <automake-patches at gnu.org>.
 
+nl='
+'
+IFS=" ""	$nl"
 errstatus=0
 dirmode=
 

Modified: libgpod/trunk/po/Makefile.in.in
===================================================================
--- libgpod/trunk/po/Makefile.in.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/Makefile.in.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,10 +1,10 @@
 # Makefile for program source directory in GNU NLS utilities package.
 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns at gmail.com>
 #
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
+# This file may be copied and used freely without restrictions.  It may
+# be used in projects which are not available under a GNU Public License,
 # but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
 #
 # - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
 #   instead of PACKAGE and to look for po2tbl in ./ not in intl/
@@ -12,7 +12,7 @@
 # - Modified by jacob berkman <jacob at ximian.com> to install
 #   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
 #
-# - Modified by Rodney Dawes <dobey at novell.com> for use with intltool
+# - Modified by Rodney Dawes <dobey.pwns at gmail.com> for use with intltool
 #
 # We have the following line for use by intltoolize:
 # INTLTOOL_MAKEFILE

Modified: libgpod/trunk/po/POTFILES.in
===================================================================
--- libgpod/trunk/po/POTFILES.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/POTFILES.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,6 @@
 # List of source files containing translatable strings (output of
-# ls src/*.c tests/*.c)
+# ls src/*.c tests/*.c tools/*.c)
 
-
 src/db-artwork-debug.c
 src/db-artwork-parser.c
 src/db-artwork-writer.c
@@ -12,6 +11,7 @@
 src/itdb_itunesdb.c
 src/itdb_photoalbum.c
 src/itdb_playlist.c
+src/itdb_thumb.c
 src/itdb_track.c
 src/ithumb-writer.c
 tests/itdb_main.c

Modified: libgpod/trunk/po/de.po
===================================================================
--- libgpod/trunk/po/de.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/de.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -7,601 +7,645 @@
 msgstr ""
 "Project-Id-Version: gtkpod 0.52\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2007-01-15 23:46+0900\n"
-"Last-Translator: Jörg Schuler <jcsjcs at users.sourceforge.net>\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2009-01-05 10:22+0100\n"
+"Last-Translator: Jonas Cleve <jonas_cleve at yahoo.de>\n"
 "Language-Team: none\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-#: ../src/db-artwork-parser.c:131
+#: ../src/db-artwork-parser.c:156
 #, c-format
-msgid "Unexpected mhod3 string type: %d\n"
-msgstr "Unerwarteter mhod3 Stringtyp: %d\n"
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Unerwarteter mhod Stringtyp: %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Unerwarteter mhsd-Index: %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
-msgstr ""
-"Konnte zugehöriges Musikstück (dbid: %s) für Artworkeintrag nicht finden.\n"
+msgstr "Konnte zugehöriges Musikstück (dbid: %s) für Artworkeintrag nicht finden.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
 msgstr "Artwork-Größen in iTunesDB und ArtworkDB inkonsistent (%d+%d != %d)\n"
 
-#: ../src/db-artwork-parser.c:463
+#: ../src/db-artwork-parser.c:566
 #, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr "Unerwarteter mhsd-Index: %d\n"
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "Konnte Bildeintrag (mhii id: %u) für Track (dbid: %s) nicht finden.\n"
 
-#: ../src/db-image-parser.c:118
+#: ../src/db-image-parser.c:91
 #, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr "Unerwarter Bildtyp in mhni: Größe: %ux%u (%d), Offset: %d\n"
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Unerwarter Bildtyp in mhni: %d, Offset: %d\n"
 
-#: ../src/itdb_artwork.c:199
+#: ../src/itdb_artwork.c:163
 #, c-format
 msgid "Could not access file '%s'."
 msgstr "Datei nicht auf Datei zugreifen: '%s'."
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181
+#: ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
 msgstr "Artwork-Unterstützung ist nicht in libgpod einkompiliert worden."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr "Nicht zulässiger Dateiname: '%s'.\n"
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr "Mountpoint wurde nicht gesetzt.\n"
-
-#: ../src/itdb_artwork.c:554
-#, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Nicht auf dem iPod gefunden: '%s'\n"
 
-#: ../src/itdb_artwork.c:768
-#, fuzzy, c-format
-msgid ""
-"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
-msgstr ""
-"Thumbnail konnte nicht geladen werden. Der Thumbnail scheint auf dem iPod zu "
-"sein, aber die Bilddaten sind nicht verfügbar): Typ: %d, Dateiname: '%s'\n"
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid "Unable to retrieve thumbnail (appears to be on iPod, but no image info available): filename: '%s'\n"
+msgstr "Thumbnail konnte nicht geladen werden (Thumbnail scheint auf dem iPod zu sein, aber die Bilddaten sind nicht verfügbar): Dateiname: '%s'\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
 msgstr "Ungültig"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257
+#: ../src/itdb_device.c:298
 msgid "Unknown"
 msgstr "Unbekannt"
 
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
 msgstr "Color"
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
 msgstr "Color U2"
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
 msgstr "Grayscale"
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
 msgstr "Grayscale U2"
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
 msgstr "Mini (silber)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
 msgstr "Mini (blau)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
 msgstr "Mini (pink)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
 msgstr "Mini (grün)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
 msgstr "Mini (gold)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
 msgstr "Shuffle"
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
 msgstr "Nano (weiß)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
 msgstr "Nano (schwarz)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
 msgstr "Video (weiß)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
 msgstr "Video (schwarz)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
 msgstr "Mobiltelefon (1)"
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
 msgstr "Video U2"
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
 msgstr "Nano (silber)"
 
 # Nano (blau)
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
 msgstr "Nano (blau)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
 msgstr "Nano (grün)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
 msgstr "Nano (pink)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr "Erste Generation"
+# Nano (blau)
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "Nano (rot)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr "Zweite Generation"
+# Nano (blau)
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "Nano (geld)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr "Dritte Generation"
+# Nano (blau)
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "Nano (lila)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr "Vierte Generation"
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "Nano (orange)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr "Fünfte Generation"
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr "Sechste Generation"
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (silber)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
-msgstr "Mobiltelefon"
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (pink)"
 
-#: ../src/itdb_device.c:470
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (blau)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "Shuffle (grün)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (orange)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (lila)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "Shuffle (rot)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "Classic (silber)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "Classic (schwarz)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "Touch (schwarz)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "Standard (1. Generation)"
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "Standard (2. Generation)"
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "Standard (3. Generation)"
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "Standard (4. Generation)"
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "Mobiltelefone"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1. Generation)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2. Generation)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1. Generation)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2. Generation)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3. Generation)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1. Generation)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2. Generation)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Vide (3. Generation)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video (4. Generation)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "Video (1. Generation)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "Video (2. Generation)"
+
+#: ../src/itdb_device.c:316
+#: ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:320
+#: ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "Nicht benutzt"
+
+#: ../src/itdb_device.c:874
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "'%s' konnte nicht zum Schreiben geöffnet werden."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
 msgstr "Das 'Device'-Verzeichnis existiert nicht."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "Illegaler seek bei Offset %ld (Länge %ld) in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "Keine Play Counts Datei: '%s' (mhdp-Header fehlt)."
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr "Play Counts Datei ('%s'): Headerlänge kleiner als erwarted (%d<96)."
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
-msgstr ""
-"Play Counts Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<12)."
+msgstr "Play Counts Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<12)."
 
-#: ../src/itdb_itunesdb.c:1009
+#: ../src/itdb_itunesdb.c:1019
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
-msgstr ""
-"iTunesStats Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<18)."
+msgstr "iTunesStats Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr "iTunesDB beschädigt: kein MHOD bei Offset %ld in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:1479
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1524
+#, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
-msgstr ""
-"Es wurde nicht wie erwarted ein 'SLst'-Hunk gefunden. Es wird trotzdem "
-"versucht, weiterzumachen.\n"
+msgstr "Unbekannte Aktion für Smart Playlist bei %ld: %x. Es wird trotzdem versucht, weiterzumachen.\n"
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
-msgid ""
-"Length of smart playlist rule field (%d) not as expected. Trying to continue "
-"anyhow.\n"
-msgstr ""
-"Die Länge einer Regel (%d) einer intelligenten Wiedergabeliste weicht von "
-"der erwarteten Länge ab. Es wird versucht fortzufahren.\n"
+msgid "Length of smart playlist rule field (%d) not as expected. Trying to continue anyhow.\n"
+msgstr "Die Länge einer Regel (%d) einer intelligenten Wiedergabeliste weicht von der erwarteten Länge ab. Es wird versucht fortzufahren.\n"
 
-#: ../src/itdb_itunesdb.c:1553
+#: ../src/itdb_itunesdb.c:1598
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr "iTunesDB beschädigt: kein SLst-Eintrag bei Offset %ld in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
 "\n"
 msgstr ""
-"Unbekannter MHOD-Typ (%d) während des Parsens der iTunesDB gefunden. Es wird "
-"versucht fortzufahren.\n"
+"Unbekannter MHOD-Typ (%d) während des Parsens der iTunesDB gefunden. Es wird versucht fortzufahren.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
-msgstr ""
-"iTunesDB beschädigt: Hunklänge ist Null für den Hunk an Offset %ld in Datei "
-"'%s'."
+msgstr "iTunesDB beschädigt: Hunklänge ist Null für den Hunk an Offset %ld in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:1658
+#: ../src/itdb_itunesdb.c:1704
 #, c-format
-msgid ""
-"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
-msgstr ""
-"iTunesDB beschädigt: kein '%s'-Eintrag in Sektion '%s' (startend bei %ld) "
-"gefunden."
+msgid "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr "iTunesDB beschädigt: kein '%s'-Eintrag in Sektion '%s' (startend bei %ld) gefunden."
 
-#: ../src/itdb_itunesdb.c:1672
+#: ../src/itdb_itunesdb.c:1718
 #, c-format
-msgid ""
-"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
-"'%s'."
-msgstr ""
-"Header-Länge des Abschnitts '%s' ist kleiner als erwartet (%d < %d) an "
-"Offset %ld in Datei '%s'."
+msgid "header length of '%s' smaller than expected (%d < %d) at offset %ld in file '%s'."
+msgstr "Header-Länge des Abschnitts '%s' ist kleiner als erwartet (%d < %d) an Offset %ld in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "Keine iTunesDB Datei: '%s' (kein mhdb-Header)."
 
-#: ../src/itdb_itunesdb.c:1774
+#: ../src/itdb_itunesdb.c:1820
 #, c-format
-msgid ""
-"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
-"Aborting."
-msgstr ""
-"iTunesDB ('%s'): Headerlänge des mhsd-Hunks is kleiner als erwartet (%d<32). "
-"Breche ab."
+msgid "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). Aborting."
+msgstr "iTunesDB ('%s'): Headerlänge des mhsd-Hunks is kleiner als erwartet (%d<32). Breche ab."
 
-#: ../src/itdb_itunesdb.c:1795
+#: ../src/itdb_itunesdb.c:1841
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
-msgstr ""
-"Die iTunesDB '%s' ist beschädigt: bei Offset %ld wird ein mhsd-Abschnitt "
-"erwartet."
+msgstr "Die iTunesDB '%s' ist beschädigt: bei Offset %ld wird ein mhsd-Abschnitt erwartet."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
-msgstr ""
-"Anzahl der MHODs-Abschnitte in der mhip-Sektion an Offset %ld ist in der "
-"Datei '%s' nicht konsistent."
+msgstr "Anzahl der MHODs-Abschnitte in der mhip-Sektion an Offset %ld ist in der Datei '%s' nicht konsistent."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "Itdb_Track ID '%d' nicht gefunden.\n"
 
-#: ../src/itdb_itunesdb.c:2099
+#: ../src/itdb_itunesdb.c:2146
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
-msgstr ""
-"Anzahl der MHOD-Abschnitte in der mhyp-Sektion bei Offset %ld in der Datei '%"
-"s' ist inkonsistent."
+msgstr "Anzahl der MHOD-Abschnitte in der mhyp-Sektion bei Offset %ld in der Datei '%s' ist inkonsistent."
 
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr "Haupt-PL"
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
 msgstr "Podcasts"
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "Wiedergabeliste"
 
-#: ../src/itdb_itunesdb.c:2137
+#: ../src/itdb_itunesdb.c:2184
 #, c-format
-msgid ""
-"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
-"ld in file '%s'."
-msgstr ""
-"Die iTunesDB ist beschädigt: die Anzahl der mhip-Sektionen im mhyp-Abschnit "
-"startend bei %ld in Datei '%s' ist inkonsistent."
+msgid "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %ld in file '%s'."
+msgstr "Die iTunesDB ist beschädigt: die Anzahl der mhip-Sektionen im mhyp-Abschnit startend bei %ld in Datei '%s' ist inkonsistent."
 
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "OTG-Wiedergabeliste"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "Keine OTG (On-The-Go) Wiedergabelistendatei: '%s' (mhpo-Header fehlt)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
-msgstr ""
-"OTG (On-The-Go) Wiedergabelistendatei ('%s'): Headerlänger kleiner als "
-"erwartet (%d<20)."
+msgstr "OTG (On-The-Go) Wiedergabelistendatei ('%s'): Headerlänger kleiner als erwartet (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2522
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2571
+#, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
-msgstr ""
-"OTG (On-The-Go) Wiedergabelistendatei ('%s'): Länge der Einträge kleiner als "
-"erwartet (%d<4)."
+msgstr "OTG (On-The-Go) Wiedergabelistendatei ('%s'): Länge der Einträge ist kleiner als erwartet (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
-msgstr ""
-"OTG (On-The-Go) Wiedergabelistendateii '%s' bezieht sich auf ein nicht "
-"existierendes Stück (%d)."
+msgstr "OTG (On-The-Go) Wiedergabelistendateii '%s' bezieht sich auf ein nicht existierendes Stück (%d)."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "OTG-Wiedergabeliste %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
-msgid ""
-"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
-"continue.\n"
-msgstr ""
-"Die iTunesDB ist beschädigt: Anzahl der Stücke (mhit-Hunks) ist nicht "
-"konsistent. Versuche fortzufahren.\n"
+#: ../src/itdb_itunesdb.c:2719
+msgid "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to continue.\n"
+msgstr "Die iTunesDB ist beschädigt: Anzahl der Stücke (mhit-Hunks) ist nicht konsistent. Versuche fortzufahren.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
-msgid ""
-"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
-"Trying to continue.\n"
-msgstr ""
-"iTunesDB möglicherweise beschädigt: Anzahl der Wiedergabelisten (mhyp-Hunks) "
-"ist nicht konsistent. Versuche fortzufahren.\n"
+#: ../src/itdb_itunesdb.c:2782
+msgid "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. Trying to continue.\n"
+msgstr "iTunesDB möglicherweise beschädigt: Anzahl der Wiedergabelisten (mhyp-Hunks) ist nicht konsistent. Versuche fortzufahren.\n"
 
-#: ../src/itdb_itunesdb.c:2780
+#: ../src/itdb_itunesdb.c:2829
 #, c-format
-msgid ""
-"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
-"found)"
-msgstr ""
-"Die iTunesDB '%s' ist beschädigt: die Trackliste konnte nicht gefunden "
-"werden (kein mhsd-Abschnitt des Typs 1 gefunden)."
+msgid "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section found)"
+msgstr "Die iTunesDB '%s' ist beschädigt: die Trackliste konnte nicht gefunden werden (kein mhsd-Abschnitt des Typs 1 gefunden)."
 
-#: ../src/itdb_itunesdb.c:2809
+#: ../src/itdb_itunesdb.c:2858
 #, c-format
-msgid ""
-"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
-"sections found)"
-msgstr ""
-"Die iTunesDB '%s' ist beschädigt: die Playlisten konnten nicht gefunden "
-"werden (keine mhsd-Abschnitte des Typs 2 oder 3 gefunden)."
+msgid "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 sections found)"
+msgstr "Die iTunesDB '%s' ist beschädigt: die Playlisten konnten nicht gefunden werden (keine mhsd-Abschnitte des Typs 2 oder 3 gefunden)."
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
-msgstr ""
-"Das 'iTunes'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
+msgstr "Das 'iTunes'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
-msgstr ""
-"Das 'Music'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
+msgstr "Das 'Music'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
-msgstr ""
-"Das 'Control'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
+msgstr "Das 'Control'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Datei nicht gefunden: '%s'."
 
-#: ../src/itdb_itunesdb.c:4753
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Öffnen der Datei '%s' zum Schreiben ist fehlgeschlagen (%s)."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
-#, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "Schreiben in die Datei '%s' ist fehlgeschlagen (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Pfad nicht gefunden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Fehler beim Umbenennen von '%s' nach '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633
+#: ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Fehler beim Entfernen von '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
-#, fuzzy
+#: ../src/itdb_itunesdb.c:5812
+#: ../src/itdb_itunesdb.c:5985
+#, c-format
 msgid "Mountpoint not set."
-msgstr "Mountpoint wurde nicht gesetzt.\n"
+msgstr "Mountpoint wurde nicht gesetzt."
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "No 'F..' directories were found in '%s'."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Pfad nicht gefunden: '%s'."
 
-#: ../src/itdb_itunesdb.c:5708
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:5994
+#, c-format
 msgid "'%s' could not be accessed (%s)."
-msgstr "Datei nicht auf Datei zugreifen: '%s'."
+msgstr "Auf Datei '%s' konnte nicht zugegriffen werden (%s)."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
-msgid ""
-"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
-msgstr ""
+msgid "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "Zieldatei '%s' scheint nicht auf dem iPod zu sein, welcher bei '%s' eingebunden ist."
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Fehler beim Öffnen von '%s' zum Lesen (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Fehler beim Öffnen von '%s' zum Schreiben (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Fehler beim Lesen aus '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Fehler beim Schreiben in die Datei '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268
+#: ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Fehler beim Schließen der Datei '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
 msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
-msgstr ""
-"Problem beim Erstellen eines Verzeichnisses oder einer Datei auf dem iPod: '%"
-"s'."
+msgstr "Problem beim Erstellen eines Verzeichnisses oder einer Datei auf dem iPod: '%s'."
 
-#: ../src/itdb_photoalbum.c:109
+#: ../src/itdb_photoalbum.c:111
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr ""
-"Der Pfad zum Fotoverzeichnis konnte nicht gefunden werden: '%s' (oder "
-"ähnlich)."
+msgstr "Der Pfad zum Fotoverzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266
+#: ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
 msgstr "Fotoarchiv"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
-msgstr ""
-"Siem müssen das iPod-Model angeben, bevor Fotos hinzugefügt werden können."
+msgstr "Siem müssen das iPod-Model angeben, bevor Fotos hinzugefügt werden können."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
-msgid ""
-"Your iPod does not seem to support photos. Maybe you need to specify the "
-"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
-msgstr ""
-"Ihr iPod scheint Fotos nicht zu unterstützen. Eventuell müssen Sie auch nur "
-"das korrekte iPod-Model angeben. Zur Zeit haben Sie folgendes Modell "
-"eingestellt: 'x%s' (%s/%s)."
+msgid "Your iPod does not seem to support photos. Maybe you need to specify the correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr "Ihr iPod scheint Fotos nicht zu unterstützen. Eventuell müssen Sie auch nur das korrekte iPod-Model angeben. Zur Zeit haben Sie folgendes Modell eingestellt: 'x%s' (%s/%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
 msgstr "Konnte nicht auf die Datei '%s' zugreifen. Foto nicht hinzugefügt."
 
-#: ../src/itdb_photoalbum.c:451
-msgid ""
-"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
-"please report."
-msgstr ""
-"Unerwarteter Fehler in itdb_photodb_add_photo_internal() während des "
-"Hinzufügens eines Fotos. Bitter teilen Sie uns diesen Vorgang mit."
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, please report."
+msgstr "Unerwarteter Fehler in itdb_photodb_add_photo_internal() während des Hinzufügens eines Fotos. Bitter teilen Sie uns diesen Vorgang mit."
 
-#: ../src/itdb_photoalbum.c:471
-msgid ""
-"Library compiled without gdk-pixbuf support. Picture support is disabled."
-msgstr ""
-"Die Bibliothek wurde ohne gdk-pixbuf-Unterstützung kompiliert. Fotos werden "
-"daher nicht unterstützt."
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid "Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr "Die Bibliothek wurde ohne gdk-pixbuf-Unterstützung kompiliert. Fotos werden daher nicht unterstützt."
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
-msgstr ""
-"Unbekannte Aktion (%d) in intelligenter Wiedergabeliste wird ignoriert.\n"
+msgstr "Unbekannte Aktion (%d) in intelligenter Wiedergabeliste wird ignoriert.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nicht zulässiger Dateiname: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Mountpoint wurde nicht gesetzt.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
-"  <albumname> should be set to 'NULL' to add photos to the master photo "
-"album\n"
-"  (Photo Library) only. If you don't specify any filenames an empty album "
-"will\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album will\n"
 "  be created.\n"
 msgstr ""
 "Syntax, um Fotos hinzuzufügen:\n"
-"\n"
 "  %s add <Mountpoint> <Name des Albums> [<Dateiname(n)>]\n"
 "  <Name des Albums> sollte als 'NULL' angegeben, um Fotos zum nur Haupalbum\n"
 "  (Fotoarchiv) hinzuzufügen. Wenn keine Dateinamen angegeben werden, wird\n"
 "  ein leeres Album erstellt.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
@@ -610,7 +654,7 @@
 "Syntax, um alle vorhandenen Fotos nach <Verzeichnis> zu kopieren:\n"
 "  %s dump <mountpoint> <Verzeichnis>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
@@ -619,8 +663,8 @@
 "Syntax,  um eine Liste der IDs aller vorhandenen Fotos auszugeben:\n"
 "  %s list <mountpoint>\n"
 
-#: ../tests/test-photos.c:42
-#, fuzzy, c-format
+#: ../tests/test-photos.c:44
+#, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
 "  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
@@ -631,51 +675,58 @@
 msgstr ""
 "Syntax, um Fotos aus dem Fotoarchiv zu entfernen:\n"
 "  %s remove <Mountpoint> <Name des Albums> [<ID(s)>]\n"
-"  <Name des Albums> sollte als 'Null' angegeben werden, um Fotos "
-"vollständig\n"
+"  <Name des Albums> sollte als 'Null' angegeben werden, um Fotos vollständig\n"
 "  vom iPod zu entfernen. Wenn keine IDs angegeben werden, wird stattdessen\n"
 "  das bezeichnete Fotoalbum entfernt.\n"
 "  Vorsicht: IDs können sich verändern, wenn die Datenbank geschrieben wird.\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
 msgstr "Falsche Anzahl an Kommandozeilenargumenten.\n"
 
-#: ../tests/test-photos.c:135
+#: ../tests/test-photos.c:128
 #, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Fehler beim Erstellen von '%s' (mkdir).\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "Fehler: '%s' ist kein Verzeichnis\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
+#: ../tests/test-photos.c:143
+#: ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
 #, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "Fehler beim Lesen des iPod Fotobarchivs (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149
+#: ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
 msgstr "Fehler beim Lesen der iPod Fotodatenbank.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167
+#: ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296
+#: ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
 msgstr "Unzureichende Anzahl von Kommandozeilenargumenten.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
 msgstr "<Unbenannt>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
 msgstr "<Keine Einträge>\n"
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -684,57 +735,100 @@
 "Fehler beim Lesen der iPod Fotobibliothek (%s).\n"
 "Es wird versucht, eine neue Datenbank zu erstellen.\n"
 
-#: ../tests/test-photos.c:249
-msgid ""
-"Error reading iPod photo database, will attempt to create a new database\n"
-msgstr ""
-"Fehler beim Lesen der iPod Fotodatenbank. Es wird versucht, eine neue "
-"Datenbank zu erstellen.\n"
+#: ../tests/test-photos.c:242
+#, c-format
+msgid "Error reading iPod photo database, will attempt to create a new database\n"
+msgstr "Fehler beim Lesen der iPod Fotodatenbank. Es wird versucht, eine neue Datenbank zu erstellen.\n"
 
-#: ../tests/test-photos.c:274
+#: ../tests/test-photos.c:267
 #, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
 msgstr "Fehler beim Hinzufügen des Fotos (%s) zur Fotobibliothek: %s\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
 msgstr "Gewünschtes Album '%s' nicht gefunden. Breche ab.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
-msgstr ""
-"Es ist nicht möglich, die 'Fotoarchiv'-Wiedergabeliste zu entfernen. Breche "
-"ab.\n"
+msgstr "Es ist nicht möglich, die 'Fotoarchiv'-Wiedergabeliste zu entfernen. Breche ab.\n"
 
-#: ../tests/test-photos.c:364
+#: ../tests/test-photos.c:357
 #, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
-msgstr ""
-"Warnung: das Foto mit der ID <%d> konnte nicht gefunden werden. Ich mache "
-"mit dem nächsten Foto weiter...\n"
+msgstr "Warnung: das Foto mit der ID <%d> konnte nicht gefunden werden. Ich mache mit dem nächsten Foto weiter...\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
 msgstr "Unbekanntes Kommando: '%s'\n"
 
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Konnte iPod nicht initialisieren: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Konnte iPod nicht initialisieren: unbekannte Fehler\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "Benutzung: %s <Gerät> <Mountpoint>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Konnte xml SysInfoExtended nicht von %s lesen\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Konnte den Device Ordnerpfad auf %s nicht auflösen"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Konnte SysInfoExtended-Pfad auf %s nicht auflösen"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Konnte SysInfoExtended nicht nach %s schreiben"
+
+#~ msgid "First Generation"
+#~ msgstr "Erste Generation"
+#~ msgid "Second Generation"
+#~ msgstr "Zweite Generation"
+#~ msgid "Third Generation"
+#~ msgstr "Dritte Generation"
+#~ msgid "Fourth Generation"
+#~ msgstr "Vierte Generation"
+#~ msgid "Fifth Generation"
+#~ msgstr "Fünfte Generation"
+#~ msgid "Sixth Generation"
+#~ msgstr "Sechste Generation"
+#~ msgid "Opening of '%s' for writing failed (%s)."
+#~ msgstr "Öffnen der Datei '%s' zum Schreiben ist fehlgeschlagen (%s)."
+#~ msgid "Writing to '%s' failed (%s)."
+#~ msgstr "Schreiben in die Datei '%s' ist fehlgeschlagen (%s)."
 #~ msgid "Cannot write mhod of type %d\n"
 #~ msgstr "Schreiben eines mhod-Hunks vom Typ %d ist nicht unterstützt.\n"
-
 #~ msgid "Error reading iPod photo database"
 #~ msgstr "Fehler beim Lesen des iPod Fotoarchivs"
-
 #~ msgid "Writing to '%s' failed."
 #~ msgstr "Fehler beim Schreiben in die Datei '%s'."
-
 #~ msgid "Database in memory corrupt (track pointer == NULL). Aborting export."
 #~ msgstr ""
 #~ "Datenbank im Speicher beschädigt (Zeiger auf Stück == NULL). Der Export "
 #~ "wird abgebrochen."
-
 #~ msgid ""
 #~ "Database in memory corrupt (playlist pointer == NULL). Aborting export."
 #~ msgstr ""
 #~ "Datenbank im Speicher beschädigt (Zeiger auf Wiedergabeliste == NULL). "
 #~ "Der Export wird abgebrochen."
+

Modified: libgpod/trunk/po/es.po
===================================================================
--- libgpod/trunk/po/es.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/es.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,13 +1,13 @@
 # translation of libgpod.es.po to spanish
-# Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>, 2006, 2007.
+# Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>, 2006, 2007, 2008.
 # This file is distributed under the same license as the libgpod package.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
 msgid ""
 msgstr ""
 "Project-Id-Version: libgpod\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2007-06-13 21:42+0200\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2008-12-26 14:57+0100\n"
 "Last-Translator: Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>\n"
 "Language-Team: spanish <es_ES>\n"
 "MIME-Version: 1.0\n"
@@ -16,237 +16,347 @@
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Generator: KBabel 1.11.4\n"
 
-#: ../src/db-artwork-parser.c:131
+#: ../src/db-artwork-parser.c:156
 #, c-format
-msgid "Unexpected mhod3 string type: %d\n"
-msgstr "Tipo de cadena mhod3 no esperado: %d\n"
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Tipo de cadena mhod no esperado: %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Índice mhsd no esperado: %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr ""
 "No se ha podido encontrar la pista correspondiente (dbid: %s) a la "
 "carátula.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
 msgstr ""
 "El tamaño de las carátulas de iTunesDB y ArtworkDB no es consistente (%d+%d !"
 "= %d)\n"
 
-#: ../src/db-artwork-parser.c:463
+#: ../src/db-artwork-parser.c:566
 #, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr "Índice mhsd no esperado: %d\n"
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "No se ha podido encontrar la carátula (mhii id: %u) correspondiente a la pista (dbid: %s) .\n"
 
-#: ../src/db-image-parser.c:118
+#: ../src/db-image-parser.c:91
 #, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr ""
-"Tipo de imágen en mhni no esperado: tamaño: %ux%u (%d), desplazamiento: %d\n"
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Tipo de imagen inesperado en mhni: %d, desplazamiento: %d\n"
 
-#: ../src/itdb_artwork.c:199
+#: ../src/itdb_artwork.c:163
 #, c-format
 msgid "Could not access file '%s'."
 msgstr "No se ha podido acceder al fichero '%s'"
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
 msgstr "libgpod compilado sin soporte de carátulas."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr "Nombre de fichero no válido: '%s'.\n"
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr "Punto de montaje no configurado.\n"
-
-#: ../src/itdb_artwork.c:554
-#, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Fichero no encontrado en el iPod: '%s'\n"
 
-#: ../src/itdb_artwork.c:768
+#: ../src/itdb_artwork.c:828
 #, c-format
 msgid ""
 "Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
-msgstr ""
-"Imposible cargar el thumbnail (parece estar en el iPod, pero no hay "
-"información disponible de la imagen): tipo: %d, nombre de fichero: '%s'\n"
+"available): filename: '%s'\n"
+msgstr "Imposible cargar la imagen de muestra (parece estar en el iPod, pero no hay información disponible de la imagen): nombre de fichero: '%s'\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
 msgstr "Inválido"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257 ../src/itdb_device.c:298
 msgid "Unknown"
 msgstr "Desconocido"
 
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
 msgstr "Color"
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
 msgstr "Color U2"
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
 msgstr "Escala de grises"
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
 msgstr "Escala de grises U2"
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
 msgstr "Mini (Plata)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
 msgstr "Mini (Azul)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
 msgstr "Mini (Rosa)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
 msgstr "Mini (Verde)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
 msgstr "Mini (Oro)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
 msgstr "Shuffle"
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
 msgstr "Nano (Blanco)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
 msgstr "Nano (Negro)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
 msgstr "Video (Blanco)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
 msgstr "Video (Negro)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
 msgstr "Móvil (1)"
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
 msgstr "Video U2"
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
 msgstr "Nano (Plata)"
 
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
 msgstr "Nano (Azul)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
 msgstr "Nano (Verde)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
 msgstr "Nano (Rosa)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr "Primera generación"
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "Nano (Rojo)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr "Segunda generación"
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "Nano (Amarillo)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr "Tercera generación"
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "Nano (Púrpura)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr "Cuarta generación"
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "Nano (Naranja)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr "Quinta generación"
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr "Sexta generación"
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (Plata)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
-msgstr "Teléfono móvil"
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (Rosa)"
 
-#: ../src/itdb_device.c:470
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (Azul)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "Shuffle (Verde)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (Naranja)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (Púrpura)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "Shuffle (Rojo)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "Clásico (Plata)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "Clásico (Negro)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "Touch (Negro)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "Normal (1ª generación)"
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "Normal (2ª generación)"
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "Normal (3ª generación)"
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "Normal (4ª generación)"
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "Foto"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "Teléfonos móviles"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1ª generación)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2ª generación)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1ª generación)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "Suffle (2ª generación)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "Suffle (3ª generación)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1ª generación)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2ª generación)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Video (3ª generación)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video (4ª generación)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "Video (1ª generación)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "Video (2ª generación)"
+
+#: ../src/itdb_device.c:316 ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "Clásico"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:320 ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "Sin usar"
+
+#: ../src/itdb_device.c:874
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "Error al abrir '%s' para su escritura."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
 msgstr "No existe el directorio del dispositivo."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "Acceso ilegal al desplazamiento %ld (tamaño %ld) en el fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "No es un fichero cuenta reproducciones: '%s' (falta cabecera mhdp)."
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr ""
 "Fichero cuenta reproducciones ('%s'): tamaño de la cabecera menor del "
 "esperado (%d<96)."
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr ""
 "Fichero cuenta reproducciones ('%s'): tamaño de la entrada menor del "
 "esperado (%d<12)."
 
-#: ../src/itdb_itunesdb.c:1009
+#: ../src/itdb_itunesdb.c:1019
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr ""
 "Fichero cuenta reproducciones ('%s'): tamaño de la entrada menor del "
 "esperado (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
-msgstr ""
-"iTunesDB corrupta: no hay MHOD en el desplazamiento %ld del fichero '%s'."
+msgstr "iTunesDB corrupta: no hay MHOD en el desplazamiento %ld del fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:1479
+#: ../src/itdb_itunesdb.c:1524
 #, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
 msgstr "Regla de acción desconocida en %ld: %x. Intentando continuar.\n"
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -255,13 +365,12 @@
 "La longitud del campo de reglas (%d) de la lista de reproducción inteligente "
 "no es la esperada. Intentando continuar.\n"
 
-#: ../src/itdb_itunesdb.c:1553
+#: ../src/itdb_itunesdb.c:1598
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
-msgstr ""
-"iTunesDB corrupta: no hay SLst en el desplazamiento %ld del fichero '%s'."
+msgstr "iTunesDB corrupta: no hay SLst en el desplazamiento %ld del fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -271,20 +380,19 @@
 "Ignorando.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
 msgstr "iTunesDB corrupta: tamaño 0 para la zona %ld en el fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:1658
+#: ../src/itdb_itunesdb.c:1704
 #, c-format
-msgid ""
-"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgid "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
 msgstr ""
 "iTunesDB corrupta: no se ha encontrado la sección '%s' en la sección '%s' "
 "empezando en %ld."
 
-#: ../src/itdb_itunesdb.c:1672
+#: ../src/itdb_itunesdb.c:1718
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -293,12 +401,12 @@
 "Tamaño de la cabecera de '%s' menor del esperado (%d<%d). en el "
 "desplazamiento %ld del fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "No es un fichero iTunesDB: '%s' (falta la cabecera mhdb)."
 
-#: ../src/itdb_itunesdb.c:1774
+#: ../src/itdb_itunesdb.c:1820
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -307,41 +415,39 @@
 "iTunesDB ('%s'): tamaño de la cabecera de la zona mhsd menor del esperado (%"
 "d<32). Cancelando."
 
-#: ../src/itdb_itunesdb.c:1795
+#: ../src/itdb_itunesdb.c:1841
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunesDB '%s' corrupta: se esperaba mhsd en %ld."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
-msgstr ""
-"El número de MHODs en mhip en %ld no es consistente en el fichero '%s'."
+msgstr "El número de MHODs en mhip en %ld no es consistente en el fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "Itdb_Track ID '%d' no encontrada.\n"
 
-#: ../src/itdb_itunesdb.c:2099
+#: ../src/itdb_itunesdb.c:2146
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
-msgstr ""
-"El número de MHODs en mhyp en %ld no es consistente en el fichero '%s'."
+msgstr "El número de MHODs en mhyp en %ld no es consistente en el fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr "Lista de reproducción principal"
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
 msgstr "Podcasts"
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "Lista de reproducción"
 
-#: ../src/itdb_itunesdb.c:2137
+#: ../src/itdb_itunesdb.c:2184
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
@@ -350,43 +456,43 @@
 "iTunesDB corrupta: el número de secciones mhip no es consistente en mhyp "
 "empezando en %ld en el fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "Lista de reproducción OTG"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "No es una lista de reproducción: '%s' (falta la cabecera mhpo)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr ""
 "Fichero de lista de reproducción OTG ('%s'): tamaño de la cabecera menor del "
 "esperado (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2522
+#: ../src/itdb_itunesdb.c:2571
 #, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
 msgstr ""
 "Fichero ('%s') de la lista de reproducción OTG: tamaño de la entrada menor "
 "del esperado (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr ""
 "La lista de reproducción OTG '%s': hace referencia a una pista no existente "
 "(%d)."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "Lista de reproducción OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
+#: ../src/itdb_itunesdb.c:2719
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
@@ -395,7 +501,7 @@
 "Intentando continuar.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
+#: ../src/itdb_itunesdb.c:2782
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -403,7 +509,7 @@
 "Es posible que iTunesDB esté corrupta: el número de listas de reproducción "
 "(zonas mhyp) no es consistente. Intentando continuar.\n"
 
-#: ../src/itdb_itunesdb.c:2780
+#: ../src/itdb_itunesdb.c:2829
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
@@ -412,7 +518,7 @@
 "iTunesDB '%s' corrputa: No se ha encontrado la lista de pistas (no se ha "
 "encontrado la sección mhsd de tipo 1)"
 
-#: ../src/itdb_itunesdb.c:2809
+#: ../src/itdb_itunesdb.c:2858
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
@@ -421,126 +527,115 @@
 "iTunesDB '%s' corrputa: No se han encontrado las listas de reproducción (no "
 "se han encontrado las secciones mhsd de tipo 2 o tipo 3)"
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "Directorio 'iTunes' no encontrado: '%s' (o similar)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Directorio 'Music' no encontrado: '%s' (o similar)"
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Directorio 'iPod Control' no encontrado: '%s' (o similar)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Fichero no encontrado: '%s'."
 
-#: ../src/itdb_itunesdb.c:4753
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "No se ha podido abrir '%s' para su escritura (%s)."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
-#, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "No se ha podido escribir '%s' (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Ruta no encontrada: '%s' (o similar)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Error al renombrar '%s' a '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633 ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Error al borrar '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
+#: ../src/itdb_itunesdb.c:5812 ../src/itdb_itunesdb.c:5985
+#, c-format
 msgid "Mountpoint not set."
 msgstr "Punto de montaje no configurado."
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "No se ha encontrado ningún directorio en '%s'."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Ruta no encontrada: '%s'."
 
-#: ../src/itdb_itunesdb.c:5708
+#: ../src/itdb_itunesdb.c:5994
 #, c-format
 msgid "'%s' could not be accessed (%s)."
 msgstr "No se ha podido acceder al fichero '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
-msgid ""
-"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
-msgstr ""
-"El destino del fichero '%s' parece no existir en el iPod montado en '%s'"
+msgid "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "El destino del fichero '%s' parece no existir en el iPod montado en '%s'"
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Error al abrir '%s' para su lectura (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Error al abrir '%s' para su escritura (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Error durante la lectura de '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Error durante la escritura de '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268 ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Error al cerrar '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
 msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr "Problema al crear el directorio iPod o el fichero: '%s'."
 
-#: ../src/itdb_photoalbum.c:109
+#: ../src/itdb_photoalbum.c:111
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr "Directorio 'Photos' no encontrado: '%s' (o similar)."
+msgstr "Directorio 'de fotos' no encontrado: '%s' (o similar)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
 msgstr "Biblioteca de fotos"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
-msgstr ""
-"Es necesario especificar el modelo del iPod antes de poder añadir fotos."
+msgstr "Es necesario especificar el modelo del iPod antes de poder añadir fotos."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
 msgid ""
 "Your iPod does not seem to support photos. Maybe you need to specify the "
@@ -549,12 +644,13 @@
 "Parece que el iPod no soporta fotos. Quizás sea necesario especificar el "
 "modelo de iPod correcto. Actualmente está configurado como 'x%s' (%s/%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
 msgstr "No se ha podido acceder al fichero '%s'. No se ha añadido la foto."
 
-#: ../src/itdb_photoalbum.c:451
+#: ../src/itdb_photoalbum.c:448
+#, c-format
 msgid ""
 "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
 "please report."
@@ -562,22 +658,31 @@
 "Error inesperado en  itdb_photodb_add_photo_internal() mientras se añadía la "
 "foto. Informe, por favor."
 
-#: ../src/itdb_photoalbum.c:471
-msgid ""
-"Library compiled without gdk-pixbuf support. Picture support is disabled."
-msgstr ""
-"Biblioteca compilada sin soporte gdk-pixbuf. Soporte de imágenes desactivado."
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid "Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr "Biblioteca compilada sin soporte gdk-pixbuf. Soporte de imágenes desactivado."
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
 msgstr ""
 "Acción desconocida (%d) en la lista de reproducción inteligente. Será "
 "ignorada.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nombre de fichero no válido: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Punto de montaje no configurado.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
@@ -595,7 +700,7 @@
 "creará\n"
 " un álbum vacío.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
@@ -604,7 +709,7 @@
 "Uso para volcar todas las fotos a <directorio_de_salida>:\n"
 "  %s dump <punto_de_montaje> <directorio_de_salida>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
@@ -613,7 +718,7 @@
 "Uso para listar todas las IDs de las fotos a la salida estándar:\n"
 "  %s list <punto_de_montaje>\n"
 
-#: ../tests/test-photos.c:42
+#: ../tests/test-photos.c:44
 #, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
@@ -630,45 +735,49 @@
 "  En caso de no especificar ningún ID, se borrará el álbum de fotos\n"
 "  AVISO: los IDs pueden cambiar cuando se escribe el fichero PhotoDB.\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
 msgstr "Número de argumentos incorrecto.\n"
 
-#: ../tests/test-photos.c:135
+#: ../tests/test-photos.c:128
 #, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Error al crear '%s' (mkdir)\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "Error: '%s' no es un directorio\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
 #, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "Error al leer la base de datos de fotos del iPod (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
 msgstr "Error al leer la base de datos de fotos del iPod.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
 msgstr "Número de argumentos insuficiente.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
 msgstr "<Sin nombre>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
 msgstr "<No miembros>\n"
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -677,35 +786,72 @@
 "Error al leer la base de datos de fotos del iPod (%s).\n"
 "Se intentará crear una nueva base de datos.\n"
 
-#: ../tests/test-photos.c:249
-msgid ""
-"Error reading iPod photo database, will attempt to create a new database\n"
+#: ../tests/test-photos.c:242
+#, c-format
+msgid "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
 "Error al leer la base de datos de fotos del iPod, se intentará crear una "
 "nueva base de datos\n"
 
-#: ../tests/test-photos.c:274
+#: ../tests/test-photos.c:267
 #, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
 msgstr "Error al añadir la foto (%s) a la base de datos de fotos: %s\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
 msgstr "No se ha encontrado el álbum especificado '%s'. Cancelando.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
 msgstr ""
 "No se puede borrar la lista de reproducción de la biblioteca de fotos. "
 "Cancelando.\n"
 
-#: ../tests/test-photos.c:364
+#: ../tests/test-photos.c:357
 #, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
-msgstr "Aviso: no se puede encontrar la foto con ID <%d>. Ignorando...\n"
+msgstr "Aviso: no se ha podido encontrar la foto con ID <%d>. Ignorando...\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
 msgstr "Comando desconocido '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Error al inicializar iPod: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Error al inicializar iPod, error desconocido\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "uso: %s <dispositivo> <punto_de_montaje>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "No se ha podido leer sysinfo xml de %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "No se ha podido resolver la ruta del directorio de dispositivo en %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "No se ha podido resolver la ruta SysInfoExtended en%s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "No se ha podido escribir SysInfoExtended a %s"
+

Modified: libgpod/trunk/po/fr.po
===================================================================
--- libgpod/trunk/po/fr.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/fr.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,16 +1,16 @@
 # French language translation for gtkpod 
-# Copyright (C) 2005-2007 Éric Lassauge
-# Éric Lassauge <lassauge at users.sf.net>, 2007.
+# Copyright (C) 2005-2008 Éric Lassauge
+# Éric Lassauge <lassauge at users.sf.net>, 2008.
 # Copyright (C) 2003 David Le Brun
 # David Le Brun <david at dyn-ns.net>, 2003.
 #
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgpod-0.5.2\n"
+"Project-Id-Version: libgpod-0.7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2007-07-02 22:31+0100\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2008-12-11 14:37+0000\n"
 "Last-Translator: Éric Lassauge <rpmfarm at free.fr>\n"
 "Language-Team: FR\n"
 "MIME-Version: 1.0\n"
@@ -18,235 +18,350 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n>1;\n"
 
-#: ../src/db-artwork-parser.c:131
+#: ../src/db-artwork-parser.c:156
 #, c-format
-msgid "Unexpected mhod3 string type: %d\n"
-msgstr "Type de chaîne mhod3 inattendu : %d\n"
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Type de chaîne mhod inattendu : %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Index mhsd inattendu : %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr "Impossible de trouver la piste (dbid : %s) pour l'image.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
 msgstr ""
 "Tailles inconsistantes pour l'image entre iTunesDB et ArtworkDB (%d+%d != %"
 "d)\n"
 
-#: ../src/db-artwork-parser.c:463
+#: ../src/db-artwork-parser.c:566
 #, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr "Index mhsd inattendu : %d\n"
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr ""
+"Impossible de trouver l'image (mhii id : %u) pour la piste (dbid : %s).\n"
 
-#: ../src/db-image-parser.c:118
+#: ../src/db-image-parser.c:91
 #, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr "Type d'image inattendu dans mhni : taille : %ux%u (%d), offset : %d\n"
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Type d'image inattendu dans mhni : %d, offset : %d\n"
 
-#: ../src/itdb_artwork.c:199
+#: ../src/itdb_artwork.c:163
 #, c-format
 msgid "Could not access file '%s'."
-msgstr "Impossible de trouver sur le iPod : « %s »."
+msgstr "Impossible d'accéder au fichier « %s »."
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
 msgstr "Pas de support des images dans libgpod."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr "Nom de fichier illégal : « %s ».\n"
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr "Point de montage non défini.\n"
-
-#: ../src/itdb_artwork.c:554
-#, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Impossible de trouver sur le iPod : « %s »\n"
 
-#: ../src/itdb_artwork.c:768
+#: ../src/itdb_artwork.c:828
 #, c-format
 msgid ""
 "Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
+"available): filename: '%s'\n"
 msgstr ""
 "Impossible de récupérer l'imagette (apparemment sur l'iPod, mais aucune info "
-"d'image disponible : type : %d, fichier : « %s »\n"
+"d'image disponible : fichier : « %s »\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
 msgstr "Invalide"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257 ../src/itdb_device.c:298
 msgid "Unknown"
 msgstr "Inconnu"
 
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
 msgstr "Couleur"
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
-msgstr "U2 Couleur"
+msgstr "U2 couleur"
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
 msgstr "Niveaux de gris"
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
 msgstr "U2 niveaux de gris"
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
-msgstr "Mini (Argent)"
+msgstr "Mini (argent)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
-msgstr "Mini (Bleu)"
+msgstr "Mini (bleu)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
-msgstr "Mini (Rose)"
+msgstr "Mini (rose)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
-msgstr "Mini (Vert)"
+msgstr "Mini (vert)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
-msgstr "Mini (Or)"
+msgstr "Mini (or)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
 msgstr "Shuffle"
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
-msgstr "Nano (Blanc)"
+msgstr "Nano (blanc)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
-msgstr "Nano (Noir)"
+msgstr "Nano (noir)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
-msgstr "Vidéo (Blanc)"
+msgstr "Vidéo (blanc)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
-msgstr "Vidéo (Noir)"
+msgstr "Vidéo (noir)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
 msgstr "Mobile (1)"
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
 msgstr "U2 Vidéo"
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
-msgstr "Nano (Argent)"
+msgstr "Nano (argent)"
 
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
-msgstr "Nano (Bleu)"
+msgstr "Nano (bleu)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
-msgstr "Nano (Vert)"
+msgstr "Nano (vert)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
-msgstr "Nano (Rose)"
+msgstr "Nano (rose)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr "Premiére Génération"
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "Nano (rouge)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr "Seconde Génération"
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "Nano (jaune)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr "Troisième Génération"
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "Nano (violet)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr "Quatrième Génération"
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "Nano (orange)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr "Cinquième Génération"
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr "Sixième Génération"
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (argent)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
-msgstr "Téléphone Mobile"
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (rose)"
 
-#: ../src/itdb_device.c:470
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (bleu)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "Shuffle (vert)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (orange)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (violet)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "Shuffle (rouge)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "Classic (argent)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "Classic (noir)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "Touch (noir)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "Normal (1ière gen.)"
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "Normal (2nde gen.)"
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "Normal (3ième gen.)"
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "Normal (4ième gen.)"
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "Téléphones mobiles"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1ière gen.)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2nde gen.)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1ière gen.)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2nde gen.)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3ième gen.)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1ière gen.)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2nde gen.)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano (3ième gen.)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano vidéo(4ième gen.)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "Vidéo (1ière gen.)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "Vidéo (2nde gen.)"
+
+#: ../src/itdb_device.c:316 ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:320 ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "Inutilisé"
+
+#: ../src/itdb_device.c:874
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "Ne peut ouvrir en écriture le fichier « %s »."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
 msgstr "Le répertoire « Device » n'existe pas."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "Erreur de flux à l'offset %ld (longueur %ld) dans le fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "« %s » n'est pas un fichier de compteur (entête mhdp manquante)."
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr ""
 "Fichier de compteur (« %s ») : longueur de l'entête plus petite que prévue (%"
 "d < 96)."
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr ""
 "Fichier de compteur (« %s ») : longueur des données plus petite que prévue (%"
 "d < 12)."
 
-#: ../src/itdb_itunesdb.c:1009
+#: ../src/itdb_itunesdb.c:1019
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr ""
 "Fichier iTunesStats (« %s ») : longueur des données plus petite que prévue (%"
 "d < 18)."
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr "Corruption d'iTunesDB : pas de MHOD à l'offset %ld du fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:1479
+#: ../src/itdb_itunesdb.c:1524
 #, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
 msgstr ""
 "Règle de la liste intelligente inattendue %ld : %x. Tentative pour continuer "
 "quand même.\n"
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -255,32 +370,32 @@
 "Longueur du champ de la règle (%d) de la liste intelligente inattendue. "
 "Tentative pour continuer quand même.\n"
 
-#: ../src/itdb_itunesdb.c:1553
+#: ../src/itdb_itunesdb.c:1598
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr "Corruption d'iTunesDB : pas de SLst à l'offset %ld du fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
 "\n"
 msgstr "Type MHOD inconnu (%d) lors du parcours de iTunesDB. Erreur ignorée.\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
 msgstr "Corruption d'iTunesDB : longueur 0 à %ld du fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:1658
+#: ../src/itdb_itunesdb.c:1704
 #, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
 msgstr ""
-"Corruption d'iTunesDB : pas de section « %s » dans la section « %s » "
-"débutant à l'offset %ld."
+"Corruption d'iTunesDB : pas de section « %s » dans la section « %s » débutant "
+"à l'offset %ld."
 
-#: ../src/itdb_itunesdb.c:1672
+#: ../src/itdb_itunesdb.c:1718
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -289,12 +404,12 @@
 "longueur de l'entête « %s » plus petite que prévue (%d <  %d) à l'offset %ld "
 "du fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "« %s » n'est pas un fichier iTunesDB (entête mhdb manquante)."
 
-#: ../src/itdb_itunesdb.c:1774
+#: ../src/itdb_itunesdb.c:1820
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -303,41 +418,41 @@
 "iTunesDB (« %s ») : longueur de l'entête mhsd plus petite que prévue (%"
 "d < 32). Interruption."
 
-#: ../src/itdb_itunesdb.c:1795
+#: ../src/itdb_itunesdb.c:1841
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "Corruption d'iTunesDB « %s » : mhsd attendu à l'offset %ld."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
 msgstr ""
 "Nombre de MHODs dans mhip à l'offset %ld inconsistant dans le fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "Itdb_Track ID « %d » introuvable.\n"
 
-#: ../src/itdb_itunesdb.c:2099
+#: ../src/itdb_itunesdb.c:2146
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
 msgstr ""
 "Nombre de MHODs dans mhyp à l'offset %ld inconsistant dans le fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr "Liste principale"
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
 msgstr "Podcasts"
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "Liste de lecture"
 
-#: ../src/itdb_itunesdb.c:2137
+#: ../src/itdb_itunesdb.c:2184
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
@@ -346,40 +461,40 @@
 "Corruption d'iTunesDB : nombre de sections mhip inconsistant dans mhyp à "
 "l'offset %ld du fichier « %s »."
 
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "Liste de lecture OTG"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr ""
 "Le fichier « %s » n'est pas un fichier de liste OTG (entête mhpo manquant)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr "Fichier de liste OTG (« %s ») : entête plus petit que prévu (%d < 20)."
 
-#: ../src/itdb_itunesdb.c:2522
+#: ../src/itdb_itunesdb.c:2571
 #, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
 msgstr ""
 "Fichier de liste OTG ('%s') : longueur de données plus petite que prévue (%"
 "d<4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr "Fichier de liste OTG « %s » : référence à un morceau inexistant (%d)."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "Liste de lecture OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
+#: ../src/itdb_itunesdb.c:2719
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
@@ -388,7 +503,7 @@
 "continuer quand même.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
+#: ../src/itdb_itunesdb.c:2782
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -396,16 +511,16 @@
 "Corruption possible d'iTunesDB : nombre de listes (mhyp) incohérent. "
 "Tentative pour continuer quand même.\n"
 
-#: ../src/itdb_itunesdb.c:2780
+#: ../src/itdb_itunesdb.c:2829
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
 "found)"
 msgstr ""
-"Corruption de iTunesDB (« %s ») : impossible de trouver la liste des "
-"morceaux (pas de section mhsd de type 1)"
+"Corruption de iTunesDB (« %s ») : impossible de trouver la liste des morceaux "
+"(pas de section mhsd de type 1)"
 
-#: ../src/itdb_itunesdb.c:2809
+#: ../src/itdb_itunesdb.c:2858
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
@@ -414,127 +529,119 @@
 "Corruption de iTunesDB (« %s ») :  impossible de trouver les listes de "
 "lecture (pas de section mhsd de type 1 ou 3)"
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "Répertoire iTunes introuvable : « %s » (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Répertoire « Music » introuvable : « %s » (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Répertoire de contrôle introuvable :  « %s » (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Fichier introuvable : « %s »."
 
-#: ../src/itdb_itunesdb.c:4753
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Échec de l'ouverture en écriture de « %s » (%s)."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
-#, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "Échec de l'écriture dans « %s » (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Chemin introuvable : « %s » (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Impossible de renommer « %s » en « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633 ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Erreur de suppression du fichier « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
+#: ../src/itdb_itunesdb.c:5812 ../src/itdb_itunesdb.c:5985
+#, c-format
 msgid "Mountpoint not set."
 msgstr "Point de montage non défini."
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "Répertoires « F.. » introuvables dans « %s »."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Chemin introuvable : « %s »."
 
-#: ../src/itdb_itunesdb.c:5708
+#: ../src/itdb_itunesdb.c:5994
 #, c-format
 msgid "'%s' could not be accessed (%s)."
 msgstr "Impossible d'accéder à « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
 msgid ""
 "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
 msgstr ""
-"Le fichier de destination « %s » ne semble pas être présent dans l'iPod "
-"monté dans « %s »."
+"Le fichier de destination « %s » ne semble pas être présent dans l'iPod monté "
+"dans « %s »."
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Échec de l'ouverture en lecture de « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Échec de l'ouverture en écriture de « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Erreur lors de la lecture à partir de « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Erreur lors de l'écriture dans « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268 ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Erreur à la fermeture de « %s » (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
 msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr "Problème à la création du répertoire ou du fichier iPod : « %s »."
 
-#: ../src/itdb_photoalbum.c:109
+#: ../src/itdb_photoalbum.c:111
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "Répertoire « Photos » introuvable : « %s » (ou similaire)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
 msgstr "Librairie Photos"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
 msgstr ""
 "Vous devez préciser le modèle du iPod avant de pouvoir ajouter des photos."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
 msgid ""
 "Your iPod does not seem to support photos. Maybe you need to specify the "
@@ -544,12 +651,13 @@
 "spécifier le modèle correct d'iPod ? Il est actuellement configuré à « x%"
 "s » (%s/%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
 msgstr "Impossible d'accéder au fichier « %s ». Photo non ajoutée."
 
-#: ../src/itdb_photoalbum.c:451
+#: ../src/itdb_photoalbum.c:448
+#, c-format
 msgid ""
 "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
 "please report."
@@ -557,7 +665,8 @@
 "Erreur inattendue dans « itdb_photodb_add_photo_internal() » pendant l'ajout "
 "d'une photo, pensez à le signaler."
 
-#: ../src/itdb_photoalbum.c:471
+#: ../src/itdb_photoalbum.c:468
+#, c-format
 msgid ""
 "Library compiled without gdk-pixbuf support. Picture support is disabled."
 msgstr ""
@@ -565,13 +674,23 @@
 "inhibée"
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
 msgstr "L'action inconnue (%d) dans la liste intelligente sera ignorée.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nom de fichier illégal : « %s ».\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Point de montage non défini.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
@@ -587,7 +706,7 @@
 "    dans l'album photo principal.\n"
 "    Si vous ne précisez pas de nom de fichier un album vide sera créé.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
@@ -596,7 +715,7 @@
 "Utilisation pour copier toutes les photos dans <répertoire_de_copie> :\n"
 "  %s dump <point_de_montage> <répertoire_de_copie>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
@@ -605,7 +724,7 @@
 "Utilisation pour afficher tous les identifiants des photos :\n"
 "  %s list <point_de_montage>\n"
 
-#: ../tests/test-photos.c:42
+#: ../tests/test-photos.c:44
 #, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
@@ -623,45 +742,49 @@
 "    Attention : les identifiants peuvent changer lors de l'écriture\n"
 "    du fichier « PhotoDB ».\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
 msgstr "Nombre d'arguments incorrect pour la ligne de commande.\n"
 
-#: ../tests/test-photos.c:135
+#: ../tests/test-photos.c:128
 #, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Erreur à la création de « %s » (mkdir)\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "Erreur : « %s » n'est pas un répertoire\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
 #, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "Erreur à la lecture de la base de données des photos iPod (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
 msgstr "Erreur à la lecture de la base de données des photos iPod.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
 msgstr "Nombre d'arguments insuffisant pour la ligne de commande.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
 msgstr "<sans_nom>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
 msgstr "<sans membre>\n"
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -670,37 +793,74 @@
 "Erreur à la lecture de la base de données des photos iPod (%s).\n"
 "Tentative de créer une nouvelle base de données.\n"
 
-#: ../tests/test-photos.c:249
+#: ../tests/test-photos.c:242
+#, c-format
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
 "Erreur à la lecture de la base de données des photos iPod, Tentative de "
 "créer une nouvelle base de données.\n"
 
-#: ../tests/test-photos.c:274
+#: ../tests/test-photos.c:267
 #, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
 msgstr ""
 "Erreur à l'ajout de la photo (%s) dans la base de données des photos iPod : %"
 "s\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
 msgstr "Album « %s » non trouvé. Abandon.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
 msgstr "Impossible de supprimer la liste de la librairie Photo. Abandon.\n"
 
-#: ../tests/test-photos.c:364
+#: ../tests/test-photos.c:357
 #, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
 msgstr ""
 "Attention : impossible de trouver la photo avec l'identifiant <%d>. On passe "
 "à la suivante…\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
 msgstr "Commande inconnue « %s »\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Erreur d'initialisation du iPod : %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Erreur d'initialisation du iPod : erreur inconnue\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "utilisation : %s <périphérique> <point_de_montage>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Impossible de lire les « sysinfo xml » depuis %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Impossible de trouver le répertoire « Device » dans %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Impossible de trouver le chemin de « SysInfoExtended » dans %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Impossible d'écrire « SysInfoExtended » dans %s"

Modified: libgpod/trunk/po/he.po
===================================================================
--- libgpod/trunk/po/he.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/he.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,252 +1,364 @@
 # translation of gtkpod.po to HEBREW
 # This file is distributed under the same license as the gtkpod package
-# Assaf Gillat <gillata at gmail.com>, 2005.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+# Assaf Gillat <gillata at gmail.com>, 2008.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: gtkpod\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2005-08-02 21:19+0300\n"
-"Last-Translator: Assaf Gillat\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2008-12-09 23:07+0200\n"
+"Last-Translator: Assaf Gillat <gillata at gmail.com>\n"
 "Language-Team: HEBREW <kde-il at yahoogroups.com>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: KBabel 1.9.1\n"
+"X-Generator: poedit\n"
 
-#: ../src/db-artwork-parser.c:131
+#: ../src/db-artwork-parser.c:156
 #, c-format
-msgid "Unexpected mhod3 string type: %d\n"
-msgstr ""
+msgid "Unexpected mhod string type: %d\n"
+msgstr "סוג מחרוזת mhod לא צפוי: %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "אינדקס mhsd לא צפוי: %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
-msgstr ""
+msgstr "אי אפשר היה למצוא רצועה מתאימה (dbid: %s) עבור רשומת תמונת גלרייה.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
-msgstr ""
+msgstr "גודל תמונות הגלריה בין הiTunesDB והArtworkDB לא עקבי (%d+%d != %d)\n"
 
-#: ../src/db-artwork-parser.c:463
+#: ../src/db-artwork-parser.c:566
 #, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr ""
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "אי אפשר למצוא רשומת גלריית תמונות (mhii id: %u) עבור רצועה (dbid: %s).\n"
 
-#: ../src/db-image-parser.c:118
+#: ../src/db-image-parser.c:91
 #, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr ""
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "סוג תמונה לא צפוי ב mhni: %d, היסט: %d\n"
 
-#: ../src/itdb_artwork.c:199
-#, fuzzy, c-format
+#: ../src/itdb_artwork.c:163
+#, c-format
 msgid "Could not access file '%s'."
-msgstr "קובץ לא קיים: '%s'."
+msgstr "אי אפשר לגשת לקובץ: '%s'."
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181
+#: ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
-msgstr ""
+msgstr "תמיכה בגלריית תמונות לא הודרה לתוך libgpod."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr ""
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr ""
-
-#: ../src/itdb_artwork.c:554
-#, fuzzy, c-format
 msgid "Could not find on iPod: '%s'\n"
-msgstr "קובץ לא קיים: '%s'."
+msgstr "אי אפשר למצוא iPod: '%s'.\n"
 
-#: ../src/itdb_artwork.c:768
+#: ../src/itdb_artwork.c:828
 #, c-format
-msgid ""
-"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
-msgstr ""
+msgid "Unable to retrieve thumbnail (appears to be on iPod, but no image info available): filename: '%s'\n"
+msgstr "אי אפשר היה לאחזר את התמונות הממוזערות (כנראה הן על הiPod, אבל אין מידע תמונה זמין): קובץ '%s'\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
-msgstr ""
+msgstr "לא תקין"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257
+#: ../src/itdb_device.c:298
 msgid "Unknown"
-msgstr ""
+msgstr "לא ידוע"
 
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
-msgstr ""
+msgstr "צבע"
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
-msgstr ""
+msgstr "צבע U2"
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
-msgstr ""
+msgstr "גווני אפור"
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
-msgstr ""
+msgstr "גווני אפור U2"
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
-msgstr ""
+msgstr "מיני (כסוף)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
-msgstr ""
+msgstr "מיני (כחול)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
-msgstr ""
+msgstr "מיני (ורוד)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
-msgstr ""
+msgstr "מיני (ירוק)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
-msgstr ""
+msgstr "מיני (זהב)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
-msgstr ""
+msgstr "שאפל"
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
-msgstr ""
+msgstr "נאנו (לבן)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
-msgstr ""
+msgstr "נאנו (שחור)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
-msgstr ""
+msgstr "וידאו (לבן)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
-msgstr ""
+msgstr "וידאו (שחור)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
-msgstr ""
+msgstr "נייד (1)"
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
-msgstr ""
+msgstr "וידאו U2"
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
-msgstr ""
+msgstr "נאנו (כסוף)"
 
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
-msgstr ""
+msgstr "נאנו (כחול)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
-msgstr ""
+msgstr "נאנו (ירוק)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
-msgstr ""
+msgstr "נאנו (ורוד)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr ""
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "נאנו (אדום)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr ""
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "נאנו (צהוב)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr ""
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "נאנו (סגול)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr ""
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "נאנו (כתום)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr ""
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "אייפון (1)"
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr ""
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "שאפל (כסוף)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
-msgstr ""
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "שאפל (ורוד)"
 
-#: ../src/itdb_device.c:470
-#, fuzzy, c-format
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "שאפל (כחול)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "שאפל (ירוק)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "שאפל (כתום)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "שאפל (סגול)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "שאפל (אדום)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "קלאסי (כסוף)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "קלאסי (שחור)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "טאץ (שחור)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "רגיל (דור ראשון)"
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "רגיל (דור שני)"
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "רגיל (דור שלישי)"
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "רגיל (דור רביעי)"
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "פוטו"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "טלפונים סלולריים"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "מיני (דור ראשון)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "מיני (דור שני)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "שאפל (דור ראשון)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "שאפל (דור שני)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "שאפל (דור שלישי)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "נאנו (דור ראשון)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "נאנו (דור שני)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "נאנו וידאו (דור שלישי)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "נאנו וידאו (דור רביעי)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "וידאו (דור ראשון)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "וידאו (דור שני)"
+
+#: ../src/itdb_device.c:316
+#: ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "קלאסי"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "טאץ"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "אייפון"
+
+#: ../src/itdb_device.c:320
+#: ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "לא בשימוש"
+
+#: ../src/itdb_device.c:874
+#, c-format
 msgid "Could not open '%s' for writing."
-msgstr "תקלה בפתיחת '%s' לכתיבה (%s)."
+msgstr "אי אפשר לפתוח את '%s' לכתיבה."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
-msgstr ""
+msgstr "תיקיית מכשיר לא קיימת."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "חיפוש לא חוקי בהיסט %ld (אורך %ld) בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "זהו לא קובץ ספירת השמעה: '%s' (חסר תחילית mhdp)"
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr "קובץ ספירת השמעה ('%s'): אורך תחילית קטן מהצפוי (%d<96)."
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr "קובץ ספירת השמעה ('%s'): אורך רשומה קטן מהצפוי (%d<12)."
 
-#: ../src/itdb_itunesdb.c:1009
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1019
+#, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
-msgstr "קובץ ספירת השמעה ('%s'): אורך רשומה קטן מהצפוי (%d<12)."
+msgstr "קובץ iTunesStats ('%s'): אורך רשומה קטן מהצפוי (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
-msgstr "iTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
+msgstr "הiTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1479
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1524
+#, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
-msgstr "לא נמצאה חתיכת SLst כצפוי. מנסה להמשיך.\n"
+msgstr "פעולת חוק חכם לא ידועה ב-%ld: %x . מנסה להמשיך.\n"
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
-msgid ""
-"Length of smart playlist rule field (%d) not as expected. Trying to continue "
-"anyhow.\n"
-msgstr ""
-"אורך שדה של חוק (%d) רשימת השמעה חכמה הוא לא כצפוי. מנסה להמשיך בכל זאת.\n"
+msgid "Length of smart playlist rule field (%d) not as expected. Trying to continue anyhow.\n"
+msgstr "אורך שדה של חוק (%d) רשימת השמעה חכמה הוא לא כצפוי. מנסה להמשיך בכל זאת.\n"
 
-#: ../src/itdb_itunesdb.c:1553
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1598
+#, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
-msgstr "iTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
+msgstr "הiTunesDB שבור: אין SLst בהיסט %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -255,312 +367,298 @@
 "נתקלנו בסוג לא ידוע של MHOD (%d) בזמן ניתוח ה-iTuneDB. מתעלם.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
-msgstr "iTunesDB שבור: אורך חתיכה 0 בחתיכה  %ld בקובץ '%s'."
+msgstr "הiTunesDB שבור: אורך חתיכה 0 בחתיכה  %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1658
-#, fuzzy, c-format
-msgid ""
-"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
-msgstr "iTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
+#: ../src/itdb_itunesdb.c:1704
+#, c-format
+msgid "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr "הiTunesDB שבור: מקטע '%s' לא נמצא במקטע '%s' המתחיל ב- %ld."
 
-#: ../src/itdb_itunesdb.c:1672
-#, fuzzy, c-format
-msgid ""
-"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
-"'%s'."
-msgstr ""
-"iTunesDB ('%s'): גודל תחילית של החתיכה mhsd קטנה מהצפוי (%ld<32). מבטל."
+#: ../src/itdb_itunesdb.c:1718
+#, c-format
+msgid "header length of '%s' smaller than expected (%d < %d) at offset %ld in file '%s'."
+msgstr "גודל תחילית של המקטע '%s' קטן מהצפוי (%d < %d) בהיסט %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "זהו לא iTunesDB: '%s' (חסרה תחילית mhdb)."
 
-#: ../src/itdb_itunesdb.c:1774
-#, fuzzy, c-format
-msgid ""
-"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
-"Aborting."
-msgstr ""
-"iTunesDB ('%s'): גודל תחילית של החתיכה mhsd קטנה מהצפוי (%ld<32). מבטל."
+#: ../src/itdb_itunesdb.c:1820
+#, c-format
+msgid "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). Aborting."
+msgstr "הiTunesDB ('%s'): גודל התחילית של המקטע mhsd קטנה מהצפוי (%d<32). מבטל."
 
-#: ../src/itdb_itunesdb.c:1795
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1841
+#, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
-msgstr "iTunesDB שבור: נמצא mhyp ב %ld בקובץ '%s'."
+msgstr "הiTunesDB '%s' שבור: mhsd צפוי ב-%ld."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
-msgstr ""
+msgstr "מספר ה-MHODים ב-mhip ב-%ld הם לא עקביים בקובץ \"%s\"."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "מזהה Itdb_Track '%d' לא נמצא.\n"
 
-#: ../src/itdb_itunesdb.c:2099
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2146
+#, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
-msgstr "iTunesDB שבור: נמצא mhyp ב %ld בקובץ '%s'."
+msgstr "מספר ה-MHOD ב-mhyp ב-%ld לא עקביים בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr "רשימת ראשית"
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
-msgstr ""
+msgstr "פודקאסט"
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "רשימת השמעה"
 
-#: ../src/itdb_itunesdb.c:2137
-#, fuzzy, c-format
-msgid ""
-"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
-"ld in file '%s'."
-msgstr "iTunesDB שבור: נמצא mhyp ב %ld בקובץ '%s'."
+#: ../src/itdb_itunesdb.c:2184
+#, c-format
+msgid "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %ld in file '%s'."
+msgstr "הiTunesDB שבור: מספר קטעי ה-mhip לא עקביים ב-mhyp המתחילים ב- %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "רשימת השמעה OTG"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "זהו לא קובץ רשימת השמעה OTG: '%s' (חסרה תחילת קובץ mhpo)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr "קובץ רשימת השמעה OTG ('%s'): גודל תחילית קטן מהצפוי (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2522
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2571
+#, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
 msgstr "קובץ רשימת השמעה OTG ('%s'): גודל רשומה קטן מהצפוי (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr "רשימת השמעה OTG '%s': התייחסות לרצועה לא קיימת (%d)."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "רשימת השמעה OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
-#, fuzzy
-msgid ""
-"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
-"continue.\n"
-msgstr ""
-"יכול להיות ש-iTuneDB שבור: מספר רצועות (mhit חתיכות) לא עקביות. מנסה "
-"להמשיך.\n"
+#: ../src/itdb_itunesdb.c:2719
+msgid "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to continue.\n"
+msgstr "הiTuneDB שבור: מספר רצועות (mhit חתיכות) לא עקביות. מנסה להמשיך.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
-msgid ""
-"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
-"Trying to continue.\n"
-msgstr ""
-"יכול להיות ש-iTuneDB שבור: מספר רשימות השמעה (mhyp חתיכות) לא עקביות. מנסה "
-"להמשיך.\n"
+#: ../src/itdb_itunesdb.c:2782
+msgid "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. Trying to continue.\n"
+msgstr "יכול להיות ש-iTuneDB שבור: מספר רשימות השמעה (mhyp חתיכות) לא עקביות. מנסה להמשיך.\n"
 
-#: ../src/itdb_itunesdb.c:2780
-#, fuzzy, c-format
-msgid ""
-"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
-"found)"
-msgstr "iTunesDB '%s' שבור: כבר מצאנו mhsds של שתי רשימות השמעה -- מוותר."
+#: ../src/itdb_itunesdb.c:2829
+#, c-format
+msgid "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section found)"
+msgstr "הiTunesDB '%s' שבור: אי אפשר למצוא רשימת רצועות (לא קיים מקטע mhsd סוג 1)"
 
-#: ../src/itdb_itunesdb.c:2809
-#, fuzzy, c-format
-msgid ""
-"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
-"sections found)"
-msgstr "iTunesDB '%s' שבור: כבר מצאנו mhsds של שתי רשימות השמעה -- מוותר."
+#: ../src/itdb_itunesdb.c:2858
+#, c-format
+msgid "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 sections found)"
+msgstr "הiTunesDB '%s' שבור: אי אפשר למצוא רשימת השמעה (לא נמצאו mhsd מסוג 2 או 3)"
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "תיקיית iTunes לא נמצאה: '%s' (או דומה)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "תיקיית מוזיקה לא נמצאה: '%s' (או דומה)."
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "תיקיית בקרה לא נמצאה: '%s' (או דומה)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "קובץ לא קיים: '%s'."
 
-#: ../src/itdb_itunesdb.c:4753
-#, fuzzy, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "פתיחת '%s' לכתיבה נכשלה."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "נכשלה כתיבה ל '%s' (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, fuzzy, c-format
 msgid "Path not found: '%s' (or similar)."
-msgstr "נתיב לא נמצא: '%s'."
+msgstr "נתיב לא נמצא: '%s' (או דומה)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633
+#: ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "תקלה בהסרת '%s' (%s)"
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
+#: ../src/itdb_itunesdb.c:5812
+#: ../src/itdb_itunesdb.c:5985
+#, c-format
 msgid "Mountpoint not set."
-msgstr ""
+msgstr "לא נקבעה נקודת עגינה."
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
-msgstr ""
+msgstr "לא נמצאו תיקיות מסוג \"F..\" ב-\"%s\"."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "נתיב לא נמצא: '%s'."
 
-#: ../src/itdb_itunesdb.c:5708
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:5994
+#, c-format
 msgid "'%s' could not be accessed (%s)."
-msgstr "קובץ לא קיים: '%s'."
+msgstr "אי אפשר לגשת אל '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
-msgid ""
-"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
-msgstr ""
+msgid "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "קובץ יעד \"%s\" כנראה לא מופיע על ה-iPod המעוגן בנקודה \"%s\"."
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "תקלה בפתיחת '%s' לקריאה (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "תקלה בפתיחת '%s' לכתיבה (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "תקלה בזמן קריאה מ '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "תקלה בזמן כתיבה ל '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268
+#: ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "תקלה בזמן סגירה '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
-msgstr ""
+msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
-msgstr ""
+msgstr "בעייה ביצירת תיקיית iPod או קובץ: \"%s\"."
 
-#: ../src/itdb_photoalbum.c:109
-#, fuzzy, c-format
+#: ../src/itdb_photoalbum.c:111
+#, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr "נתיב לא נמצא: '%s'."
+msgstr "נתיב תמונות לא נמצא: '%s' (או דומה)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266
+#: ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
-msgstr ""
+msgstr "ספריית תמונות"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
-msgstr ""
+msgstr "צריך לציין את סוג ה-iPod לפני שניתן יהיה להוסיף תמונות."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
-msgid ""
-"Your iPod does not seem to support photos. Maybe you need to specify the "
-"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
-msgstr ""
+msgid "Your iPod does not seem to support photos. Maybe you need to specify the correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr "נראה שה-iPod שלך לא תומך בתמונות. אולי צריך לציין את הסוג המדוייק של ה-iPod? הוא כרגע מכוון ל  'x%s' (%s/%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
-msgstr ""
+msgstr "אי אפשר לגשת לקובץ '%s'. התמונה לא הוספה."
 
-#: ../src/itdb_photoalbum.c:451
-msgid ""
-"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
-"please report."
-msgstr ""
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, please report."
+msgstr "תקלה לא צפוייה ב-itdb_photodb_add_photo_internal() בזמן הוספת תמונה, אנא דווח על התקלה."
 
-#: ../src/itdb_photoalbum.c:471
-msgid ""
-"Library compiled without gdk-pixbuf support. Picture support is disabled."
-msgstr ""
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid "Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr "הספרייה הודרה ללא תמיכה ב-gdk-pixbuf. תמיכה בתמונות לא מאופשרת."
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
 msgstr "התעלמות מפעולה לא ידועה (%d) ברשימת השמעה חכמה.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "שם קובץ לא חוקי: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "לא נקבעה נקודת עגינה.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
-"  <albumname> should be set to 'NULL' to add photos to the master photo "
-"album\n"
-"  (Photo Library) only. If you don't specify any filenames an empty album "
-"will\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album will\n"
 "  be created.\n"
 msgstr ""
+"הוראות שימוש להוספת תמונות:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> צריך להיות 'NULL' על מנת להוסיף תמונות אל האלבום הראשי\n"
+"  (Photo Library) בלבד.אם לא יצויין שום קובץ יווצר אלבום ריק.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
 "  %s dump <mountpoint> <output_dir>\n"
 msgstr ""
+"הוראות שימוש על מנת לשלוף את כל התמונות אל <תיקיית הפלט>:\n"
+"%s dump <mountpoint> <output_dir>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
 "  %s list <mountpoint>\n"
 msgstr ""
+"הוראות שימוש על מנת להדפיס את רשימת כל מזהי התמונות אל הפלט הסטנדרטי:\n"
+"  %s list <mountpoint>\n"
 
-#: ../tests/test-photos.c:42
+#: ../tests/test-photos.c:44
 #, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
@@ -570,94 +668,128 @@
 "  instead.\n"
 "  WARNING: IDs may change when writing the PhotoDB file.\n"
 msgstr ""
+"הוראות שימוש על מנת להסיר את מזהי התמונות מספריית התמונות:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> צריך להיות 'NULL' על מנת להסיר תמונות לגמרי מה- iPod.\n"
+"  אם לא יצויין כל מזהה, כל אלבום התמונות יוסר במקום.\n"
+"אזהרה: המזהים עלולים להשתנות בזמן כתיבת אל קובץ ה-PhotoDB.\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
-msgstr ""
+msgstr "מספר לא נכון של פרמטרים בשורת הפקודה.\n"
 
-#: ../tests/test-photos.c:135
-#, fuzzy, c-format
+#: ../tests/test-photos.c:128
+#, c-format
 msgid "Error creating '%s' (mkdir)\n"
-msgstr "תקלה בהסרת '%s' (%s)"
+msgstr "תקלה ביצירת '%s' (mkdir)\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
-msgstr ""
+msgstr "שגיאה: '%s' היא לא תיקייה\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
-#, fuzzy, c-format
+#: ../tests/test-photos.c:143
+#: ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
 msgid "Error reading iPod photo database (%s).\n"
-msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
+msgstr "תקלה בקריאת מסד נתונים של iPod photo במיקום (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149
+#: ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
-msgstr ""
+msgstr "תקלה בקריאת מסד נתונים של iPod photo.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167
+#: ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296
+#: ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
-msgstr ""
+msgstr "מספר לא מספק של פרמטרים לשורת הפקודה.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
-msgstr ""
+msgstr "<ללא שם>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
-msgstr ""
+msgstr "<ללא חברים>\n"
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
 "Will attempt to create a new database.\n"
 msgstr ""
+"תקלה בזמן קריאת מסד נתונים של iPod photo (%s).\n"
+"יעשה ניסיון ליצור מסד נתוני חדש.\n"
 
-#: ../tests/test-photos.c:249
-msgid ""
-"Error reading iPod photo database, will attempt to create a new database\n"
-msgstr ""
+#: ../tests/test-photos.c:242
+#, c-format
+msgid "Error reading iPod photo database, will attempt to create a new database\n"
+msgstr "תקלה בזמן קריאת מסד נתונים של iPod photo, יעשה ניסיון ליצור מסד נתונים חדש\n"
 
-#: ../tests/test-photos.c:274
-#, fuzzy, c-format
+#: ../tests/test-photos.c:267
+#, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
-msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
+msgstr "תקלה בזמן הוספת תמונה (%s) אל מסד הנתונים של התמונות: %s\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
-msgstr ""
+msgstr "האלבום המצויין '%s' לא נמצא. מבטל.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
-msgstr ""
+msgstr "אי אפשר היה להסיר רשימת תמונות ספריה. מבטל.\n"
 
-#: ../tests/test-photos.c:364
+#: ../tests/test-photos.c:357
 #, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
-msgstr ""
+msgstr "אזהרה: אי אפשר למצוא תמונה עם מזהה <%d>. מדלג...\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
-msgstr ""
+msgstr "פקודה לא ידועה '%s'\n"
 
-#~ msgid "Cannot write mhod of type %d\n"
-#~ msgstr "לא יכול לכתוב mhod של סוג %d\n"
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "תקלה באתחול ה-iPod: %s\n"
 
-#, fuzzy
-#~ msgid "Error reading iPod photo database"
-#~ msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "תקלה באתחול ה-iPod, תקלה לא ידועה\n"
 
-#~ msgid "Writing to '%s' failed."
-#~ msgstr "נכשלה כתיבה ל '%s'."
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "הוראות שימוש: %s <device> <mountpoint>\n"
 
-#~ msgid "Database in memory corrupt (track pointer == NULL). Aborting export."
-#~ msgstr "מסד הנתונים בזיכרון שבור (מצביע רצועה == NULL). מבטל ייצוא."
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "אי אפשר לקרוא xml sysinfo מ %s\n"
 
-#~ msgid ""
-#~ "Database in memory corrupt (playlist pointer == NULL). Aborting export."
-#~ msgstr "מסד הנתונים בזיכרון שבור (מצביע רשימת השמעה == NULL). מבטל ייצוא."
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "אי אפשר לפענח נתיב תיקייה מכשיר ב %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "אי אפשר לפענח נתיב SysInfoExtended ב %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "אי אפשר לכתוב SysInfoExtended אל %s"

Modified: libgpod/trunk/po/it.po
===================================================================
--- libgpod/trunk/po/it.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/it.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,93 +1,81 @@
 # Italian language translation for libgpod.
 # Copyright (C) 2003 Edward Matteucci
-# Copyright (C) 2007 Daniele Forsi
+# Copyright (C) 2007-2008 Daniele Forsi <daniele at forsi.it>
 #
 # This file is distributed under the same license as the libgpod package.
 #
 # Edward Matteucci <edward.matteucci at libero.it>, 2003, 2005.
-# Daniele Forsi <daniele at forsi.it>, 2007.
 msgid ""
 msgstr ""
 "Project-Id-Version: it\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2007-06-02 14:56+0200\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2008-12-16 21:44+0100\n"
 "Last-Translator: Daniele Forsi <daniele at forsi.it>\n"
 "Language-Team: Italian <tp at lists.linux.it>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: KBabel 1.11.4\n"
 
-#: ../src/db-artwork-parser.c:131
+#: ../src/db-artwork-parser.c:156
 #, c-format
-msgid "Unexpected mhod3 string type: %d\n"
-msgstr "Tipo di stringa mhod3 inatteso: %d\n"
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Tipo di stringa mhod inatteso: %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Indice mhsd inatteso: %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
-msgstr ""
-"Impossibile trovare la traccia corrispondente (dbid: %s) per l'elemento "
-"artwork.\n"
+msgstr "Impossibile trovare la traccia corrispondente (dbid: %s) per l'elemento artwork.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
-msgstr ""
-"Le dimensioni dell'artwork in iTunesDB e in ArtworkDB sono incompatibili (%d+"
-"%d != %d)\n"
+msgstr "Le dimensioni dell'artwork in iTunesDB e in ArtworkDB sono incompatibili (%d+%d != %d)\n"
 
-#: ../src/db-artwork-parser.c:463
+#: ../src/db-artwork-parser.c:566
 #, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr "Indice mhsd inatteso: %d\n"
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "Impossibile trovare la voce della copertina (id mhii: %u) per la traccia (dbid: %s).\n"
 
-#: ../src/db-image-parser.c:118
+#: ../src/db-image-parser.c:91
 #, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr ""
-"Tipo di immagine inatteso in mhni: dimensioni: %ux%u (%d), offset: %d\n"
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Tipo di immagine inatteso in mhni: dimensioni: %d, offset: %d\n"
 
-#: ../src/itdb_artwork.c:199
+#: ../src/itdb_artwork.c:163
 #, c-format
 msgid "Could not access file '%s'."
 msgstr "Impossibile accedere al file '%s'."
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181
+#: ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
 msgstr "Supporto per artwork non compilato in libgpod."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr "Nome file inaccettabile: '%s'.\n"
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr "Punto di mount non impostato.\n"
-
-#: ../src/itdb_artwork.c:554
-#, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Impossibile trovare sull'iPod: '%s'\n"
 
-#: ../src/itdb_artwork.c:768
+#: ../src/itdb_artwork.c:828
 #, c-format
-msgid ""
-"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
-msgstr ""
-"Impossibile recuperare il provino (sembra che sia sull'iPod, ma non sono "
-"disponibili informazioni sull'immagine): tipo: %d, nome del file: '%s'\n"
+msgid "Unable to retrieve thumbnail (appears to be on iPod, but no image info available): filename: '%s'\n"
+msgstr "Impossibile recuperare il provino (sembra che sia sull'iPod, ma non sono disponibili informazioni sull'immagine): nome del file: '%s'\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
 msgstr "Non valido"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257
+#: ../src/itdb_device.c:298
 msgid "Unknown"
 msgstr "Sconosciuto"
 
@@ -95,518 +83,572 @@
 # http://docs.info.apple.com/article.html?artnum=61688-it
 # non è tradotta in Italiano, quindi presumo che si tratti di nomi
 # propri e traduco solo il colore
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
 msgstr "Color"
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
 msgstr "Color U2"
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
 msgstr "Grayscale"
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
 msgstr "Grayscale U2"
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
 msgstr "Mini (argento)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
 msgstr "Mini (blu)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
 msgstr "Mini (rosa)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
 msgstr "Mini (verde)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
 msgstr "Mini (oro)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
 msgstr "Shuffle"
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
 msgstr "Nano (bianco)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
 msgstr "Nano (Nero)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
 msgstr "Video (bianco)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
 msgstr "Video (nero)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
 msgstr "Mobile (1)"
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
 msgstr "Video U2"
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
 msgstr "Nano (argento)"
 
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
 msgstr "Nano (blu)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
 msgstr "Nano (verde)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
 msgstr "Nano (verde)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr "Prima generazione"
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "Nano (rosso)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr "Seconda generazione"
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "Nano (giallo)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr "Terza generazione"
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "Nano (viola)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr "Quarta generazione"
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "Nano (arancione)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr "Quinta generazione"
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr "Sesta generazione"
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (argento)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
-msgstr "Telefono cellulare"
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (rosa)"
 
-#: ../src/itdb_device.c:470
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (blu)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "Shuffle (verde)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (arancione)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (viola)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "Shuffle (rosso)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "Classic (argento)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "Classic (nero)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "Touch (Nero)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "Normale (1ᵃ gen.) "
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "Normale (2ᵃ gen.) "
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "Normale (3ᵃ gen.) "
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "Normale (4ᵃ gen.) "
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "Telefoni cellulari"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3ᵃ gen.)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Video (3ᵃ gen.)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video (4ᵃ gen.)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "Video (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "Video (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:316
+#: ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:320
+#: ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "Non usato"
+
+#: ../src/itdb_device.c:874
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "Impossibile aprire '%s' in scrittura."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
 msgstr "La directory del dispositivo non esiste."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "Spostamento non ammesso all'offset %ld (lunghezza %ld) nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "Non è un file conta riproduzioni: '%s' (manca l'intestazione mhdp)."
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
-msgstr ""
-"File conta riproduzioni ('%s'): lunghezza dell'intestazione più piccola di "
-"quanto previsto (%d<96)."
+msgstr "File conta riproduzioni ('%s'): lunghezza dell'intestazione più piccola di quanto previsto (%d<96)."
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
-msgstr ""
-"File conta riproduzioni ('%s'): lunghezza della voce più piccola di quanto "
-"previsto (%d<12)."
+msgstr "File conta riproduzioni ('%s'): lunghezza della voce più piccola di quanto previsto (%d<12)."
 
-#: ../src/itdb_itunesdb.c:1009
+#: ../src/itdb_itunesdb.c:1019
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
-msgstr ""
-"File iTunesStats ('%s'): lunghezza della voce più piccola di quanto previsto "
-"(%d<18)."
+msgstr "File iTunesStats ('%s'): lunghezza della voce più piccola di quanto previsto (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr "iTunesDB corrotto: nessun MHOD all'offset %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1479
+#: ../src/itdb_itunesdb.c:1524
 #, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
-msgstr ""
-"Azione «smart rule» sconosciuta alla posizione %ld: %x. Si prova a "
-"continuare.\n"
+msgstr "Azione «smart rule» sconosciuta alla posizione %ld: %x. Si prova a continuare.\n"
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
-msgid ""
-"Length of smart playlist rule field (%d) not as expected. Trying to continue "
-"anyhow.\n"
-msgstr ""
-"La lunghezza del campo della regola della scaletta intelligente (%d) non è "
-"come previsto. Si prova a continuare comunque.\n"
+msgid "Length of smart playlist rule field (%d) not as expected. Trying to continue anyhow.\n"
+msgstr "La lunghezza del campo della regola della scaletta intelligente (%d) non è come previsto. Si prova a continuare comunque.\n"
 
-#: ../src/itdb_itunesdb.c:1553
+#: ../src/itdb_itunesdb.c:1598
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr "iTunesDB corrotto: nessun SLst MHOD all'offset %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
 "\n"
 msgstr ""
-"Incontrato un tipo MHOD sconosciuto (%d) durante l'interpretazione di "
-"iTunesDB. Ignorato.\n"
+"Incontrato un tipo MHOD sconosciuto (%d) durante l'interpretazione di iTunesDB. Ignorato.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
-msgstr ""
-"iTunesDB corrotto: hunk di lunghezza 0 per l'hunk alla posizione %ld nel "
-"file '%s'."
+msgstr "iTunesDB corrotto: hunk di lunghezza 0 per l'hunk alla posizione %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1658
+#: ../src/itdb_itunesdb.c:1704
 #, c-format
-msgid ""
-"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
-msgstr ""
-"iTunesDB corrotto: nessuna sezione '%s' trovata nella sezione '%s' che "
-"inizia alla posizione %ld."
+msgid "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr "iTunesDB corrotto: nessuna sezione '%s' trovata nella sezione '%s' che inizia alla posizione %ld."
 
-#: ../src/itdb_itunesdb.c:1672
+#: ../src/itdb_itunesdb.c:1718
 #, c-format
-msgid ""
-"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
-"'%s'."
-msgstr ""
-"la lunghezza dell'intestazione di '%s' più piccola di quanto previsto (%d < %"
-"d) alla posizione %ld nel file '%s'."
+msgid "header length of '%s' smaller than expected (%d < %d) at offset %ld in file '%s'."
+msgstr "la lunghezza dell'intestazione di '%s' più piccola di quanto previsto (%d < %d) alla posizione %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "Non è un file iTunesDB: '%s' (manca l'intestazione mhdb)."
 
-#: ../src/itdb_itunesdb.c:1774
+#: ../src/itdb_itunesdb.c:1820
 #, c-format
-msgid ""
-"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
-"Aborting."
-msgstr ""
-"iTunesDB ('%s'): lunghezza dell'intestazione dell'hunk mhsd più piccola di "
-"quanto previsto (%d<32). Interruzione."
+msgid "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). Aborting."
+msgstr "iTunesDB ('%s'): lunghezza dell'intestazione dell'hunk mhsd più piccola di quanto previsto (%d<32). Interruzione."
 
-#: ../src/itdb_itunesdb.c:1795
+#: ../src/itdb_itunesdb.c:1841
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunesDB '%s' corrotto: mhsd previsto alla posizione %ld."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
-msgstr ""
-"Il numero di MHOD nel mhip alla posizione %ld nel file '%s' è incompatibile."
+msgstr "Il numero di MHOD nel mhip alla posizione %ld nel file '%s' è incompatibile."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "itDB_Track ID '%d' non trovato.\n"
 
-#: ../src/itdb_itunesdb.c:2099
+#: ../src/itdb_itunesdb.c:2146
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
-msgstr ""
-"Il numero di MHOD nel mhyp alla posizione %ld nel file '%s' è incompatibile."
+msgstr "Il numero di MHOD nel mhyp alla posizione %ld nel file '%s' è incompatibile."
 
 # L'interfaccia italiana dell'iPod usa "Playlist"
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr "Playlist principale"
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
 msgstr "Podcast"
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "Playlist"
 
-#: ../src/itdb_itunesdb.c:2137
+#: ../src/itdb_itunesdb.c:2184
 #, c-format
-msgid ""
-"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
-"ld in file '%s'."
-msgstr ""
-"iTunesDB corrotto: il numero di sezioni mhip è incompatibile nel mhyp che "
-"inizia alla posizione %ld nel file '%s'."
+msgid "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %ld in file '%s'."
+msgstr "iTunesDB corrotto: il numero di sezioni mhip è incompatibile nel mhyp che inizia alla posizione %ld nel file '%s'."
 
 # L'interfaccia italiana dell'iPod usa solo "On-The-Go"
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "Playlist OTG"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "Non è un file di playlist OTG: '%s' (manca l'intestazione mhpo)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
-msgstr ""
-"File di playlist OTG ('%s'): la lunghezza dell'intestazione è più piccola di "
-"quanto previsto (%d<20)."
+msgstr "File di playlist OTG ('%s'): la lunghezza dell'intestazione è più piccola di quanto previsto (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2522
+#: ../src/itdb_itunesdb.c:2571
 #, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
-msgstr ""
-"File di playlist OTG ('%s'): la lunghezza della voce è più piccola di quanto "
-"previsto (%d<4)."
+msgstr "File di playlist OTG ('%s'): la lunghezza della voce è più piccola di quanto previsto (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr "Playlist OTG '%s': riferimento ad una traccia non esistente (%d)."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "Playlist OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
-msgid ""
-"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
-"continue.\n"
-msgstr ""
-"iTunesDB corrotto: il numero di tracce (hunk di tipo mhit) è incompatibile. "
-"Provo a continuare.\n"
+#: ../src/itdb_itunesdb.c:2719
+msgid "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to continue.\n"
+msgstr "iTunesDB corrotto: il numero di tracce (hunk di tipo mhit) è incompatibile. Provo a continuare.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
-msgid ""
-"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
-"Trying to continue.\n"
-msgstr ""
-"iTunesDB è probabilmente corrotto: il numero di playlist (hunk di tipo mhyp) "
-"è incompatibile. Provo a continuare.\n"
+#: ../src/itdb_itunesdb.c:2782
+msgid "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. Trying to continue.\n"
+msgstr "iTunesDB è probabilmente corrotto: il numero di playlist (hunk di tipo mhyp) è incompatibile. Provo a continuare.\n"
 
-#: ../src/itdb_itunesdb.c:2780
+#: ../src/itdb_itunesdb.c:2829
 #, c-format
-msgid ""
-"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
-"found)"
-msgstr ""
-"iTunesDB '%s' corrotto: impossibile trovare la lista delle tracce (nessuna "
-"sezione mhsd di tipo 1 è stata trovata)"
+msgid "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section found)"
+msgstr "iTunesDB '%s' corrotto: impossibile trovare la lista delle tracce (nessuna sezione mhsd di tipo 1 è stata trovata)"
 
-#: ../src/itdb_itunesdb.c:2809
+#: ../src/itdb_itunesdb.c:2858
 #, c-format
-msgid ""
-"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
-"sections found)"
-msgstr ""
-"iTunesDB '%s' corrotto: impossibile trovare delle playlist (nessuna sezione "
-"mhsd di tipo 2 o di tipo 3 è stata trovata)"
+msgid "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 sections found)"
+msgstr "iTunesDB '%s' corrotto: impossibile trovare delle playlist (nessuna sezione mhsd di tipo 2 o di tipo 3 è stata trovata)"
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "Directory di iTunes non trovata: '%s' (o simile)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Directory della musica non trovata: '%s' (o simile)."
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Directory di controllo non trovata: '%s' (o simile)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "File non trovato: '%s'."
 
-#: ../src/itdb_itunesdb.c:4753
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Apertura di '%s' in scrittura fallita (%s)."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
-#, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "Scrittura su '%s' fallita (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Percorso non trovato: '%s' (o simile)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Errore rinominando '%s' in '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633
+#: ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Errore nella rimozione di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
+#: ../src/itdb_itunesdb.c:5812
+#: ../src/itdb_itunesdb.c:5985
+#, c-format
 msgid "Mountpoint not set."
 msgstr "Punto di mount non impostato."
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "Nessuna directory 'F..' trovata in '%s'."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Percorso non trovato: '%s'."
 
-#: ../src/itdb_itunesdb.c:5708
+#: ../src/itdb_itunesdb.c:5994
 #, c-format
 msgid "'%s' could not be accessed (%s)."
 msgstr "Impossibile accedere a '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
-msgid ""
-"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
-msgstr ""
-"Il file di destinazione '%s' sembra che non sia sull'iPod montato in '%s'."
+msgid "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "Il file di destinazione '%s' sembra che non sia sull'iPod montato in '%s'."
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Errore nell'apertura in lettura di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Errore nell'apertura in scrittura di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Errore nella lettura da '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Errore nella scrittura su '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268
+#: ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Errore nella chiusura di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
 msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr "Problema nel creare una directory o un file sull'iPod: '%s'."
 
-#: ../src/itdb_photoalbum.c:109
+#: ../src/itdb_photoalbum.c:111
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "Directory delle foto non trovata: '%s' (o simile)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266
+#: ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
 msgstr "Album fotografico"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
-msgstr ""
-"È necessario specificare il modello di iPod prima di poter aggiungere delle "
-"fotografie."
+msgstr "È necessario specificare il modello di iPod prima di poter aggiungere delle fotografie."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
-msgid ""
-"Your iPod does not seem to support photos. Maybe you need to specify the "
-"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
-msgstr ""
-"L'iPod in uso non gestisce le fotografie. È possibile che si debba "
-"specificare il numero esatto del modello di iPod. Ora è impostato come 'x%"
-"s' (%s/%s)."
+msgid "Your iPod does not seem to support photos. Maybe you need to specify the correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr "L'iPod in uso non gestisce le fotografie. È possibile che si debba specificare il numero esatto del modello di iPod. Ora è impostato come 'x%s' (%s/%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
 msgstr "Impossibile accedere al file '%s'. La fotografia non è stata aggiunta."
 
-#: ../src/itdb_photoalbum.c:451
-msgid ""
-"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
-"please report."
-msgstr ""
-"Errore inatteso in itdb_photodb_add_photo_internal() durante l'aggiunta di "
-"una fotografia, si invii una segnalazione."
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, please report."
+msgstr "Errore inatteso in itdb_photodb_add_photo_internal() durante l'aggiunta di una fotografia, si invii una segnalazione."
 
-#: ../src/itdb_photoalbum.c:471
-msgid ""
-"Library compiled without gdk-pixbuf support. Picture support is disabled."
-msgstr ""
-"La libreria è stata compilata senza il supporto per gdk-pixbuf. Il supporto "
-"per le immagini è disabilitato."
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid "Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr "La libreria è stata compilata senza il supporto per gdk-pixbuf. Il supporto per le immagini è disabilitato."
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
-msgstr ""
-"L'azione sconosciuta (%d) nella playlist intelligente verrà ignorata.\n"
+msgstr "L'azione sconosciuta (%d) nella playlist intelligente verrà ignorata.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nome file inaccettabile: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Punto di mount non impostato.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
-"  <albumname> should be set to 'NULL' to add photos to the master photo "
-"album\n"
-"  (Photo Library) only. If you don't specify any filenames an empty album "
-"will\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album will\n"
 "  be created.\n"
 msgstr ""
 "Uso per aggiungere fotografie:\n"
 "  %s add <puntodimount> <nomealbum> [<nomifile>]\n"
-"  <nomealbum> deve essere impostato a 'NULL' per aggiungere le fotografie "
-"solamente all'album di fotografie principale\n"
-"  (Album fotografico). Se non si specificano nomi di file verrà creato un "
-"album vuoto.\n"
+"  <nomealbum> deve essere impostato a 'NULL' per aggiungere le fotografie solamente all'album di fotografie principale\n"
+"  (Album fotografico). Se non si specificano nomi di file verrà creato un album vuoto.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
@@ -615,7 +657,7 @@
 "Uso per scaricare tutte le fotografie in <output_dir>:\n"
 "  %s dump <puntodimount> <output_dir>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
@@ -624,7 +666,7 @@
 "Uso per elencare tutti gli ID delle fotografie su stdout:\n"
 "  %s list <puntodimount>\n"
 
-#: ../tests/test-photos.c:42
+#: ../tests/test-photos.c:44
 #, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
@@ -639,48 +681,55 @@
 "  <nomealbum> deve essere impostato a 'NULL' per rimuovere completamente\n"
 "  le fotografie dall'iPod. Se non si specifica un ID invece sarà rimosso\n"
 "  l'album.\n"
-"  ATTENZIONE: gli ID possono cambiare durante la scrittura del file "
-"PhotoDB.\n"
+"  ATTENZIONE: gli ID possono cambiare durante la scrittura del file PhotoDB.\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
 msgstr "Numero errato di argomenti sulla riga di comando.\n"
 
-#: ../tests/test-photos.c:135
+#: ../tests/test-photos.c:128
 #, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Errore nella creazione di '%s' (mkdir)\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "Errore: '%s' non è una directory\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
+#: ../tests/test-photos.c:143
+#: ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
 #, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "Errore durante la lettura del database di fotografie dell'iPod (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149
+#: ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
 msgstr "Errore durante la lettura del database di fotografie dell'iPod.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167
+#: ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296
+#: ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
 msgstr "Numero insufficiente di argomenti sulla riga di comando.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
 msgstr "<Senza nome>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
 msgstr "<Nessun membro>\n"
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -689,37 +738,68 @@
 "Errore durante la lettura del database di fotografie dell'iPod (%s).\n"
 "Verrà fatto un tentativo per creare un nuovo database.\n"
 
-#: ../tests/test-photos.c:249
-msgid ""
-"Error reading iPod photo database, will attempt to create a new database\n"
-msgstr ""
-"Errore durante la lettura del database di fotografie dell'iPod, verrà fatto "
-"un tentativo per creare un nuovo database.\n"
+#: ../tests/test-photos.c:242
+#, c-format
+msgid "Error reading iPod photo database, will attempt to create a new database\n"
+msgstr "Errore durante la lettura del database di fotografie dell'iPod, verrà fatto un tentativo per creare un nuovo database.\n"
 
-#: ../tests/test-photos.c:274
+#: ../tests/test-photos.c:267
 #, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
-msgstr ""
-"Errore durante l'aggiunta della fotografia (%s) al database delle "
-"fotografie: %s.\n"
+msgstr "Errore durante l'aggiunta della fotografia (%s) al database delle fotografie: %s.\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
 msgstr "L'album specificato '%s' non è stato trovato. Interruzione.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
-msgstr ""
-"Impossibile rimuovere la playlist dell'album fotografico. Interruzione.\n"
+msgstr "Impossibile rimuovere la playlist dell'album fotografico. Interruzione.\n"
 
-#: ../tests/test-photos.c:364
+#: ../tests/test-photos.c:357
 #, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
-msgstr ""
-"Attenzione: impossibile trovare la fotografia con ID <%d>. Saltata...\n"
+msgstr "Attenzione: impossibile trovare la fotografia con ID <%d>. Saltata...\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
 msgstr "Comando sconosciuto '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Errore durante l'inizializzazione dell'iPod: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Errore durante l'inizializzazione dell'iPod: errore sconosciuto\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "Uso: %s <device> <punto_di_mount>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Impossibile sysinfo xml da %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Impossible risolvere il percorso della directory del device su %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Impossibile risolvere il percorso di SysInfoExtended su %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Impossibile scrivere SysInfoExtended su %s"
+

Modified: libgpod/trunk/po/ja.po
===================================================================
--- libgpod/trunk/po/ja.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/ja.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -2,12 +2,12 @@
 # Copyright (C) 2007 libgpod
 # This file is distributed under the same license as the libgpod package.
 # Jorg Schuler <jcsjcs at users.sourceforge.net>, 2003.
-# 
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: gtkpod 0.40\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
 "PO-Revision-Date: 2006-02-14 16:48+0900\n"
 "Last-Translator: Kentaro Fukuchi <fukuchi at users.sourceforge.net>\n"
 "Language-Team: n/a\n"
@@ -16,229 +16,361 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: ../src/db-artwork-parser.c:131
-#, c-format
-msgid "Unexpected mhod3 string type: %d\n"
+#: ../src/db-artwork-parser.c:156
+#, fuzzy, c-format
+msgid "Unexpected mhod string type: %d\n"
 msgstr "ͽ´ü¤»¤Ì mhod3 string type ¤Ç¤¹: %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "ͽ´ü¤»¤Ì mhsd index: %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr "¥¢¡¼¥È¥ï¡¼¥¯¤ËÂбþ¤¹¤ë¶Ê (dbid: %s) ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
 msgstr ""
 "iTunesDB Æâ¤Î¾ðÊó¤È ArtworkDB ¤Î¥¢¡¼¥È¥ï¡¼¥¯¤Î¥µ¥¤¥º¤¬°ìÃפ·¤Þ¤»¤ó (%d+%d != "
 "%d)\n"
 
-#: ../src/db-artwork-parser.c:463
-#, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr "ͽ´ü¤»¤Ì mhsd index: %d\n"
+#: ../src/db-artwork-parser.c:566
+#, fuzzy, c-format
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "¥¢¡¼¥È¥ï¡¼¥¯¤ËÂбþ¤¹¤ë¶Ê (dbid: %s) ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
 
-#: ../src/db-image-parser.c:118
-#, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
+#: ../src/db-image-parser.c:91
+#, fuzzy, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
 msgstr "mhni ¤Ëͽ´ü¤»¤Ì¥¤¥á¡¼¥¸¥¿¥¤¥×: size: %ux%u (%d), offset: %d\n"
 
-#: ../src/itdb_artwork.c:199
+#: ../src/itdb_artwork.c:163
 #, c-format
 msgid "Could not access file '%s'."
 msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿."
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
 msgstr "libgpod ¤Ë¥¢¡¼¥È¥ï¡¼¥¯¤Î¥µ¥Ý¡¼¥È¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr "ÉÔÀµ¤Ê¥Õ¥¡¥¤¥ë̾: '%s'.\n"
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr "¥Þ¥¦¥ó¥È¾ì½ê¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó.\n"
-
-#: ../src/itdb_artwork.c:554
-#, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "iPod ¤ÎÃæ¤Ë¸«Åö¤¿¤ê¤Þ¤»¤ó: '%s'\n"
 
-#: ../src/itdb_artwork.c:768
+#: ../src/itdb_artwork.c:828
 #, fuzzy, c-format
 msgid ""
 "Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
+"available): filename: '%s'\n"
 msgstr ""
 "¥µ¥à¥Í¥¤¥ë¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó (iPod ¤ÎÃæ¤Ë¤¢¤ëȦ¤Ç¤¹¤¬, ²èÁü¾ðÊ󤬸«¤Ä¤«¤ê¤Þ¤»"
 "¤ó): type: %d, filename: '%s'\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
 msgstr "°Û¾ï"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257 ../src/itdb_device.c:298
 msgid "Unknown"
 msgstr "ÉÔÌÀ"
 
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
 msgstr ""
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
 msgstr ""
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
 msgstr ""
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
 msgstr ""
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
 msgstr "Mini (¶ä)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
 msgstr "Mini (ÀÄ)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
 msgstr "Mini (¥Ô¥ó¥¯)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
 msgstr "Mini (ÎÐ)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
 msgstr "Mini (¶â)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
 msgstr ""
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
 msgstr "Nano (Çò)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
 msgstr "Nano (¹õ)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
 msgstr "Video (Çò)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
 msgstr "Video (¹õ)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
 msgstr ""
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
 msgstr ""
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
 msgstr "Nano (¶ä)"
 
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
 msgstr "Nano (ÀÄ)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
 msgstr "Nano (ÎÐ)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
 msgstr "Nano (¥Ô¥ó¥¯)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr "1G"
+#: ../src/itdb_device.c:278
+#, fuzzy
+msgid "Nano (Red)"
+msgstr "Nano (ÀÄ)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr "2G"
+#: ../src/itdb_device.c:279
+#, fuzzy
+msgid "Nano (Yellow)"
+msgstr "Nano (ÀÄ)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr "3G"
+#: ../src/itdb_device.c:280
+#, fuzzy
+msgid "Nano (Purple)"
+msgstr "Nano (ÀÄ)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr "4G"
+#: ../src/itdb_device.c:281
+#, fuzzy
+msgid "Nano (Orange)"
+msgstr "Nano (ÎÐ)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr "5G"
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr ""
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr "6G"
+#: ../src/itdb_device.c:283
+#, fuzzy
+msgid "Shuffle (Silver)"
+msgstr "Mini (¶ä)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr ""
+
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr ""
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr ""
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr ""
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr ""
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr ""
+
+#: ../src/itdb_device.c:290
+#, fuzzy
+msgid "Classic (Silver)"
+msgstr "Mini (¶ä)"
+
+#: ../src/itdb_device.c:291
+#, fuzzy
+msgid "Classic (Black)"
+msgstr "Nano (¹õ)"
+
+#: ../src/itdb_device.c:292
+#, fuzzy
+msgid "Touch (Black)"
+msgstr "Nano (¹õ)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr ""
+
+#: ../src/itdb_device.c:304
+#, fuzzy
+msgid "Mobile Phones"
 msgstr "·ÈÂÓÅÅÏÃ"
 
-#: ../src/itdb_device.c:470
+#: ../src/itdb_device.c:305
+#, fuzzy
+msgid "Mini (1st Gen.)"
+msgstr "Mini (ÎÐ)"
+
+#: ../src/itdb_device.c:306
+#, fuzzy
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (ÎÐ)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:310
+#, fuzzy
+msgid "Nano (1st Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:311
+#, fuzzy
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:312
+#, fuzzy
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:313
+#, fuzzy
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:314
+#, fuzzy
+msgid "Video (1st Gen.)"
+msgstr "Video (Çò)"
+
+#: ../src/itdb_device.c:315
+#, fuzzy
+msgid "Video (2nd Gen.)"
+msgstr "Video (Çò)"
+
+#: ../src/itdb_device.c:316 ../src/itdb_device.c:317
+msgid "Classic"
+msgstr ""
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr ""
+
+#: ../src/itdb_device.c:319
+#, fuzzy
+msgid "iPhone"
+msgstr "·ÈÂÓÅÅÏÃ"
+
+#: ../src/itdb_device.c:320 ../src/itdb_device.c:321
+msgid "Unused"
+msgstr ""
+
+#: ../src/itdb_device.c:874
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
 msgstr "¥Ç¥Ð¥¤¥¹¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "ÉÔÀµ¤Ê¥·¡¼¥¯: '%3$s', ¥ª¥Õ¥»¥Ã¥È %1$ld (Ťµ %2$ld)"
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdp ¥Ø¥Ã¥À¤¬Ìµ¤¤)"
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<96)."
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<12)."
 
-#: ../src/itdb_itunesdb.c:1009
+#: ../src/itdb_itunesdb.c:1019
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr "iTunesStats ¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr ""
 "iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: MHOD ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
 "1$ld)."
 
-#: ../src/itdb_itunesdb.c:1479
+#: ../src/itdb_itunesdb.c:1524
 #, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -247,14 +379,14 @@
 "¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥È¤Î¥ë¡¼¥ë¤ÎŤµ (%d) ¤¬´üÂÔ¤µ¤ì¤ëŤµ¤È°Û¤Ê¤ê¤Þ¤¹. ½èÍý¤ò"
 "³¤±¤Þ¤¹.\n"
 
-#: ../src/itdb_itunesdb.c:1553
+#: ../src/itdb_itunesdb.c:1598
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr ""
 "iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: SLst ¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
 "1$ld)."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -264,14 +396,14 @@
 "¤¹.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
 msgstr ""
 "iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: hunk ¤ÎŤµ¤¬ 0 ¤Ç¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1"
 "$ld)."
 
-#: ../src/itdb_itunesdb.c:1658
+#: ../src/itdb_itunesdb.c:1704
 #, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
@@ -279,7 +411,7 @@
 "iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: %3$ld ¤Î°ÌÃ֤ˤ¢¤ë¥»¥¯¥·¥ç¥ó '%2$s' ¤ÎÃæ¤Ë¥»¥¯¥·¥ç"
 "¥ó '%1$s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:1672
+#: ../src/itdb_itunesdb.c:1718
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -288,53 +420,53 @@
 "'%1$s' ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%2$d < %3$d) (¥Õ¥¡¥¤¥ë '%5$s', ¥ª¥Õ¥»¥Ã¥È "
 "%4$ld)."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "iTunesDB ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdb ¥Ø¥Ã¥À¤¬Ìµ¤¤)."
 
-#: ../src/itdb_itunesdb.c:1774
+#: ../src/itdb_itunesdb.c:1820
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
 "Aborting."
 msgstr "iTunesDB ('%s'): mhsd ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<32). Ãæ»ß¤·¤Þ¤¹."
 
-#: ../src/itdb_itunesdb.c:1795
+#: ../src/itdb_itunesdb.c:1841
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhsd ¤¬ %ld ¤Î°ÌÃ֤˸«¤Ä¤«¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
 msgstr ""
 "mhip Ãæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "Itdb_Track ID '%d' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
 
-#: ../src/itdb_itunesdb.c:2099
+#: ../src/itdb_itunesdb.c:2146
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
 msgstr ""
 "mhyp Ãæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
 
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "¥×¥ì¥¤¥ê¥¹¥È"
 
-#: ../src/itdb_itunesdb.c:2137
+#: ../src/itdb_itunesdb.c:2184
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
@@ -343,38 +475,38 @@
 "iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhyp Ãæ¤Î mhip ¥»¥¯¥·¥ç¥ó¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ "
 "(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
 
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhpo ¥Ø¥Ã¥À¤¬Ìµ¤¤)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2522
+#: ../src/itdb_itunesdb.c:2571
 #, fuzzy, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr ""
 "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¸ºß¤·¤Ê¤¤¶ÊÈÖ¹æ (%d) ¤Ø¤Î»²¾È¤¬¤¢¤ê¤Þ¤¹."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
+#: ../src/itdb_itunesdb.c:2719
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
@@ -383,7 +515,7 @@
 "¤¹.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
+#: ../src/itdb_itunesdb.c:2782
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -391,7 +523,7 @@
 "iTunesDB ¤¬Â¿Ê¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¥×¥ì¥¤¥ê¥¹¥È¤Î¿ô (mhyp ¤Î¿ô) ¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ"
 "¤¹. ½èÍý¤ò³¤±¤Þ¤¹.\n"
 
-#: ../src/itdb_itunesdb.c:2780
+#: ../src/itdb_itunesdb.c:2829
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
@@ -400,7 +532,7 @@
 "iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó. (mhsd ¥¿¥¤¥× 1 ¥»¥¯"
 "¥·¥ç¥ó¤¬¸«¤Ä¤«¤é¤Ê¤¤)"
 
-#: ../src/itdb_itunesdb.c:2809
+#: ../src/itdb_itunesdb.c:2858
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
@@ -409,126 +541,117 @@
 "iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¥×¥ì¥¤¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó. (mhsd ¥¿¥¤¥× 2 "
 "¤È ¥¿¥¤¥× 3 ¤Î¥»¥¯¥·¥ç¥ó¤¬¸«¤Ä¤«¤é¤Ê¤¤)"
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "iTunes ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Music ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Control ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'."
 
-#: ../src/itdb_itunesdb.c:4753
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
-#, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "'%s'¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿ (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "'%s' ¤ò '%s' ¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633 ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "'%s' ¤Îºï½üÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
-#, fuzzy
+#: ../src/itdb_itunesdb.c:5812 ../src/itdb_itunesdb.c:5985
+#, fuzzy, c-format
 msgid "Mountpoint not set."
 msgstr "¥Þ¥¦¥ó¥È¾ì½ê¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó.\n"
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "'F..' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ '%s' ¤ÎÃæ¤Ë¤¢¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'."
 
-#: ../src/itdb_itunesdb.c:5708
+#: ../src/itdb_itunesdb.c:5994
 #, fuzzy, c-format
 msgid "'%s' could not be accessed (%s)."
 msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
 msgid ""
 "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "'%s' ¤òÆɤ߹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "'%s' ¤ÎÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "'%s' ¤Î½ñ¤­¹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268 ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "'%s' ¤òÊĤ¸¤ëºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr "iPod ¥Ç¥£¥ì¥¯¥È¥ê¤ÎºîÀ®¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë '%s' ¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿."
 
-#: ../src/itdb_photoalbum.c:109
+#: ../src/itdb_photoalbum.c:111
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "Photos ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
 msgstr "¼Ì¿¿¥é¥¤¥Ö¥é¥ê"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
 msgstr ""
 "¼Ì¿¿¤òÄɲ乤ëÁ°¤Ë, »ÈÍѤ·¤Æ¤¤¤ë iPod ¤Î¥â¥Ç¥ë¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
 msgid ""
 "Your iPod does not seem to support photos. Maybe you need to specify the "
@@ -537,12 +660,13 @@
 "¤ª»È¤¤¤Î iPod ¤Ï¼Ì¿¿¤Îɽ¼¨¤¬¤Ç¤­¤Þ¤»¤ó. ¤ª¤½¤é¤¯Àµ¤·¤¤ iPod ¤Î¥â¥Ç¥ë¤òÀßÄꤷ"
 "¤Æ¤¤¤Ê¤¤¤â¤Î¤È»×¤ï¤ì¤Þ¤¹. ¸½ºß¥â¥Ç¥ëÈÖ¹æ¤Ï 'x%s' ¤ËÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹ (%s%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
 msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. ¼Ì¿¿¤ÏÄɲ䵤ì¤Þ¤»¤ó."
 
-#: ../src/itdb_photoalbum.c:451
+#: ../src/itdb_photoalbum.c:448
+#, c-format
 msgid ""
 "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
 "please report."
@@ -550,7 +674,8 @@
 "¼Ì¿¿¤ÎÄɲÃÃæ¤Ë itdb_photodb_add_photo_internal() Æâ¤Çͽ´ü¤»¤Ì¥¨¥é¡¼¤¬È¯À¸¤·¤Þ"
 "¤·¤¿. ³«È¯¼Ô¤Ø¤ÎÊó¹ð¤ò¤ª´ê¤¤¤·¤Þ¤¹."
 
-#: ../src/itdb_photoalbum.c:471
+#: ../src/itdb_photoalbum.c:468
+#, c-format
 msgid ""
 "Library compiled without gdk-pixbuf support. Picture support is disabled."
 msgstr ""
@@ -558,13 +683,23 @@
 "¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹."
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
 msgstr "¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥ÈÆâ¤Î̤ÃΤΥ¢¥¯¥·¥ç¥ó (%d) ¤Ï̵»ë¤µ¤ì¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "ÉÔÀµ¤Ê¥Õ¥¡¥¤¥ë̾: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "¥Þ¥¦¥ó¥È¾ì½ê¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
@@ -580,7 +715,7 @@
 "¤À\n"
 "  ¤µ¤¤. ¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Ê¤¤¤È, ¶õ¤Î¥¢¥ë¥Ð¥à¤¬ºîÀ®¤µ¤ì¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
@@ -589,7 +724,7 @@
 "¤¹¤Ù¤Æ¤Î¼Ì¿¿¤ò <½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê> ¤ËÊݸ¤¹¤ë:\n"
 "  %s dump <¥Þ¥¦¥ó¥È¾ì½ê> <½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
@@ -598,7 +733,7 @@
 "¤¹¤Ù¤Æ¤Î¼Ì¿¿¤Î ID ¤òɸ½à½ÐÎϤ˽ÐÎϤ¹¤ë:\n"
 "  %s list <¥Þ¥¦¥ó¥È¾ì½ê>\n"
 
-#: ../tests/test-photos.c:42
+#: ../tests/test-photos.c:44
 #, fuzzy, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
@@ -614,45 +749,49 @@
 "  ID ¤ò»ØÄꤷ¤Ê¤¤¤È, ¥¢¥ë¥Ð¥à¤½¤Î¤â¤Î¤òºï½ü¤·¤Þ¤¹.\n"
 "  ·Ù¹ð: PhotoDB ¥Õ¥¡¥¤¥ë¤ò¹¹¿·¤¹¤ë¤È ID ¤âÊѲ½¤·¤Æ¤¤¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
 msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¿ô¤Î¿ô¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó.\n"
 
-#: ../tests/test-photos.c:135
+#: ../tests/test-photos.c:128
 #, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "'%s' ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó (mkdir)\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "'%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
 #, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
 msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
 msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¿ô¤Î¿ô¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
 msgstr "<̵̾¤·>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
 msgstr ""
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -661,36 +800,97 @@
 "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s).\n"
 "¿·µ¬¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:249
+#: ../tests/test-photos.c:242
+#, c-format
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
 "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó. ¿·µ¬¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:274
+#: ../tests/test-photos.c:267
 #, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
 msgstr "¼Ì¿¿ (%s) ¤ÎÄɲä˼ºÇÔ¤·¤Þ¤·¤¿: %s\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
 msgstr "»ØÄꤵ¤ì¤¿¥¢¥ë¥Ð¥à '%s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó. Ãæ»ß¤·¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
 msgstr "¼Ì¿¿¥é¥¤¥Ö¥é¥ê¤òºï½ü¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. Ãæ»ß¤·¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:364
+#: ../tests/test-photos.c:357
 #, fuzzy, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
 msgstr "¼Ì¿¿ ID <%d> ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó. Èô¤Ð¤·¤Þ¤¹...\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
 msgstr "̤ÃΤΥ³¥Þ¥ó¥É '%s'\n"
 
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr ""
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr ""
+
+#~ msgid "First Generation"
+#~ msgstr "1G"
+
+#~ msgid "Second Generation"
+#~ msgstr "2G"
+
+#~ msgid "Third Generation"
+#~ msgstr "3G"
+
+#~ msgid "Fourth Generation"
+#~ msgstr "4G"
+
+#~ msgid "Fifth Generation"
+#~ msgstr "5G"
+
+#~ msgid "Sixth Generation"
+#~ msgstr "6G"
+
+#~ msgid "Opening of '%s' for writing failed (%s)."
+#~ msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
+
+#~ msgid "Writing to '%s' failed (%s)."
+#~ msgstr "'%s'¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿ (%s)."
+
 #~ msgid "Cannot write mhod of type %d\n"
 #~ msgstr "mhod ¥¿¥¤¥× %d ¤¬½ñ¤­¹þ¤á¤Þ¤»¤ó.\n"
 

Modified: libgpod/trunk/po/ro.po
===================================================================
--- libgpod/trunk/po/ro.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/ro.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,20 +1,17 @@
-# Romanian translation file for libgpod
-# Copyright (C) 2007 Alex Eftimie
-# This file is distributed under the same license as the libgpod package.
-# Alex Eftimie <alexeftimie at gmail dot com>, 2007
-#
-#
 msgid ""
 msgstr ""
-"Project-Id-Version: gtkpod 0.52\n"
+"Project-Id-Version: gtkpod\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2007-07-09 00:02+0900\n"
-"Last-Translator: Alex Eftimie <alexeftimie at gmail dot com>\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2009-01-14 02:11+0200\n"
+"Last-Translator: alexef <alex at eftimie.ro>\n"
+"Language-Team: Romanian <tradu at softwareliber.ro>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
+"20)) ? 1 : 2;\n"
+"X-Generator: Narro 0.9.3 on http://tradu.softwareliber.ro\n"
 
 #: ../src/db-artwork-parser.c:131
 #, c-format
@@ -24,12 +21,14 @@
 #: ../src/db-artwork-parser.c:267
 #, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
-msgstr "Nu am putut găsi piesa corespunzpătoare (dbid: %s) pentru obiectul artwork.\n"
+msgstr ""
+"Nu am putut găsi piesa corespunzpătoare (dbid: %s) pentru obiectul artwork.\n"
 
 #: ../src/db-artwork-parser.c:293
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
-msgstr "Dimesniunile artwork iTunesDB ÅŸi ArtworkDB sunt inconsistente (%d+%d != %d)\n"
+msgstr ""
+"Dimesniunile artwork iTunesDB ÅŸi ArtworkDB sunt inconsistente (%d+%d != %d)\n"
 
 #: ../src/db-artwork-parser.c:463
 #, c-format
@@ -76,7 +75,7 @@
 
 #: ../src/itdb_device.c:170
 msgid "Invalid"
-msgstr "Invalid"
+msgstr "Nevalid"
 
 #: ../src/itdb_device.c:171 ../src/itdb_device.c:197
 msgid "Unknown"
@@ -120,7 +119,7 @@
 
 #: ../src/itdb_device.c:181
 msgid "Shuffle"
-msgstr "Shuffle"
+msgstr "Amestecat"
 
 #: ../src/itdb_device.c:182
 msgid "Nano (White)"
@@ -140,7 +139,7 @@
 
 #: ../src/itdb_device.c:186
 msgid "Mobile (1)"
-msgstr "Mobile (1)"
+msgstr "Mobil (1)"
 
 #: ../src/itdb_device.c:187
 msgid "Video U2"
@@ -212,17 +211,23 @@
 #: ../src/itdb_itunesdb.c:920
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
-msgstr "Fişier de contorizare a redărilor ('%s'): lungimea antetului mai mică decât este aşteptat (%d<96)."
+msgstr ""
+"Fişier de contorizare a redărilor ('%s'): lungimea antetului mai mică decât "
+"este aÅŸteptat (%d<96)."
 
 #: ../src/itdb_itunesdb.c:934
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
-msgstr "Fişier de contorizare a redărilor ('%s'): lungimea intrării mai mică decât este aşteptat (%d<96)."
+msgstr ""
+"Fişier de contorizare a redărilor ('%s'): lungimea intrării mai mică decât "
+"este aÅŸteptat (%d<96)."
 
 #: ../src/itdb_itunesdb.c:1009
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
-msgstr "Fişier iTunesStats ('%s'): lungimea intrării mai mică decât este aşteptat (%d<18)."
+msgstr ""
+"Fişier iTunesStats ('%s'): lungimea intrării mai mică decât este aşteptat (%"
+"d<18)."
 
 #: ../src/itdb_itunesdb.c:1331
 #, c-format
@@ -232,14 +237,17 @@
 #: ../src/itdb_itunesdb.c:1479
 #, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
-msgstr "Acţiune regulă inteligentă necunoscută la %ld: %x. Încercând să continuu.\n"
+msgstr ""
+"Acţiune regulă inteligentă necunoscută la %ld: %x. Încercând să continuu.\n"
 
 #: ../src/itdb_itunesdb.c:1510
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
 "anyhow.\n"
-msgstr "Lungimea câmpului regulă a listei de redare inteligentă (%d) neaşteptată. Încercând să continuu oricum\n"
+msgstr ""
+"Lungimea câmpului regulă a listei de redare inteligentă (%d) neaşteptată. "
+"Încercând să continuu oricum\n"
 
 #: ../src/itdb_itunesdb.c:1553
 #, c-format
@@ -262,18 +270,19 @@
 
 #: ../src/itdb_itunesdb.c:1658
 #, c-format
-msgid ""
-"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
-msgstr "iTunesDB coruptă: secţiunea '%s' nu a fost găsită în secţiunea '%s' începând de la %ld"
+msgid "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB coruptă: secţiunea '%s' nu a fost găsită în secţiunea '%s' începând "
+"de la %ld"
 
 #: ../src/itdb_itunesdb.c:1672
 #, c-format
 msgid ""
-"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
-"'%s'."
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file '%"
+"s'."
 msgstr ""
-"lungimea antetului '%s' mai mică decât este aşteptat (%d < %d) la deplasarea %ld"
-"în fişierul '%s'."
+"lungimea antetului '%s' mai mică decât este aşteptat (%d < %d) la deplasarea %"
+"ldîn fişierul '%s'."
 
 #: ../src/itdb_itunesdb.c:1757
 #, c-format
@@ -286,8 +295,8 @@
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
 "Aborting."
 msgstr ""
-"iTunesDB ('%s'): lungimea antetului bucăţii mhsd mai mică decât aşteptat (%d<32). "
-"Renunţând"
+"iTunesDB ('%s'): lungimea antetului bucăţii mhsd mai mică decât aşteptat (%"
+"d<32). Renunţând"
 
 #: ../src/itdb_itunesdb.c:1795
 #, c-format
@@ -311,7 +320,7 @@
 
 #: ../src/itdb_itunesdb.c:2109
 msgid "Master-PL"
-msgstr "Master-PL"
+msgstr "LR-Principală"
 
 #: ../src/itdb_itunesdb.c:2113
 msgid "Podcasts"
@@ -327,8 +336,8 @@
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
 "ld in file '%s'."
 msgstr ""
-"iTunesDV coruptă: numărul de secţiuni mhip inconsistent în mhyp începând la"
-"%ld în fişierul '%s'."
+"iTunesDV coruptă: numărul de secţiuni mhip inconsistent în mhyp începând la%"
+"ld în fişierul '%s'."
 
 #: ../src/itdb_itunesdb.c:2478
 msgid "OTG Playlist"
@@ -342,17 +351,22 @@
 #: ../src/itdb_itunesdb.c:2510
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
-msgstr "Fişier listă redare OTG ('%s'): lungimea antetului mai mică decât aşteptat (%d<20)."
+msgstr ""
+"Fişier listă redare OTG ('%s'): lungimea antetului mai mică decât aşteptat (%"
+"d<20)."
 
 #: ../src/itdb_itunesdb.c:2522
 #, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
-msgstr "Fişier listă redare OTG ('%s'): lungimea intrării mai mică decât aşteptat (%d<4)."
+msgstr ""
+"Fişier listă redare OTG ('%s'): lungimea intrării mai mică decât aşteptat (%"
+"d<4)."
 
 #: ../src/itdb_itunesdb.c:2557
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
-msgstr "Fişier listă redare OTG ('%s'): referinţă către o piesă inexistentă (%d)."
+msgstr ""
+"Fişier listă redare OTG ('%s'): referinţă către o piesă inexistentă (%d)."
 
 #: ../src/itdb_itunesdb.c:2602
 #, c-format
@@ -365,6 +379,8 @@
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
 msgstr ""
+"Baza de date coruptă: numărul pieselor este necorespunzător. Încerc să "
+"continuu.\n"
 
 #. this should not be -- issue warning
 #: ../src/itdb_itunesdb.c:2733
@@ -372,22 +388,25 @@
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
 msgstr ""
+"Bază de date coruptă: număr liste de redare inconsistent. Încerc să "
+"continuu.\n"
 
 #: ../src/itdb_itunesdb.c:2780
 #, c-format
 msgid ""
-"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
-"found)"
-msgstr "iTunesDB '%s' coruptă: Nu am putut găsi lista de piese (lipsă "
-"secţiuni mhsd de tip 1)"
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section found)"
+msgstr ""
+"iTunesDB '%s' coruptă: Nu am putut găsi lista de piese (lipsă secţiuni mhsd "
+"de tip 1)"
 
 #: ../src/itdb_itunesdb.c:2809
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
 "sections found)"
-msgstr "iTunesDB '%s' coruptă: Nu am putut găsi liste de redare (lipsă "
-"secţiuni mhsd de tip 2 sau 3)"
+msgstr ""
+"iTunesDB '%s' coruptă: Nu am putut găsi liste de redare (lipsă secţiuni mhsd "
+"de tip 2 sau 3)"
 
 #: ../src/itdb_itunesdb.c:2831
 #, c-format
@@ -455,10 +474,8 @@
 
 #: ../src/itdb_itunesdb.c:5718
 #, c-format
-msgid ""
-"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
-msgstr ""
-"Fişierul destinaţie '%s' nu pare să fie pe iPodul montat la '%s'."
+msgid "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "Fişierul destinaţie '%s' nu pare să fie pe iPodul montat la '%s'."
 
 #: ../src/itdb_itunesdb.c:5922
 #, c-format
@@ -505,16 +522,18 @@
 
 #: ../src/itdb_photoalbum.c:370
 msgid "You need to specify the iPod model used before photos can be added."
-msgstr "Trebuie să specificaţi modelul de iPod folosit înainte de a putea"
-"adăuga imagini."
+msgstr ""
+"Trebuie să specificaţi modelul de iPod folosit înainte de a puteaadăuga "
+"imagini."
 
 #: ../src/itdb_photoalbum.c:391
 #, c-format
 msgid ""
 "Your iPod does not seem to support photos. Maybe you need to specify the "
 "correct iPod model number? It is currently set to 'x%s' (%s/%s)."
-msgstr "Modelul dvs de iPod se pare că nu suportă imagini. Poate trebuie să"
-"specificaţi modelul corect de iPod? În prezent este setat ca 'x%s' (%s/%s)."
+msgstr ""
+"Modelul dvs de iPod se pare că nu suportă imagini. Poate trebuie "
+"săspecificaţi modelul corect de iPod? În prezent este setat ca 'x%s' (%s/%s)."
 
 #: ../src/itdb_photoalbum.c:403
 #, c-format
@@ -526,7 +545,7 @@
 "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
 "please report."
 msgstr ""
-"Eroare neaşteptată în itdb_photodb_add_photo_internal() la adăugarea imaginii, "
+"Eroare neaşte_ptată în itdbphotodb_addphoto_internal() la adăugarea imaginii, "
 "vă rugăm raportaţi-o."
 
 #: ../src/itdb_photoalbum.c:471
@@ -540,7 +559,8 @@
 #: ../src/itdb_playlist.c:79
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
-msgstr "Acţiune necunoscută (%d) în lista de redare inteligentă va fi ignorată.\n"
+msgstr ""
+"Acţiune necunoscută (%d) în lista de redare inteligentă va fi ignorată.\n"
 
 #: ../tests/test-photos.c:39
 #, c-format
@@ -555,10 +575,10 @@
 msgstr ""
 "Mod de utilizare pentru a adăuga imagini:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
-"  <albumname> trebuie setat ca 'NULL' pentru a adăuga imagini la albumul"
-"foto principal\n"
-"  Numai pentru (Photo Library). Dacă nu specificaţi nici un nume de fişier "
-"un album nou\n"
+"  <albumname> trebuie setat ca 'NULL' pentru a adăuga imagini la albumulfoto "
+"principal\n"
+"  Numai pentru (Photo Library). Dacă nu specificaţi nici un nume de fişier un "
+"album nou\n"
 "  va fi creat.\n"
 
 #: ../tests/test-photos.c:40
@@ -579,7 +599,6 @@
 "Mod de utilizare pentru a lista toate IDurile imaginilor la stdout:\n"
 "  %s list <mountpoint>\n"
 
-
 #: ../tests/test-photos.c:42
 #, c-format
 msgid ""
@@ -647,7 +666,8 @@
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
-"Eroare la citirea bazei de date foto a iPod, se încearcă să se creeze una nouă\n"
+"Eroare la citirea bazei de date foto a iPod, se încearcă să se creeze una "
+"nouă\n"
 
 #: ../tests/test-photos.c:274
 #, c-format

Modified: libgpod/trunk/po/sv.po
===================================================================
--- libgpod/trunk/po/sv.po	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/po/sv.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,13 +1,13 @@
-# Translation of gtkpod to Swedish.
+# Translation of libgpod to Swedish.
 # This file is distributed under the same license as libgpod.
-# Copyright (C) Stefan Asserhäll <stefan.asserhall at comhem.se>, 2004, 2005, 2007.
+# Copyright (C) Stefan Asserhäll <stefan.asserhall at comhem.se>, 2004, 2005, 2007, 2008.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: sv\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-30 08:46+0900\n"
-"PO-Revision-Date: 2007-01-14 15:53+0100\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2008-12-09 20:05+0100\n"
 "Last-Translator: Stefan Asserhäll <stefan.asserhall at comhem.se>\n"
 "Language-Team: Svenska <sv at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -16,227 +16,341 @@
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 "X-Generator: KBabel 1.11.4\n"
 
-#: ../src/db-artwork-parser.c:131
+#: ../src/db-artwork-parser.c:156
 #, c-format
-msgid "Unexpected mhod3 string type: %d\n"
-msgstr "Oväntad mhod3 strängtyp; %d\n"
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Oväntad mhod strängtyp; %d\n"
 
-#: ../src/db-artwork-parser.c:267
+#: ../src/db-artwork-parser.c:476
 #, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Oväntat mhsd index: %d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
 msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr "Kunde inte hitta motsvarande spår (dbid: %s) för grafikpost.\n"
 
-#: ../src/db-artwork-parser.c:293
+#: ../src/db-artwork-parser.c:530
 #, c-format
 msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
 msgstr ""
 "Grafikstorlekar i iTunes databas och grafikdatabas inte konseventa (%d + %d !"
 "= %d)\n"
 
-#: ../src/db-artwork-parser.c:463
+#: ../src/db-artwork-parser.c:566
 #, c-format
-msgid "Unexpected mhsd index: %d\n"
-msgstr "Oväntat mhsd index: %d\n"
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "Kunde inte hitta motsvarande grafikpost (mhii id: %u) för spår (dbid: %s).\n"
 
-#: ../src/db-image-parser.c:118
+#: ../src/db-image-parser.c:91
 #, c-format
-msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr "Oväntad bildtyp i mhni: storlek: %ux%u (%d), position: %d\n"
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Oväntad bildtyp i mhni: %d, position: %d\n"
 
-#: ../src/itdb_artwork.c:199
+#: ../src/itdb_artwork.c:163
 #, c-format
 msgid "Could not access file '%s'."
 msgstr "Kunde inte komma åt filen '%s'."
 
-#: ../src/itdb_artwork.c:216 ../src/itdb_artwork.c:277
-#: ../src/itdb_artwork.c:337
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
 msgid "Artwork support not compiled into libgpod."
 msgstr "Grafikstöd inte kompilerat i libgpod."
 
-#: ../src/itdb_artwork.c:395
+#: ../src/itdb_artwork.c:668
 #, c-format
-msgid "Illegal filename: '%s'.\n"
-msgstr "Ogiltigt filnamn: '%s'.\n"
-
-#: ../src/itdb_artwork.c:401
-msgid "Mountpoint not set.\n"
-msgstr "Monteringsplats inte inställd.\n"
-
-#: ../src/itdb_artwork.c:554
-#, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Kunde inte hitta på iPod: '%s'\n"
 
-#: ../src/itdb_artwork.c:768
-#, fuzzy, c-format
+#: ../src/itdb_artwork.c:828
+#, c-format
 msgid ""
 "Unable to retrieve thumbnail (appears to be on iPod, but no image info "
-"available): type: %d, filename: '%s'\n"
+"available): filename: '%s'\n"
 msgstr ""
 "Kunde inte hämta miniatyrbild (verkar finnas på iPod, men någon "
-"bildinformation är inte tillgänglig): typ: %d, filnamne: '%s'\n"
+"bildinformation är inte tillgänglig): filnamne: '%s'\n"
 
-#: ../src/itdb_device.c:170
+#: ../src/itdb_device.c:256
 msgid "Invalid"
 msgstr "Ogiltig"
 
-#: ../src/itdb_device.c:171 ../src/itdb_device.c:197
+#: ../src/itdb_device.c:257 ../src/itdb_device.c:298
 msgid "Unknown"
 msgstr "Okänd"
 
-#: ../src/itdb_device.c:172
+#: ../src/itdb_device.c:258
 msgid "Color"
 msgstr "Färg"
 
-#: ../src/itdb_device.c:173
+#: ../src/itdb_device.c:259
 msgid "Color U2"
 msgstr "Färg U2"
 
-#: ../src/itdb_device.c:174
+#: ../src/itdb_device.c:260
 msgid "Grayscale"
 msgstr "Gråskala"
 
-#: ../src/itdb_device.c:175
+#: ../src/itdb_device.c:261
 msgid "Grayscale U2"
 msgstr "Gråskala U2"
 
-#: ../src/itdb_device.c:176
+#: ../src/itdb_device.c:262
 msgid "Mini (Silver)"
 msgstr "Mini (silver)"
 
-#: ../src/itdb_device.c:177
+#: ../src/itdb_device.c:263
 msgid "Mini (Blue)"
 msgstr "Mini (blå)"
 
-#: ../src/itdb_device.c:178
+#: ../src/itdb_device.c:264
 msgid "Mini (Pink)"
 msgstr "Mini (rosa)"
 
-#: ../src/itdb_device.c:179
+#: ../src/itdb_device.c:265
 msgid "Mini (Green)"
 msgstr "Mini (grön)"
 
-#: ../src/itdb_device.c:180
+#: ../src/itdb_device.c:266
 msgid "Mini (Gold)"
 msgstr "Mini (guld)"
 
-#: ../src/itdb_device.c:181
+#: ../src/itdb_device.c:267
 msgid "Shuffle"
 msgstr "Shuffle"
 
-#: ../src/itdb_device.c:182
+#: ../src/itdb_device.c:268
 msgid "Nano (White)"
 msgstr "Nano (vit)"
 
-#: ../src/itdb_device.c:183
+#: ../src/itdb_device.c:269
 msgid "Nano (Black)"
 msgstr "Nano (svart)"
 
-#: ../src/itdb_device.c:184
+#: ../src/itdb_device.c:270
 msgid "Video (White)"
 msgstr "Video (vit)"
 
-#: ../src/itdb_device.c:185
+#: ../src/itdb_device.c:271
 msgid "Video (Black)"
 msgstr "Video (svart)"
 
-#: ../src/itdb_device.c:186
+#: ../src/itdb_device.c:272
 msgid "Mobile (1)"
 msgstr "Mobil (1)"
 
-#: ../src/itdb_device.c:187
+#: ../src/itdb_device.c:273
 msgid "Video U2"
 msgstr "Video U2"
 
-#: ../src/itdb_device.c:188
+#: ../src/itdb_device.c:274
 msgid "Nano (Silver)"
 msgstr "Nano (silver)"
 
-#: ../src/itdb_device.c:189
+#: ../src/itdb_device.c:275
 msgid "Nano (Blue)"
 msgstr "Nano (blå)"
 
-#: ../src/itdb_device.c:190
+#: ../src/itdb_device.c:276
 msgid "Nano (Green)"
 msgstr "Nano (grön)"
 
-#: ../src/itdb_device.c:191
+#: ../src/itdb_device.c:277
 msgid "Nano (Pink)"
 msgstr "Nano (rosa)"
 
-#: ../src/itdb_device.c:198
-msgid "First Generation"
-msgstr "Första generationen"
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "Nano (röd)"
 
-#: ../src/itdb_device.c:199
-msgid "Second Generation"
-msgstr "Andra generationen"
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "Nano (gul)"
 
-#: ../src/itdb_device.c:200
-msgid "Third Generation"
-msgstr "Tredje generationen"
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "Nano (violett)"
 
-#: ../src/itdb_device.c:201
-msgid "Fourth Generation"
-msgstr "Fjärde generationen"
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "Nano (orange)"
 
-#: ../src/itdb_device.c:202
-msgid "Fifth Generation"
-msgstr "Femte generationen"
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
 
-#: ../src/itdb_device.c:203
-msgid "Sixth Generation"
-msgstr "Sjätte generationen"
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (silver)"
 
-#: ../src/itdb_device.c:204
-msgid "Mobile Phone"
-msgstr "Mobiltelefon"
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (rosa)"
 
-#: ../src/itdb_device.c:470
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (blå)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "Shuffle (grön)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (orange)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (violett)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "Shuffle (röd)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "Klassisk (silver)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "Klassisk (svart)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "Touch (svart)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "Vanlig (1:a gen.)"
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "Vanlig (2:a gen.)"
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "Vanlig (3:e gen.)"
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "Vanlig (4:e gen.)"
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "Foto"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "Mobiltelefoner"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1:a gen.)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2:a gen.)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1:a gen.)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2:a gen.)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3:e gen.)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1:a gen.)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2:a gen.)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano video (3:e gen.)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano video (4:e gen.)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "Video (1:a gen.)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "Video (2:a gen.)"
+
+#: ../src/itdb_device.c:316 ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "Klassisk"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:320 ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "Oanvänd"
+
+#: ../src/itdb_device.c:874
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "Kunde inte öppna '%s' för skrivning."
 
-#: ../src/itdb_device.c:479
+#: ../src/itdb_device.c:883
+#, c-format
 msgid "Device directory does not exist."
 msgstr "Enhetskatalog finns inte."
 
-#: ../src/itdb_itunesdb.c:451
+#: ../src/itdb_itunesdb.c:462
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "Ogiltig sökning till position %ld (längd %ld) i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:905
+#: ../src/itdb_itunesdb.c:915
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "Inte en uppspelningsdatafil: '%s' (saknar mhdp-huvud)."
 
-#: ../src/itdb_itunesdb.c:920
+#: ../src/itdb_itunesdb.c:930
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr "Uppspelningsdatafil ('%s'): Huvudlängd mindre än väntat (%d < 96)"
 
-#: ../src/itdb_itunesdb.c:934
+#: ../src/itdb_itunesdb.c:944
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr "Uppspelningsdatafil ('%s'): Postlängd mindre än väntat (%d < 12)"
 
-#: ../src/itdb_itunesdb.c:1009
+#: ../src/itdb_itunesdb.c:1019
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr "iTunes statistikfil ('%s'): Postlängd mindre än väntat (%d < 18)"
 
-#: ../src/itdb_itunesdb.c:1331
+#: ../src/itdb_itunesdb.c:1338
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr "iTunes databas skadad: Ingen MHOD på position %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:1479
+#: ../src/itdb_itunesdb.c:1524
 #, c-format
 msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
-msgstr ""
+msgstr "Okänd smart regelåtgärd vid %ld: %x. Försöker fortsätta.\n"
 
-#: ../src/itdb_itunesdb.c:1510
+#: ../src/itdb_itunesdb.c:1555
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -245,12 +359,12 @@
 "Regelfältets längd (%d) i den smarta spellistan är inte den förväntade. "
 "Försöker fortsätta ändå.\n"
 
-#: ../src/itdb_itunesdb.c:1553
+#: ../src/itdb_itunesdb.c:1598
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr "iTunes databas skadad: Ingen SLst på position %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:1566
+#: ../src/itdb_itunesdb.c:1611
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -260,34 +374,31 @@
 "den.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1645
+#: ../src/itdb_itunesdb.c:1691
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
-msgstr ""
-"iTunes databas skadad: Datalängd 0 för data på position %ld i filen '%s'."
+msgstr "iTunes databas skadad: Datalängd 0 för data på position %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:1658
+#: ../src/itdb_itunesdb.c:1704
 #, c-format
-msgid ""
-"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgid "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
 msgstr ""
 "iTunes databas skadad: NÃ¥gon sektion '%s' hittades inte i sektion '%s' med "
 "början på %ld."
 
-#: ../src/itdb_itunesdb.c:1672
+#: ../src/itdb_itunesdb.c:1718
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
 "'%s'."
-msgstr ""
-"Huvudlängd för '%s' mindre än väntat (%d < %d) på position %ld i filen '%s'."
+msgstr "Huvudlängd för '%s' mindre än väntat (%d < %d) på position %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:1757
+#: ../src/itdb_itunesdb.c:1803
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "Inte en iTunes databas: '%s' (saknar mhdb-huvud)."
 
-#: ../src/itdb_itunesdb.c:1774
+#: ../src/itdb_itunesdb.c:1820
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -296,39 +407,39 @@
 "iTunes databas ('%s'): Huvudlängd för mhsd-data mindre än väntat (%d < 32). "
 "Avbryter."
 
-#: ../src/itdb_itunesdb.c:1795
+#: ../src/itdb_itunesdb.c:1841
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunes databas '%s' skadad: Förväntade mhsd på position %ld."
 
-#: ../src/itdb_itunesdb.c:1912
+#: ../src/itdb_itunesdb.c:1958
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
 msgstr "Antal MHOD i mhip på position %ld inte konsekvent i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:1930
+#: ../src/itdb_itunesdb.c:1976
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "ITunes databas spår-id '%d' hittades inte.\n"
 
-#: ../src/itdb_itunesdb.c:2099
+#: ../src/itdb_itunesdb.c:2146
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
 msgstr "Antal MHOD i mhyp på position %ld inte konsekvent i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:2109
+#: ../src/itdb_itunesdb.c:2156
 msgid "Master-PL"
 msgstr "Huvudspellista"
 
-#: ../src/itdb_itunesdb.c:2113
+#: ../src/itdb_itunesdb.c:2160
 msgid "Podcasts"
 msgstr "Podradiosändningar"
 
-#: ../src/itdb_itunesdb.c:2115
+#: ../src/itdb_itunesdb.c:2162
 msgid "Playlist"
 msgstr "Spellista"
 
-#: ../src/itdb_itunesdb.c:2137
+#: ../src/itdb_itunesdb.c:2184
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
@@ -337,37 +448,37 @@
 "iTunes databas skadad: Antal mhip sektioner inte konsekvent i mhyp med "
 "början på %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:2478
+#: ../src/itdb_itunesdb.c:2527
 msgid "OTG Playlist"
 msgstr "OTG-spellista"
 
-#: ../src/itdb_itunesdb.c:2496
+#: ../src/itdb_itunesdb.c:2545
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "Inte en OTG-spellistefil: '%s' (saknar mhpo-huvud)."
 
-#: ../src/itdb_itunesdb.c:2510
+#: ../src/itdb_itunesdb.c:2559
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr "OTG-spellistefil ('%s'): Huvudlängd mindre än väntat (%d < 20)"
 
-#: ../src/itdb_itunesdb.c:2522
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2571
+#, c-format
 msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
-msgstr "OTG-spellistefil ('%s'): Postlängd mindre än väntat (%d < 4)"
+msgstr "OTG-spellistefil ('%s'): Postlängd mindre än väntat (%d < 4)."
 
-#: ../src/itdb_itunesdb.c:2557
+#: ../src/itdb_itunesdb.c:2606
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr "OTG-spellistefil '%s': Referens till spår som inte finns (%d)."
 
-#: ../src/itdb_itunesdb.c:2602
+#: ../src/itdb_itunesdb.c:2651
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "OTG-spellista %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2670
+#: ../src/itdb_itunesdb.c:2719
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
@@ -376,7 +487,7 @@
 "fortsätta.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2733
+#: ../src/itdb_itunesdb.c:2782
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -384,7 +495,7 @@
 "iTunes databas möjligen skadad: Antal spellistor (mhyp-data) inte "
 "konsekvent. Försöker fortsätta.\n"
 
-#: ../src/itdb_itunesdb.c:2780
+#: ../src/itdb_itunesdb.c:2829
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
@@ -393,7 +504,7 @@
 "iTunes databas '%s' skadad: Kunde inte hitta spårlista (någon mhsd av typ 1 "
 "hittades inte)"
 
-#: ../src/itdb_itunesdb.c:2809
+#: ../src/itdb_itunesdb.c:2858
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
@@ -402,126 +513,115 @@
 "iTunes databas '%s' skadad: Kunde inte hitta spellistor (någon mhsd av typ 2 "
 "eller typ 3 hittades)"
 
-#: ../src/itdb_itunesdb.c:2831
+#: ../src/itdb_itunesdb.c:2880
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "iTunes katalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:2848
+#: ../src/itdb_itunesdb.c:2897
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Musikkatalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:2866
+#: ../src/itdb_itunesdb.c:2915
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Styrkatalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:2984
+#: ../src/itdb_itunesdb.c:3036
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Filen hittades inte: '%s'."
 
-#: ../src/itdb_itunesdb.c:4753
+#: ../src/itdb_itunesdb.c:5410
 #, c-format
-msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Fel när '%s' skulle öppnas för skrivning (%s)."
-
-#: ../src/itdb_itunesdb.c:4764 ../src/itdb_itunesdb.c:4775
-#, c-format
-msgid "Writing to '%s' failed (%s)."
-msgstr "Fel vid skrivning till '%s' (%s)."
-
-#: ../src/itdb_itunesdb.c:5129
-#, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Sökväg hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:5348
+#: ../src/itdb_itunesdb.c:5616
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Fel vid byte av namn på '%s' till '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5365 ../src/itdb_itunesdb.c:5382
+#: ../src/itdb_itunesdb.c:5633 ../src/itdb_itunesdb.c:5650
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Fel vid borttagning av '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5538 ../src/itdb_itunesdb.c:5699
-#, fuzzy
+#: ../src/itdb_itunesdb.c:5812 ../src/itdb_itunesdb.c:5985
+#, c-format
 msgid "Mountpoint not set."
-msgstr "Monteringsplats inte inställd.\n"
+msgstr "Monteringsplats inte inställd."
 
-#: ../src/itdb_itunesdb.c:5578
+#: ../src/itdb_itunesdb.c:5852
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "NÃ¥gra 'F..'-kataloger hittades inte i '%s'."
 
-#: ../src/itdb_itunesdb.c:5599
+#: ../src/itdb_itunesdb.c:5873
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Sökväg hittades inte: '%s'."
 
-#: ../src/itdb_itunesdb.c:5708
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:5994
+#, c-format
 msgid "'%s' could not be accessed (%s)."
-msgstr "Kunde inte komma åt filen '%s'."
+msgstr "Kunde inte komma åt '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5718
+#: ../src/itdb_itunesdb.c:6004
 #, c-format
-msgid ""
-"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
-msgstr ""
+msgid "Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "Målfilen '%s' verkar inte finnas på iPod monterad som '%s'."
 
-#: ../src/itdb_itunesdb.c:5922
+#: ../src/itdb_itunesdb.c:6212
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Fel när '%s' skulle öppnas för läsning (%s)."
 
-#: ../src/itdb_itunesdb.c:5933
+#: ../src/itdb_itunesdb.c:6224
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Fel när '%s' skulle öppnas för skrivning (%s)."
 
-#: ../src/itdb_itunesdb.c:5950
+#: ../src/itdb_itunesdb.c:6240
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Fel vid läsning från '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5966
+#: ../src/itdb_itunesdb.c:6255
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Fel vid skrivning till '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5979 ../src/itdb_itunesdb.c:5989
+#: ../src/itdb_itunesdb.c:6268 ../src/itdb_itunesdb.c:6278
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Fel när '%s' skulle stängas (%s)."
 
-#: ../src/itdb_itunesdb.c:6354
+#: ../src/itdb_itunesdb.c:6702
 msgid "iPod"
 msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:6747
+#: ../src/itdb_itunesdb.c:7024
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr "Problem att skapa iPod-katalog eller fil: '%s'."
 
-#: ../src/itdb_photoalbum.c:109
+#: ../src/itdb_photoalbum.c:111
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "Fotokatalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_photoalbum.c:256 ../src/itdb_photoalbum.c:463
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
 msgid "Photo Library"
 msgstr "Fotobibliotek"
 
-#: ../src/itdb_photoalbum.c:370
+#: ../src/itdb_photoalbum.c:386
+#, c-format
 msgid "You need to specify the iPod model used before photos can be added."
-msgstr ""
-"Du måste ange vilken iPod-modell som används innan foton kan läggas till."
+msgstr "Du måste ange vilken iPod-modell som används innan foton kan läggas till."
 
-#: ../src/itdb_photoalbum.c:391
+#: ../src/itdb_photoalbum.c:407
 #, c-format
 msgid ""
 "Your iPod does not seem to support photos. Maybe you need to specify the "
@@ -530,12 +630,13 @@
 "Din iPod verkar inte stödja foton. Kanske måste du ange rätt iPod-"
 "modellnummer? För närvarande är det inställt till 'x%s' (%s/%s)."
 
-#: ../src/itdb_photoalbum.c:403
+#: ../src/itdb_photoalbum.c:419
 #, c-format
 msgid "Could not access file '%s'. Photo not added."
 msgstr "Kunde inte komma åt filen '%s'. Fotot har inte lagts till."
 
-#: ../src/itdb_photoalbum.c:451
+#: ../src/itdb_photoalbum.c:448
+#, c-format
 msgid ""
 "Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
 "please report."
@@ -543,21 +644,31 @@
 "Oväntat fel i itdb_photodb_add_photo_internal() vid tillägg av foto. "
 "Rapportera gärna felet."
 
-#: ../src/itdb_photoalbum.c:471
-msgid ""
-"Library compiled without gdk-pixbuf support. Picture support is disabled."
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid "Library compiled without gdk-pixbuf support. Picture support is disabled."
 msgstr ""
 "Biblioteket kompilerat utan stöd för gdk-pixbuf. Stöd för bilder är "
 "inaktiverat."
 
 #. New action!
-#: ../src/itdb_playlist.c:79
+#: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
 msgstr "Okänd åtgärd (%d) i smart spellista kommer att ignoreras.\n"
 
-#: ../tests/test-photos.c:39
+#: ../src/itdb_thumb.c:326
 #, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Ogiltigt filnamn: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Monteringsplats inte inställd.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
 "Usage to add photos:\n"
 "  %s add <mountpoint> <albumname> [<filename(s)>]\n"
@@ -572,7 +683,7 @@
 "  <albumnamn> ska vara 'NULL' för att bara lägga till foton i huvudalbumet\n"
 "  (Photo Library). Om inga filnamn anges kommer ett tomt album att skapas.\n"
 
-#: ../tests/test-photos.c:40
+#: ../tests/test-photos.c:42
 #, c-format
 msgid ""
 "Usage to dump all photos to <output_dir>:\n"
@@ -581,7 +692,7 @@
 "Användning för att lagra alla foton i <utdatakatalog>:\n"
 "  %s dump <mountpoint> <output_dir>\n"
 
-#: ../tests/test-photos.c:41
+#: ../tests/test-photos.c:43
 #, c-format
 msgid ""
 "Usage to list all photos IDs to stdout:\n"
@@ -590,8 +701,8 @@
 "Användning för att lista id för alla foton på standardutmatningen:\n"
 "  %s list <mountpoint>\n"
 
-#: ../tests/test-photos.c:42
-#, fuzzy, c-format
+#: ../tests/test-photos.c:44
+#, c-format
 msgid ""
 "Usage to remove photo IDs from Photo Library:\n"
 "  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
@@ -607,45 +718,49 @@
 "  instället.\n"
 "  VARNING: Id kan ändras när filen PhotoDB skrivs.\n"
 
-#: ../tests/test-photos.c:126
+#: ../tests/test-photos.c:119
+#, c-format
 msgid "Wrong number of command line arguments.\n"
 msgstr "Fel antal kommandoradsväljare.\n"
 
-#: ../tests/test-photos.c:135
+#: ../tests/test-photos.c:128
 #, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Fel när '%s' skulle skapas (mkdir)\n"
 
-#: ../tests/test-photos.c:141
+#: ../tests/test-photos.c:134
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "Fel: '%s' är inte en katalog\n"
 
-#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
-#: ../tests/test-photos.c:313
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
 #, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "Fel vid vid läsning av iPod fotodatabas (%s).\n"
 
-#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
-#: ../tests/test-photos.c:320
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database.\n"
 msgstr "Fel vid läsning av iPod fotodatabas.\n"
 
-#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
-#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
 msgid "Insufficient number of command line arguments.\n"
 msgstr "Otillräckligt antal kommandoradsväljare.\n"
 
-#: ../tests/test-photos.c:201
+#: ../tests/test-photos.c:194
 msgid "<Unnamed>"
 msgstr "<Namnlös>"
 
-#: ../tests/test-photos.c:216
+#: ../tests/test-photos.c:209
+#, c-format
 msgid "<No members>\n"
 msgstr "<Inga medlemmar>\n"
 
-#: ../tests/test-photos.c:243
+#: ../tests/test-photos.c:236
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -654,37 +769,68 @@
 "Fel vid läsning av iPod fotodatabas (%s).\n"
 "Försöker skapa en ny databas.\n"
 
-#: ../tests/test-photos.c:249
-msgid ""
-"Error reading iPod photo database, will attempt to create a new database\n"
+#: ../tests/test-photos.c:242
+#, c-format
+msgid "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr "Fel vid läsning av iPod fotodatabas, försöker skapa en ny databas\n"
 
-#: ../tests/test-photos.c:274
+#: ../tests/test-photos.c:267
 #, c-format
 msgid "Error adding photo (%s) to photo database: %s\n"
 msgstr "Fel vid vid tillägg av foto (%s) i fotodatabas: %s\n"
 
-#: ../tests/test-photos.c:331
+#: ../tests/test-photos.c:324
 #, c-format
 msgid "Specified album '%s' not found. Aborting.\n"
 msgstr "Angivet album '%s' hittades inte. Avbryter.\n"
 
-#: ../tests/test-photos.c:343
+#: ../tests/test-photos.c:336
+#, c-format
 msgid "Cannot remove Photo Library playlist. Aborting.\n"
 msgstr "Kan inte ta bort fotobibliotekets spellista. Avbryter.\n"
 
-#: ../tests/test-photos.c:364
-#, fuzzy, c-format
+#: ../tests/test-photos.c:357
+#, c-format
 msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
-msgstr "Fel: Kunde inte hitta foto med id <%d>. Hoppar över det...\n"
+msgstr "Varning: Kunde inte hitta foto med id <%d>. Hoppar över det...\n"
 
-#: ../tests/test-photos.c:410
+#: ../tests/test-photos.c:403
 #, c-format
 msgid "Unknown command '%s'\n"
 msgstr "Okänt kommando '%s'\n"
 
-#~ msgid "Cannot write mhod of type %d\n"
-#~ msgstr "Kan inte skriva mhod av typen %d\n"
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Fel vid initiering av iPod: %s\n"
 
-#~ msgid "Error reading iPod photo database"
-#~ msgstr "Fel vid läsning av iPod fotodatabas"
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Fel vid initiering av iPod, okänt fel\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "användning: %s <enhet> <monteringsplats>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Kunde inte läsa XML-systeminformation från %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Kunde inte lösa upp enhetens katalogsökväg på %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Kunde inte lösa upp sökväg till utökad systeminformation på %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Kunde inte skriva utökad systeminformation på %s"
+

Copied: libgpod/trunk/po/zh_CN.po (from rev 340, libgpod/branches/upstream/current/po/zh_CN.po)
===================================================================
--- libgpod/trunk/po/zh_CN.po	                        (rev 0)
+++ libgpod/trunk/po/zh_CN.po	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,829 @@
+# Simplified Chinese Translation Catalogue
+# Copyright (C) 2003-2009 Jörg Schuler
+# This file is distributed under the same license as the libgpod package.
+# Tan Zhixin <tanzhxin at gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: libgpod 0.7.0\n"
+"Report-Msgid-Bugs-To: gtkpod-devel at lists.sourceforge.net\n"
+"POT-Creation-Date: 2008-12-07 20:48-0500\n"
+"PO-Revision-Date: 2009-1-5 20:15+0900\n"
+"Last-Translator: Tan Zhxin <tanzhxin at gmail.com>\n"
+"Language-Team: n/a\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/db-artwork-parser.c:156
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "未预期的mhod字符串:%d\n"
+
+#: ../src/db-artwork-parser.c:476
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "未预期的mhsd索引:%d\n"
+
+#: ../src/db-artwork-parser.c:522
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "无法找到对应专辑封面的音轨(dbid: %s)。\n"
+
+#: ../src/db-artwork-parser.c:530
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr "iTunesDB和ArtworkDB中专辑封面的文件大小不一致 (%d+%d != %d)\n"
+
+#: ../src/db-artwork-parser.c:566
+#, c-format
+msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+msgstr "无法找到对应音轨(dbid:%2$s)的专辑封面(mhii id:%1$u)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "mhni中未预期的图片类型: %d,位置: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "无法存取文件'%s'"
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "编译libgpod时未加入专辑封面支持"
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "在iPod中无法找到: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"无法调出缩略图(iPod中存在,但是无法获得图像信息):文件'%s'\n"
+
+#: ../src/itdb_device.c:256
+msgid "Invalid"
+msgstr "无效"
+
+#: ../src/itdb_device.c:257 ../src/itdb_device.c:298
+msgid "Unknown"
+msgstr "未知"
+
+#: ../src/itdb_device.c:258
+msgid "Color"
+msgstr "Color"
+
+#: ../src/itdb_device.c:259
+msgid "Color U2"
+msgstr "Color U2"
+
+#: ../src/itdb_device.c:260
+msgid "Grayscale"
+msgstr "Grayscale"
+
+#: ../src/itdb_device.c:261
+msgid "Grayscale U2"
+msgstr "Grayscale U2"
+
+#: ../src/itdb_device.c:262
+msgid "Mini (Silver)"
+msgstr "Mini(银)"
+
+#: ../src/itdb_device.c:263
+msgid "Mini (Blue)"
+msgstr "Mini(蓝)"
+
+#: ../src/itdb_device.c:264
+msgid "Mini (Pink)"
+msgstr "Mini(粉)"
+
+#: ../src/itdb_device.c:265
+msgid "Mini (Green)"
+msgstr "Mini(绿)"
+
+#: ../src/itdb_device.c:266
+msgid "Mini (Gold)"
+msgstr "Mini(金)"
+
+#: ../src/itdb_device.c:267
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:268
+msgid "Nano (White)"
+msgstr "Nano(白)"
+
+#: ../src/itdb_device.c:269
+msgid "Nano (Black)"
+msgstr "Nano(黑)"
+
+#: ../src/itdb_device.c:270
+msgid "Video (White)"
+msgstr "Video(白)"
+
+#: ../src/itdb_device.c:271
+msgid "Video (Black)"
+msgstr "Video(黑)"
+
+#: ../src/itdb_device.c:272
+msgid "Mobile (1)"
+msgstr "Mobile(1代)"
+
+#: ../src/itdb_device.c:273
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:274
+msgid "Nano (Silver)"
+msgstr "Nano(银)"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (Blue)"
+msgstr "Nano(蓝)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Green)"
+msgstr "Nano(绿)"
+
+#: ../src/itdb_device.c:277
+msgid "Nano (Pink)"
+msgstr "Nano(粉)"
+
+#: ../src/itdb_device.c:278
+msgid "Nano (Red)"
+msgstr "Nano(红)"
+
+#: ../src/itdb_device.c:279
+msgid "Nano (Yellow)"
+msgstr "Nano(黄)"
+
+#: ../src/itdb_device.c:280
+msgid "Nano (Purple)"
+msgstr "Nano(ç´«)"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Orange)"
+msgstr "Nano(æ©™)"
+
+#: ../src/itdb_device.c:282
+msgid "iPhone (1)"
+msgstr "iPhone(1代)"
+
+#: ../src/itdb_device.c:283
+msgid "Shuffle (Silver)"
+msgstr "Shuffle(银)"
+
+#: ../src/itdb_device.c:284
+msgid "Shuffle (Pink)"
+msgstr "Shuffle(粉)"
+
+#: ../src/itdb_device.c:285
+msgid "Shuffle (Blue)"
+msgstr "Shuffle(蓝)"
+
+#: ../src/itdb_device.c:286
+msgid "Shuffle (Green)"
+msgstr "Shuffle(绿)"
+
+#: ../src/itdb_device.c:287
+msgid "Shuffle (Orange)"
+msgstr "Shuffle(æ©™)"
+
+#: ../src/itdb_device.c:288
+msgid "Shuffle (Purple)"
+msgstr "Shuffle(ç´«)"
+
+#: ../src/itdb_device.c:289
+msgid "Shuffle (Red)"
+msgstr "Shuffle(红)"
+
+#: ../src/itdb_device.c:290
+msgid "Classic (Silver)"
+msgstr "Classic(银)"
+
+#: ../src/itdb_device.c:291
+msgid "Classic (Black)"
+msgstr "Classic(黑)"
+
+#: ../src/itdb_device.c:292
+msgid "Touch (Black)"
+msgstr "Touch(黑)"
+
+#: ../src/itdb_device.c:299
+msgid "Regular (1st Gen.)"
+msgstr "标准(1代)"
+
+#: ../src/itdb_device.c:300
+msgid "Regular (2nd Gen.)"
+msgstr "标准(2代)"
+
+#: ../src/itdb_device.c:301
+msgid "Regular (3rd Gen.)"
+msgstr "标准(3代)"
+
+#: ../src/itdb_device.c:302
+msgid "Regular (4th Gen.)"
+msgstr "标准(4代)"
+
+#: ../src/itdb_device.c:303
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:304
+msgid "Mobile Phones"
+msgstr "Mobile Phones"
+
+#: ../src/itdb_device.c:305
+msgid "Mini (1st Gen.)"
+msgstr "Mini(1代)"
+
+#: ../src/itdb_device.c:306
+msgid "Mini (2nd Gen.)"
+msgstr "Mini(2代)"
+
+#: ../src/itdb_device.c:307
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle(1代)"
+
+#: ../src/itdb_device.c:308
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle(2代)"
+
+#: ../src/itdb_device.c:309
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle(3代)"
+
+#: ../src/itdb_device.c:310
+msgid "Nano (1st Gen.)"
+msgstr "Nano(1代)"
+
+#: ../src/itdb_device.c:311
+msgid "Nano (2nd Gen.)"
+msgstr "Nano(2代)"
+
+#: ../src/itdb_device.c:312
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Video(3代)"
+
+#: ../src/itdb_device.c:313
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video(4代)"
+
+#: ../src/itdb_device.c:314
+msgid "Video (1st Gen.)"
+msgstr "Video(1代)"
+
+#: ../src/itdb_device.c:315
+msgid "Video (2nd Gen.)"
+msgstr "Video(2代)"
+
+#: ../src/itdb_device.c:316 ../src/itdb_device.c:317
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:318
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:319
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:320 ../src/itdb_device.c:321
+msgid "Unused"
+msgstr "未使用"
+
+#: ../src/itdb_device.c:874
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "无法打开'%s'写入。"
+
+#: ../src/itdb_device.c:883
+#, c-format
+msgid "Device directory does not exist."
+msgstr "设备目录不存在。"
+
+#: ../src/itdb_itunesdb.c:462
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "超出文件'%3$s'(长度%2$ld)搜索位置%1$ld"
+
+#: ../src/itdb_itunesdb.c:915
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "不是一个播放次数记录文件:'%s'(缺少mhdp头)"
+
+#: ../src/itdb_itunesdb.c:930
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr "播放次数记录文件('%s'): 文件头长度小于预期(%d<96)。"
+
+#: ../src/itdb_itunesdb.c:944
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr "播放次数记录文件('%s'): 项目长度小于预期(%d<12)。"
+
+#: ../src/itdb_itunesdb.c:1019
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr "iTunesStats文件('%s'):项目长度小于预期(%d<18)。"
+
+#: ../src/itdb_itunesdb.c:1338
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "iTunesDB损坏:文件'%2$s'中 %1$ld 位置没有MHOD。"
+
+#: ../src/itdb_itunesdb.c:1524
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr "%ld位置有未知的smart规则动作:%x,尝试继续。\n"
+
+#: ../src/itdb_itunesdb.c:1555
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"智能播放列表规则区(%d)的长度超出范围,尝试继续。\n"
+
+#: ../src/itdb_itunesdb.c:1598
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "iTunesDB损坏:文件'%2$s'中 %1$ld 位置没有SLst。"
+
+#: ../src/itdb_itunesdb.c:1611
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"检查iTunesDB时发现未知MHOD类型(%d),忽略。\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1691
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr "iTunesDB损坏:文件'%2$s'中%1$ld位置大量0。"
+
+#: ../src/itdb_itunesdb.c:1704
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB损坏:'%2$s'部分%3$ld位置找不到'%1$s'"
+
+#: ../src/itdb_itunesdb.c:1718
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"文件'%5$s'中%4$ld位置的'%1$s'起始部分长度小于预期(%2$d < %3$d)"
+
+
+#: ../src/itdb_itunesdb.c:1803
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "不是iTunesDB:'%s'(缺少mhdb头)。"
+
+#: ../src/itdb_itunesdb.c:1820
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunesDB('%s'):mhsd的起始部分长度小于预期(%d<32)。"
+"放弃。"
+
+#: ../src/itdb_itunesdb.c:1841
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunesDB'%s'损坏:mhsd的预期位置为%ld。"
+
+#: ../src/itdb_itunesdb.c:1958
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+
+#: ../src/itdb_itunesdb.c:1976
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "找不到Itdb_Track %d'。\n"
+
+#: ../src/itdb_itunesdb.c:2146
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+
+#: ../src/itdb_itunesdb.c:2156
+msgid "Master-PL"
+msgstr "主播放列表"
+
+#: ../src/itdb_itunesdb.c:2160
+msgid "Podcasts"
+msgstr "Podcasts"
+
+#: ../src/itdb_itunesdb.c:2162
+msgid "Playlist"
+msgstr "播放列表"
+
+#: ../src/itdb_itunesdb.c:2184
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunesDB损坏:number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+
+#: ../src/itdb_itunesdb.c:2527
+msgid "OTG Playlist"
+msgstr "OTG播放列表"
+
+#: ../src/itdb_itunesdb.c:2545
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "不是OTG播放列表:'%s'(缺少mhpo头)"
+
+#: ../src/itdb_itunesdb.c:2559
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr "OTG播放列表('%s'):起始长度小于预期(%d<20)。"
+
+#: ../src/itdb_itunesdb.c:2571
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr "OTG播放列表('%s'):项目长度小于预期(%d<4)。"
+
+#: ../src/itdb_itunesdb.c:2606
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr "OTG播放列表('%s'):指向不存在的音轨(%d)。"
+
+#: ../src/itdb_itunesdb.c:2651
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "OTG播放列表%d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2719
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"iTunesDB损坏:音轨数(mhit块)不一致,尝试继续。\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2782
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"iTunesDB可能损坏:播放列表数(mhyp块)不一致。\n"
+
+#: ../src/itdb_itunesdb.c:2829
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"iTunesDB'%s'损坏:找不到音轨列表(找不到mhsd type 1字段)"
+
+#: ../src/itdb_itunesdb.c:2858
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"iTunesDB'%s'损坏:找不到播放列表(找不到mhsd type 2或type 3字段)"
+
+#: ../src/itdb_itunesdb.c:2880
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "找不到iTunes目录:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:2897
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "找不到音乐目录:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:2915
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "找不到控制目录:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:3036
+#, c-format
+msgid "File not found: '%s'."
+msgstr "找不到文件:'%s'"
+
+#: ../src/itdb_itunesdb.c:5410
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "找不到路径:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:5616
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "重命名'%s'到'%s'(%s)出现错误。"
+
+#: ../src/itdb_itunesdb.c:5633 ../src/itdb_itunesdb.c:5650
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "移除'%s'(%s)出现错误。"
+
+#: ../src/itdb_itunesdb.c:5812 ../src/itdb_itunesdb.c:5985
+#, c-format
+msgid "Mountpoint not set."
+msgstr "没有设置挂载点。"
+
+#: ../src/itdb_itunesdb.c:5852
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "'%s'中找不到目录。"
+
+#: ../src/itdb_itunesdb.c:5873
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "找不到路径:'%s'"
+
+#: ../src/itdb_itunesdb.c:5994
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "无法存取'%s'(%s)"
+
+#: ../src/itdb_itunesdb.c:6004
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr ""
+"目标文件'%s'似乎不存在于'%s'上的iPod中"
+
+#: ../src/itdb_itunesdb.c:6212
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "打开'%s'读取时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6224
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "打开'%s'写入时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6240
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "读取'%s'时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6255
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "写入'%s'时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6268 ../src/itdb_itunesdb.c:6278
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "关闭'%s'时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6702
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7024
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "创建iPod目录或文件时出现问题:'%s'。"
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "找不到照片目录:'%s'(或类似)"
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "照片库"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr "在添加照片之前请您先指明使用的iPod型号。"
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"你的iPod似乎不支持照片功能,也许你需要一个正确的iPod型号,当前的设置为'x%s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "无法存取文件'%s',没有添加照片。"
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"添加照片时itdb_photodb_add_photo_internal() 发现未预期错误,请报告。"
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"libgpod编译时没有加入gdk-pixbuf支持,相片功能已关闭"
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr "忽略智能播放列表中未知动作(%d)。\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "非法文件名:'%s'。\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "没有设置挂载点。\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"添加照片的用法:\n"
+"  %s add <挂载点> <照片簿名> [<文件名(s)>]\n"
+"  照片簿名可以为空,此时照片添加到主照片簿中。\n"
+"  如果你没有指定文件名则创建一个空白的照片簿。\n"
+
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"导出所有照片到指定输出目录的用法:\n"
+"  %s dump <挂载点> <指定输出目录>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"在终端列出所有照片名的用法:\n"
+"  %s list <挂载点>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"从照片库移除照片的用法:\n"
+"   %s remove <挂载点> <照片簿名> [<照片名(s)>] \n"
+"   <照片簿名>可以为空用来同时从iPod移除照片,如果不指定任何照片名,那么就删除照片簿。\n"
+"   警告:当写入PhotoDB是照片名可能发生了变化。\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "命令行的参数数目不对。\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "创建(mkdir)'%s'时出错\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "错误:'%s'不是一个目录。\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "读取iPod照片数据库时出错(%s)。\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "读取iPod照片数据库时出错。\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "命令行的参数不足。\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<未命名的>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<无成员>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"读取iPod照片数据库(%s)时出现错误。\n"
+"尝试创建新的数据库。\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"读取iPod照片数据库时出错,尝试创建新的数据库\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "加入照片(%s)到数据库时出错:%s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "找不到指定照片簿'%s',放弃。\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "无法移除照片库,放弃。\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "警告:无法找到名为<%d>的照片,忽略\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "未知命令'%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "初始化iPod错误:%s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "初始化iPod出错,未知错误\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "用法:%s <设备> <挂载点>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "无法从%s中读取xml sysinfo\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "在%s中无法获得设备目录的路径"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "在%s中无法找到SysInfoExtende的路径"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "无法向%s写入SysInfoExtended"

Modified: libgpod/trunk/src/Makefile.am
===================================================================
--- libgpod/trunk/src/Makefile.am	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/Makefile.am	2009-01-24 12:10:00 UTC (rev 341)
@@ -7,20 +7,29 @@
 	db-image-parser.c   	\
 	db-parse-context.c  	\
 	itdb_artwork.c   	\
+	itdb_chapterdata.c   	\
 	itdb_device.c  		\
 	itdb_itunesdb.c 	\
 	itdb_photoalbum.c 	\
 	itdb_playlist.c  	\
+	itdb_plist.c		\
 	itdb_sha1.c 		\
-	itdb_sysinfo.c 		\
+	itdb_sysinfo_extended_parser.c \
+	itdb_thumb.c		\
 	itdb_track.c     	\
 	ithumb-writer.c 	\
 	pixmaps.c 		\
 	sha1.c
 
+if WITH_INTERNAL_GCHECKSUM
+libgpod_la_SOURCES += gchecksum.c gchecksum.h
+libgpod_la_CFLAGS = -DWITH_INTERNAL_GCHECKSUM
+endif
+
 libgpod_la_LDFLAGS = -version-info $(LIBGPOD_SO_VERSION) -no-undefined
 
-libgpodincludedir = $(includedir)/gpod-1.0/gpod
+libgpodincludebase = $(includedir)/gpod-1.0
+libgpodincludedir = $(libgpodincludebase)/gpod
 libgpodinclude_HEADERS = itdb.h
 noinst_HEADERS = 		\
 	db-artwork-debug.h	\
@@ -30,10 +39,17 @@
 	db-parse-context.h  	\
 	itdb_device.h  		\
 	itdb_endianness.h 	\
+	itdb_plist.h		\
 	itdb_private.h   	\
 	itdb_sha1.h 		\
+	itdb_sysinfo_extended_parser.h \
+	itdb_thumb.h		\
 	pixmaps.h		\
 	sha1.h
 
 INCLUDES=$(LIBGPOD_CFLAGS)
-LIBS=$(LIBGPOD_LIBS)
+LIBS=$(LIBGPOD_LIBS) -lm
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludedir)
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludebase)

Modified: libgpod/trunk/src/Makefile.in
===================================================================
--- libgpod/trunk/src/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -15,15 +15,11 @@
 @SET_MAKE@
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -37,6 +33,7 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+ at WITH_INTERNAL_GCHECKSUM_TRUE@am__append_1 = gchecksum.c gchecksum.h
 subdir = src
 DIST_COMMON = $(libgpodinclude_HEADERS) $(noinst_HEADERS) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -60,26 +57,44 @@
 libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libgpod_la_LIBADD =
-am_libgpod_la_OBJECTS = db-artwork-debug.lo db-artwork-parser.lo \
-	db-artwork-writer.lo db-image-parser.lo db-parse-context.lo \
-	itdb_artwork.lo itdb_device.lo itdb_itunesdb.lo \
-	itdb_photoalbum.lo itdb_playlist.lo itdb_sha1.lo \
-	itdb_sysinfo.lo itdb_track.lo ithumb-writer.lo pixmaps.lo \
-	sha1.lo
+am__libgpod_la_SOURCES_DIST = db-artwork-debug.c db-artwork-parser.c \
+	db-artwork-writer.c db-image-parser.c db-parse-context.c \
+	itdb_artwork.c itdb_chapterdata.c itdb_device.c \
+	itdb_itunesdb.c itdb_photoalbum.c itdb_playlist.c itdb_plist.c \
+	itdb_sha1.c itdb_sysinfo_extended_parser.c itdb_thumb.c \
+	itdb_track.c ithumb-writer.c pixmaps.c sha1.c gchecksum.c \
+	gchecksum.h
+ at WITH_INTERNAL_GCHECKSUM_TRUE@am__objects_1 = libgpod_la-gchecksum.lo
+am_libgpod_la_OBJECTS = libgpod_la-db-artwork-debug.lo \
+	libgpod_la-db-artwork-parser.lo \
+	libgpod_la-db-artwork-writer.lo libgpod_la-db-image-parser.lo \
+	libgpod_la-db-parse-context.lo libgpod_la-itdb_artwork.lo \
+	libgpod_la-itdb_chapterdata.lo libgpod_la-itdb_device.lo \
+	libgpod_la-itdb_itunesdb.lo libgpod_la-itdb_photoalbum.lo \
+	libgpod_la-itdb_playlist.lo libgpod_la-itdb_plist.lo \
+	libgpod_la-itdb_sha1.lo \
+	libgpod_la-itdb_sysinfo_extended_parser.lo \
+	libgpod_la-itdb_thumb.lo libgpod_la-itdb_track.lo \
+	libgpod_la-ithumb-writer.lo libgpod_la-pixmaps.lo \
+	libgpod_la-sha1.lo $(am__objects_1)
 libgpod_la_OBJECTS = $(am_libgpod_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+libgpod_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgpod_la_CFLAGS) \
+	$(CFLAGS) $(libgpod_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(libgpod_la_SOURCES)
-DIST_SOURCES = $(libgpod_la_SOURCES)
+DIST_SOURCES = $(am__libgpod_la_SOURCES_DIST)
 libgpodincludeHEADERS_INSTALL = $(INSTALL_HEADER)
 HEADERS = $(libgpodinclude_HEADERS) $(noinst_HEADERS)
 ETAGS = etags
@@ -88,8 +103,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -116,35 +129,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -183,17 +185,19 @@
 LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
-LIBS = $(LIBGPOD_LIBS)
+LIBS = $(LIBGPOD_LIBS) -lm
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -229,13 +233,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -247,6 +251,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -278,29 +283,22 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 lib_LTLIBRARIES = libgpod.la
-libgpod_la_SOURCES = \
-	db-artwork-debug.c  	\
-	db-artwork-parser.c 	\
-	db-artwork-writer.c 	\
-	db-image-parser.c   	\
-	db-parse-context.c  	\
-	itdb_artwork.c   	\
-	itdb_device.c  		\
-	itdb_itunesdb.c 	\
-	itdb_photoalbum.c 	\
-	itdb_playlist.c  	\
-	itdb_sha1.c 		\
-	itdb_sysinfo.c 		\
-	itdb_track.c     	\
-	ithumb-writer.c 	\
-	pixmaps.c 		\
-	sha1.c
-
+libgpod_la_SOURCES = db-artwork-debug.c db-artwork-parser.c \
+	db-artwork-writer.c db-image-parser.c db-parse-context.c \
+	itdb_artwork.c itdb_chapterdata.c itdb_device.c \
+	itdb_itunesdb.c itdb_photoalbum.c itdb_playlist.c itdb_plist.c \
+	itdb_sha1.c itdb_sysinfo_extended_parser.c itdb_thumb.c \
+	itdb_track.c ithumb-writer.c pixmaps.c sha1.c $(am__append_1)
+ at WITH_INTERNAL_GCHECKSUM_TRUE@libgpod_la_CFLAGS = -DWITH_INTERNAL_GCHECKSUM
 libgpod_la_LDFLAGS = -version-info $(LIBGPOD_SO_VERSION) -no-undefined
-libgpodincludedir = $(includedir)/gpod-1.0/gpod
+libgpodincludebase = $(includedir)/gpod-1.0
+libgpodincludedir = $(libgpodincludebase)/gpod
 libgpodinclude_HEADERS = itdb.h
 noinst_HEADERS = \
 	db-artwork-debug.h	\
@@ -310,8 +308,11 @@
 	db-parse-context.h  	\
 	itdb_device.h  		\
 	itdb_endianness.h 	\
+	itdb_plist.h		\
 	itdb_private.h   	\
 	itdb_sha1.h 		\
+	itdb_sysinfo_extended_parser.h \
+	itdb_thumb.h		\
 	pixmaps.h		\
 	sha1.h
 
@@ -351,21 +352,21 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
 	  if test -f $$p; then \
 	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
 	  else :; fi; \
 	done
 
 uninstall-libLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
 	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
 	done
 
 clean-libLTLIBRARIES:
@@ -377,7 +378,7 @@
 	  rm -f "$${dir}/so_locations"; \
 	done
 libgpod.la: $(libgpod_la_OBJECTS) $(libgpod_la_DEPENDENCIES) 
-	$(LINK) -rpath $(libdir) $(libgpod_la_LDFLAGS) $(libgpod_la_OBJECTS) $(libgpod_la_LIBADD) $(LIBS)
+	$(libgpod_la_LINK) -rpath $(libdir) $(libgpod_la_OBJECTS) $(libgpod_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -385,56 +386,196 @@
 distclean-compile:
 	-rm -f *.tab.c
 
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db-artwork-debug.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db-artwork-parser.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db-artwork-writer.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db-image-parser.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db-parse-context.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_artwork.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_device.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_itunesdb.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_photoalbum.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_playlist.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_sha1.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_sysinfo.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_track.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ithumb-writer.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pixmaps.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sha1.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-artwork-debug.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-artwork-parser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-artwork-writer.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-image-parser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-parse-context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-gchecksum.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_artwork.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_chapterdata.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_device.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_itunesdb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_photoalbum.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_playlist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_plist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_sha1.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_thumb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_track.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-ithumb-writer.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-pixmaps.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-sha1.Plo at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
+libgpod_la-db-artwork-debug.lo: db-artwork-debug.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-artwork-debug.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-artwork-debug.Tpo -c -o libgpod_la-db-artwork-debug.lo `test -f 'db-artwork-debug.c' || echo '$(srcdir)/'`db-artwork-debug.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-artwork-debug.Tpo $(DEPDIR)/libgpod_la-db-artwork-debug.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-artwork-debug.c' object='libgpod_la-db-artwork-debug.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-artwork-debug.lo `test -f 'db-artwork-debug.c' || echo '$(srcdir)/'`db-artwork-debug.c
+
+libgpod_la-db-artwork-parser.lo: db-artwork-parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-artwork-parser.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-artwork-parser.Tpo -c -o libgpod_la-db-artwork-parser.lo `test -f 'db-artwork-parser.c' || echo '$(srcdir)/'`db-artwork-parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-artwork-parser.Tpo $(DEPDIR)/libgpod_la-db-artwork-parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-artwork-parser.c' object='libgpod_la-db-artwork-parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-artwork-parser.lo `test -f 'db-artwork-parser.c' || echo '$(srcdir)/'`db-artwork-parser.c
+
+libgpod_la-db-artwork-writer.lo: db-artwork-writer.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-artwork-writer.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-artwork-writer.Tpo -c -o libgpod_la-db-artwork-writer.lo `test -f 'db-artwork-writer.c' || echo '$(srcdir)/'`db-artwork-writer.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-artwork-writer.Tpo $(DEPDIR)/libgpod_la-db-artwork-writer.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-artwork-writer.c' object='libgpod_la-db-artwork-writer.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-artwork-writer.lo `test -f 'db-artwork-writer.c' || echo '$(srcdir)/'`db-artwork-writer.c
+
+libgpod_la-db-image-parser.lo: db-image-parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-image-parser.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-image-parser.Tpo -c -o libgpod_la-db-image-parser.lo `test -f 'db-image-parser.c' || echo '$(srcdir)/'`db-image-parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-image-parser.Tpo $(DEPDIR)/libgpod_la-db-image-parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-image-parser.c' object='libgpod_la-db-image-parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-image-parser.lo `test -f 'db-image-parser.c' || echo '$(srcdir)/'`db-image-parser.c
+
+libgpod_la-db-parse-context.lo: db-parse-context.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-parse-context.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-parse-context.Tpo -c -o libgpod_la-db-parse-context.lo `test -f 'db-parse-context.c' || echo '$(srcdir)/'`db-parse-context.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-parse-context.Tpo $(DEPDIR)/libgpod_la-db-parse-context.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-parse-context.c' object='libgpod_la-db-parse-context.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-parse-context.lo `test -f 'db-parse-context.c' || echo '$(srcdir)/'`db-parse-context.c
+
+libgpod_la-itdb_artwork.lo: itdb_artwork.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_artwork.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_artwork.Tpo -c -o libgpod_la-itdb_artwork.lo `test -f 'itdb_artwork.c' || echo '$(srcdir)/'`itdb_artwork.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_artwork.Tpo $(DEPDIR)/libgpod_la-itdb_artwork.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_artwork.c' object='libgpod_la-itdb_artwork.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_artwork.lo `test -f 'itdb_artwork.c' || echo '$(srcdir)/'`itdb_artwork.c
+
+libgpod_la-itdb_chapterdata.lo: itdb_chapterdata.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_chapterdata.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_chapterdata.Tpo -c -o libgpod_la-itdb_chapterdata.lo `test -f 'itdb_chapterdata.c' || echo '$(srcdir)/'`itdb_chapterdata.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_chapterdata.Tpo $(DEPDIR)/libgpod_la-itdb_chapterdata.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_chapterdata.c' object='libgpod_la-itdb_chapterdata.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_chapterdata.lo `test -f 'itdb_chapterdata.c' || echo '$(srcdir)/'`itdb_chapterdata.c
+
+libgpod_la-itdb_device.lo: itdb_device.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_device.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_device.Tpo -c -o libgpod_la-itdb_device.lo `test -f 'itdb_device.c' || echo '$(srcdir)/'`itdb_device.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_device.Tpo $(DEPDIR)/libgpod_la-itdb_device.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_device.c' object='libgpod_la-itdb_device.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_device.lo `test -f 'itdb_device.c' || echo '$(srcdir)/'`itdb_device.c
+
+libgpod_la-itdb_itunesdb.lo: itdb_itunesdb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_itunesdb.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_itunesdb.Tpo -c -o libgpod_la-itdb_itunesdb.lo `test -f 'itdb_itunesdb.c' || echo '$(srcdir)/'`itdb_itunesdb.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_itunesdb.Tpo $(DEPDIR)/libgpod_la-itdb_itunesdb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_itunesdb.c' object='libgpod_la-itdb_itunesdb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_itunesdb.lo `test -f 'itdb_itunesdb.c' || echo '$(srcdir)/'`itdb_itunesdb.c
+
+libgpod_la-itdb_photoalbum.lo: itdb_photoalbum.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_photoalbum.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_photoalbum.Tpo -c -o libgpod_la-itdb_photoalbum.lo `test -f 'itdb_photoalbum.c' || echo '$(srcdir)/'`itdb_photoalbum.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_photoalbum.Tpo $(DEPDIR)/libgpod_la-itdb_photoalbum.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_photoalbum.c' object='libgpod_la-itdb_photoalbum.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_photoalbum.lo `test -f 'itdb_photoalbum.c' || echo '$(srcdir)/'`itdb_photoalbum.c
+
+libgpod_la-itdb_playlist.lo: itdb_playlist.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_playlist.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_playlist.Tpo -c -o libgpod_la-itdb_playlist.lo `test -f 'itdb_playlist.c' || echo '$(srcdir)/'`itdb_playlist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_playlist.Tpo $(DEPDIR)/libgpod_la-itdb_playlist.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_playlist.c' object='libgpod_la-itdb_playlist.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_playlist.lo `test -f 'itdb_playlist.c' || echo '$(srcdir)/'`itdb_playlist.c
+
+libgpod_la-itdb_plist.lo: itdb_plist.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_plist.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_plist.Tpo -c -o libgpod_la-itdb_plist.lo `test -f 'itdb_plist.c' || echo '$(srcdir)/'`itdb_plist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_plist.Tpo $(DEPDIR)/libgpod_la-itdb_plist.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_plist.c' object='libgpod_la-itdb_plist.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_plist.lo `test -f 'itdb_plist.c' || echo '$(srcdir)/'`itdb_plist.c
+
+libgpod_la-itdb_sha1.lo: itdb_sha1.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_sha1.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_sha1.Tpo -c -o libgpod_la-itdb_sha1.lo `test -f 'itdb_sha1.c' || echo '$(srcdir)/'`itdb_sha1.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_sha1.Tpo $(DEPDIR)/libgpod_la-itdb_sha1.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_sha1.c' object='libgpod_la-itdb_sha1.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_sha1.lo `test -f 'itdb_sha1.c' || echo '$(srcdir)/'`itdb_sha1.c
+
+libgpod_la-itdb_sysinfo_extended_parser.lo: itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_sysinfo_extended_parser.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Tpo -c -o libgpod_la-itdb_sysinfo_extended_parser.lo `test -f 'itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Tpo $(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_sysinfo_extended_parser.c' object='libgpod_la-itdb_sysinfo_extended_parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_sysinfo_extended_parser.lo `test -f 'itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`itdb_sysinfo_extended_parser.c
+
+libgpod_la-itdb_thumb.lo: itdb_thumb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_thumb.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_thumb.Tpo -c -o libgpod_la-itdb_thumb.lo `test -f 'itdb_thumb.c' || echo '$(srcdir)/'`itdb_thumb.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_thumb.Tpo $(DEPDIR)/libgpod_la-itdb_thumb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_thumb.c' object='libgpod_la-itdb_thumb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_thumb.lo `test -f 'itdb_thumb.c' || echo '$(srcdir)/'`itdb_thumb.c
+
+libgpod_la-itdb_track.lo: itdb_track.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_track.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_track.Tpo -c -o libgpod_la-itdb_track.lo `test -f 'itdb_track.c' || echo '$(srcdir)/'`itdb_track.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_track.Tpo $(DEPDIR)/libgpod_la-itdb_track.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_track.c' object='libgpod_la-itdb_track.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_track.lo `test -f 'itdb_track.c' || echo '$(srcdir)/'`itdb_track.c
+
+libgpod_la-ithumb-writer.lo: ithumb-writer.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-ithumb-writer.lo -MD -MP -MF $(DEPDIR)/libgpod_la-ithumb-writer.Tpo -c -o libgpod_la-ithumb-writer.lo `test -f 'ithumb-writer.c' || echo '$(srcdir)/'`ithumb-writer.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-ithumb-writer.Tpo $(DEPDIR)/libgpod_la-ithumb-writer.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ithumb-writer.c' object='libgpod_la-ithumb-writer.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-ithumb-writer.lo `test -f 'ithumb-writer.c' || echo '$(srcdir)/'`ithumb-writer.c
+
+libgpod_la-pixmaps.lo: pixmaps.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-pixmaps.lo -MD -MP -MF $(DEPDIR)/libgpod_la-pixmaps.Tpo -c -o libgpod_la-pixmaps.lo `test -f 'pixmaps.c' || echo '$(srcdir)/'`pixmaps.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-pixmaps.Tpo $(DEPDIR)/libgpod_la-pixmaps.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pixmaps.c' object='libgpod_la-pixmaps.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-pixmaps.lo `test -f 'pixmaps.c' || echo '$(srcdir)/'`pixmaps.c
+
+libgpod_la-sha1.lo: sha1.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-sha1.lo -MD -MP -MF $(DEPDIR)/libgpod_la-sha1.Tpo -c -o libgpod_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-sha1.Tpo $(DEPDIR)/libgpod_la-sha1.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sha1.c' object='libgpod_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+
+libgpod_la-gchecksum.lo: gchecksum.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-gchecksum.lo -MD -MP -MF $(DEPDIR)/libgpod_la-gchecksum.Tpo -c -o libgpod_la-gchecksum.lo `test -f 'gchecksum.c' || echo '$(srcdir)/'`gchecksum.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-gchecksum.Tpo $(DEPDIR)/libgpod_la-gchecksum.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gchecksum.c' object='libgpod_la-gchecksum.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-gchecksum.lo `test -f 'gchecksum.c' || echo '$(srcdir)/'`gchecksum.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 install-libgpodincludeHEADERS: $(libgpodinclude_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(libgpodincludedir)" || $(mkdir_p) "$(DESTDIR)$(libgpodincludedir)"
+	test -z "$(libgpodincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libgpodincludedir)"
 	@list='$(libgpodinclude_HEADERS)'; for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  f=$(am__strip_dir) \
@@ -455,8 +596,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -468,8 +609,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -479,13 +620,12 @@
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -499,22 +639,21 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -530,7 +669,7 @@
 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
 installdirs:
 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgpodincludedir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -565,7 +704,7 @@
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -579,12 +718,20 @@
 
 install-data-am: install-libgpodincludeHEADERS
 
+install-dvi: install-dvi-am
+
 install-exec-am: install-libLTLIBRARIES
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -605,23 +752,32 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-	uninstall-libgpodincludeHEADERS
+uninstall-am: uninstall-libLTLIBRARIES uninstall-libgpodincludeHEADERS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 
+.MAKE: install-am install-strip uninstall-am
+
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libLTLIBRARIES clean-libtool ctags 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-exec \
-	install-exec-am install-info install-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-libLTLIBRARIES install-libgpodincludeHEADERS \
-	install-man install-strip installcheck installcheck-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
 	installdirs maintainer-clean maintainer-clean-generic \
 	mostlyclean mostlyclean-compile mostlyclean-generic \
 	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \
+	uninstall-am uninstall-hook uninstall-libLTLIBRARIES \
 	uninstall-libgpodincludeHEADERS
 
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludedir)
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludebase)
 # 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:

Modified: libgpod/trunk/src/db-artwork-debug.c
===================================================================
--- libgpod/trunk/src/db-artwork-debug.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-artwork-debug.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -31,20 +31,20 @@
 dump_mhif (MhifHeader *mhif)
 {
 
-	g_print ("MHIF (%d):\n", sizeof (MhifHeader));
+	g_print ("MHIF (%zd):\n", sizeof (MhifHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhif->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhif->total_len));
 	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhif->unknown1));
-	g_print ("\tCorrelation ID: %d (=> F%d_1.ithmb)\n", 
-		 GINT_FROM_LE (mhif->correlation_id),
-		 GINT_FROM_LE (mhif->correlation_id));
+	g_print ("\tFormat ID: %d (=> F%d_1.ithmb)\n", 
+		 GINT_FROM_LE (mhif->format_id),
+		 GINT_FROM_LE (mhif->format_id));
 	g_print ("\tImage size: %d bytes\n", GINT_FROM_LE (mhif->image_size));
 }
 
 G_GNUC_INTERNAL void
 dump_mhia (MhiaHeader *mhia)
 {
-	g_print ("MHIA (%d):\n", sizeof (MhiaHeader));
+	g_print ("MHIA (%zd):\n", sizeof (MhiaHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhia->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhia->total_len));
 	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhia->unknown1));
@@ -70,39 +70,22 @@
 	return result;	
 }
 
-G_GNUC_INTERNAL void
-dump_mhod_type_1 (MhodHeaderArtworkType1 *mhod1) 
-{
-	g_print ("MHOD [artwork type 1] (%d):\n", sizeof (MhodHeaderArtworkType1));
-	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhod1->header_len));
-	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhod1->total_len));
-	g_print ("\tPadding: %04x\n", GINT_FROM_LE (mhod1->padding));
-	g_print ("\tType: %04x\n", GINT_FROM_LE (mhod1->type));
-	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhod1->unknown1));
-	g_print ("\tUnknown2: %08x\n", GINT_FROM_LE (mhod1->unknown2));
-	g_print ("\tString length: %u\n", GINT_FROM_LE (mhod1->string_len));
-	g_print ("\tUnknown3: %08x\n", GINT_FROM_LE (mhod1->unknown3));
-	g_print ("\tUnknown4: %08x\n", GINT_FROM_LE (mhod1->unknown4));
-	/* FIXME: do I need to translate UTF-8 to local encoding? */
-	g_print ("\tString: \"%.*s\"\n", GINT_FROM_LE (mhod1->string_len), mhod1->string);
-}
-
 G_GNUC_INTERNAL void 
-dump_mhod_type_3 (ArtworkDB_MhodHeaderArtworkType3 *mhod3) 
+dump_mhod_string (ArtworkDB_MhodHeaderString *mhod) 
 {
 	gchar *str;
 
-	g_print ("MHOD [artwork type 3] (%d):\n", sizeof (ArtworkDB_MhodHeaderArtworkType3));
-	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhod3->header_len));
-	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhod3->total_len));
-	g_print ("\tPadding: %04x\n", GINT_FROM_LE (mhod3->padding));
-	g_print ("\tType: %04x\n", GINT_FROM_LE (mhod3->type));
-	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhod3->unknown1));
-	g_print ("\tUnknown2: %08x\n", GINT_FROM_LE (mhod3->unknown2));
-	g_print ("\tString length: %u\n", GINT_FROM_LE (mhod3->string_len));
-	g_print ("\tMHOD version: %u\n", GINT_FROM_LE (mhod3->mhod_version));
-	g_print ("\tUnknown4: %08x\n", GINT_FROM_LE (mhod3->unknown4));
-	str = get_utf16_string (mhod3->string, GINT_FROM_LE (mhod3->string_len));
+	g_print ("MHOD [artwork type string] (%zd):\n", sizeof (ArtworkDB_MhodHeaderString));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhod->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhod->total_len));
+	g_print ("\tPadding: %04x\n", GINT_FROM_LE (mhod->padding_len));
+	g_print ("\tType: %04x\n", GINT_FROM_LE (mhod->type));
+	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhod->unknown1));
+	g_print ("\tUnknown2: %08x\n", GINT_FROM_LE (mhod->unknown2));
+	g_print ("\tString length: %u\n", GINT_FROM_LE (mhod->string_len));
+	g_print ("\tEncoding: %u\n", GINT_FROM_LE (mhod->encoding));
+	g_print ("\tUnknown4: %08x\n", GINT_FROM_LE (mhod->unknown4));
+	str = get_utf16_string (mhod->string, GINT_FROM_LE (mhod->string_len));
 	g_print ("\tString: %s\n", str);
 	g_free (str);
 }
@@ -113,13 +96,13 @@
 	unsigned int width  = GINT16_FROM_LE (mhni->image_width);
 	unsigned int height = GINT16_FROM_LE (mhni->image_height);
 
-	g_print ("MHNI (%d):\n", sizeof (MhniHeader));
+	g_print ("MHNI (%zd):\n", sizeof (MhniHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhni->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhni->total_len));
 	g_print ("\tNumber of children: %08x\n", GINT_FROM_LE (mhni->num_children));
-	g_print ("\tCorrelation ID: %d (=> F%d_1.ithmb)\n", 
-		 GINT_FROM_LE (mhni->correlation_id),
-		 GINT_FROM_LE (mhni->correlation_id));
+	g_print ("\tFormat ID: %d (=> F%d_1.ithmb)\n", 
+		 GINT_FROM_LE (mhni->format_id),
+		 GINT_FROM_LE (mhni->format_id));
 	g_print ("\tithmb offset: %u bytes\n", GINT_FROM_LE (mhni->ithmb_offset));
 	g_print ("\tImage size: %u bytes\n", GINT_FROM_LE (mhni->image_size));
 	g_print ("\tVertical padding: %d\n", GINT16_FROM_LE (mhni->vertical_padding));
@@ -130,7 +113,7 @@
 G_GNUC_INTERNAL void
 dump_mhod (ArtworkDB_MhodHeader *mhod) 
 {
-	g_print ("MHOD (%d):\n", sizeof (ArtworkDB_MhodHeader));
+	g_print ("MHOD (%zd):\n", sizeof (ArtworkDB_MhodHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhod->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhod->total_len));
 	g_print ("\tType: %08x\n", GINT_FROM_LE (mhod->type));
@@ -141,12 +124,12 @@
 G_GNUC_INTERNAL void
 dump_mhii (MhiiHeader *mhii)
 {
-	g_print ("MHII (%d):\n", sizeof (MhiiHeader));
+	g_print ("MHII (%zd):\n", sizeof (MhiiHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhii->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhii->total_len));
 	g_print ("\tNumber of children: %d\n", GINT_FROM_LE (mhii->num_children));
 	g_print ("\tImage ID: %08x\n", GINT_FROM_LE (mhii->image_id));
-	g_print ("\tSong ID: %016llx\n", GINT64_FROM_LE (mhii->song_id));
+	g_print ("\tSong ID: %016"G_GINT64_MODIFIER"x\n", GINT64_FROM_LE (mhii->song_id));
 	g_print ("\tUnknown4: %08x\n", GINT_FROM_LE (mhii->unknown4));
 	g_print ("\tRating: %08x\n", GINT_FROM_LE (mhii->rating));
 	g_print ("\tUnknown6: %08x\n", GINT_FROM_LE (mhii->unknown6));
@@ -162,7 +145,7 @@
 
 	str = g_string_new (id);
 	g_string_ascii_up (str);
-	g_print ("%s (%d):\n", str->str, sizeof (MhlHeader));
+	g_print ("%s (%zd):\n", str->str, sizeof (MhlHeader));
 	g_print ("\tHeader size: %d\n", GINT_FROM_LE (mhl->header_len));
 	g_print ("\tNumber of items: %d\n", GINT_FROM_LE (mhl->num_children));
 	g_string_free (str, TRUE);
@@ -171,7 +154,7 @@
 G_GNUC_INTERNAL void
 dump_mhsd (ArtworkDB_MhsdHeader *mhsd)
 {
-	g_print ("MHSD (%d):\n", sizeof (ArtworkDB_MhsdHeader));
+	g_print ("MHSD (%zd):\n", sizeof (ArtworkDB_MhsdHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhsd->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhsd->total_len));
 	g_print ("\tIndex: %d ", GINT16_FROM_LE (mhsd->index));
@@ -195,7 +178,7 @@
 G_GNUC_INTERNAL void
 dump_mhfd (MhfdHeader *mhfd)
 {
-	g_print ("MHFD (%d):\n", sizeof (MhfdHeader));
+	g_print ("MHFD (%zd):\n", sizeof (MhfdHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhfd->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhfd->total_len));
 	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhfd->unknown1));
@@ -203,8 +186,8 @@
 	g_print ("\tNumber of children: %d\n", GINT_FROM_LE (mhfd->num_children));
 	g_print ("\tUnknown3: %08x\n", GINT_FROM_LE (mhfd->unknown3));
 	g_print ("\tNext id: %08x\n", GINT_FROM_LE (mhfd->next_id));
-	g_print ("\tUnknown5: %016llx\n", GINT64_FROM_LE (mhfd->unknown5));
-	g_print ("\tUnknown6: %016llx\n", GINT64_FROM_LE (mhfd->unknown6));
+	g_print ("\tUnknown5: %016"G_GINT64_MODIFIER"x\n", GINT64_FROM_LE (mhfd->unknown5));
+	g_print ("\tUnknown6: %016"G_GINT64_MODIFIER"x\n", GINT64_FROM_LE (mhfd->unknown6));
 	g_print ("\tunknown_flag1: %04x\n", GINT_FROM_LE (mhfd->unknown_flag1));
 	g_print ("\tUnknown8: %08x\n", GINT_FROM_LE (mhfd->unknown8));
 	g_print ("\tUnknown9: %08x\n", GINT_FROM_LE (mhfd->unknown9));
@@ -215,7 +198,7 @@
 G_GNUC_INTERNAL void
 dump_mhba (MhbaHeader *mhba)
 {
-	g_print ("MHBA (%d):\n", sizeof (MhbaHeader));
+	g_print ("MHBA (%zd):\n", sizeof (MhbaHeader));
 	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhba->header_len));
 	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhba->total_len));
 	g_print ("\tNumber of Data Objects: %d\n", GINT_FROM_LE (mhba->num_mhods));

Modified: libgpod/trunk/src/db-artwork-debug.h
===================================================================
--- libgpod/trunk/src/db-artwork-debug.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-artwork-debug.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -20,20 +20,19 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
- *  $Id: db-artwork-debug.h 1299 2006-06-04 16:24:45Z jcsjcs $
+ *  $Id: db-artwork-debug.h 1948 2008-02-03 18:53:55Z teuf $
  */
 #ifndef DB_ARTWORK_DEBUG_H
 #define DB_ARTWORK_DEBUG_H
 
 #include "db-itunes-parser.h"
 
-/*#define DEBUG_ARTWORKDB*/
+/* #define DEBUG_ARTWORKDB */
 
 #ifdef DEBUG_ARTWORKDB
 extern G_GNUC_INTERNAL void dump_mhif (MhifHeader *mhif);
 extern G_GNUC_INTERNAL void dump_mhia (MhiaHeader *mhia);
-extern G_GNUC_INTERNAL void dump_mhod_type_1 (MhodHeaderArtworkType1 *mhod);
-extern G_GNUC_INTERNAL void dump_mhod_type_3 (ArtworkDB_MhodHeaderArtworkType3 *mhod);
+extern G_GNUC_INTERNAL void dump_mhod_string (ArtworkDB_MhodHeaderString *mhod);
 extern G_GNUC_INTERNAL void dump_mhni (MhniHeader *mhni);
 extern G_GNUC_INTERNAL void dump_mhod (ArtworkDB_MhodHeader *mhod);
 extern G_GNUC_INTERNAL void dump_mhii (MhiiHeader *mhii);
@@ -44,8 +43,7 @@
 #else 
 #define dump_mhif(x)
 #define dump_mhia(x)
-#define dump_mhod_type_1(x)
-#define dump_mhod_type_3(x)
+#define dump_mhod_string(x)
 #define dump_mhni(x)
 #define dump_mhod(x)
 #define dump_mhii(x)

Modified: libgpod/trunk/src/db-artwork-parser.c
===================================================================
--- libgpod/trunk/src/db-artwork-parser.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-artwork-parser.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -113,61 +113,80 @@
 	
 }
 
-static char *
-mhod3_get_ithmb_filename (DBParseContext *ctx, ArtworkDB_MhodHeaderArtworkType3 *mhod3)
+struct ParsedMhodString {
+        enum MhodType mhod_type;
+        char *mhod_string;
+};
+
+static struct ParsedMhodString *
+parse_mhod_string (DBParseContext *ctx, GError *error)
 {
-       char *filename=NULL;
+	struct ParsedMhodString *result;
+	ArtworkDB_MhodHeaderString *mhod_string;
+	ArtworkDB_MhodHeader *mhod;
+	gint len;
+	mhod = db_parse_context_get_m_header (ctx, ArtworkDB_MhodHeader, "mhod");
+	if (mhod == NULL) {
+		return NULL;
+	}
+	db_parse_context_set_total_len (ctx, get_gint32 (mhod->total_len, ctx->byte_order));
 
-       g_assert (mhod3 != NULL);
+	if (get_gint32 (mhod->total_len, ctx->byte_order) < sizeof (ArtworkDB_MhodHeaderString)){
+		return NULL;
+	}
 
-       if (mhod3->mhod_version == 2)
-	   filename = get_utf16_string ((gunichar2 *)mhod3->string,
-					get_gint32 (mhod3->string_len, ctx->byte_order),
-					ctx->byte_order);
-       else if ((mhod3->mhod_version == 0) ||
-		(mhod3->mhod_version == 1))
-	   filename = g_strndup (mhod3->string,
-				 get_gint32 (mhod3->string_len, ctx->byte_order));
-       else
-	   g_warning (_("Unexpected mhod3 string type: %d\n"),
-		      mhod3->mhod_version);
-       return filename;
+	result = g_new0 (struct ParsedMhodString, 1);
+	if (result == NULL) {
+		return NULL;
+	}
+
+	mhod_string = (ArtworkDB_MhodHeaderString*)mhod;
+	result->mhod_type = get_gint16 (mhod_string->type, ctx->byte_order);
+	len = get_gint32 (mhod_string->string_len, ctx->byte_order);
+	switch (mhod_string->encoding) {
+	case 2:
+		result->mhod_string = get_utf16_string ((gunichar2 *)mhod_string->string,
+							len, ctx->byte_order);
+		break;
+	case 0:
+	case 1: 
+		result->mhod_string = g_strndup (mhod_string->string, len);
+		break;
+	default:
+		g_warning (_("Unexpected mhod string type: %d\n"),
+			   mhod_string->encoding);
+		break;
+	}
+	dump_mhod_string (mhod_string);
+	return result;
 }
 
-
 static int
 parse_mhod_3 (DBParseContext *ctx,
-	      Itdb_Thumb *thumb, GError *error)
+	      Itdb_Thumb_Ipod_Item *thumb, GError *error)
 {
-	ArtworkDB_MhodHeader *mhod;
-	ArtworkDB_MhodHeaderArtworkType3 *mhod3;
-	gint32 mhod3_type;
-
-	mhod = db_parse_context_get_m_header (ctx, ArtworkDB_MhodHeader, "mhod");
+	struct ParsedMhodString *mhod;
+	mhod = parse_mhod_string (ctx, error);
 	if (mhod == NULL) {
 		return -1;
 	}
-	db_parse_context_set_total_len (ctx, get_gint32 (mhod->total_len, ctx->byte_order));
-	
-	if (get_gint32 (mhod->total_len, ctx->byte_order) < sizeof (ArtworkDB_MhodHeaderArtworkType3)){
+	if (mhod->mhod_type != MHOD_ARTWORK_TYPE_FILE_NAME) {
+		g_free (mhod->mhod_string);
+		g_free (mhod);
 		return -1;
 	}
-	mhod3 = (ArtworkDB_MhodHeaderArtworkType3*)mhod;
-	mhod3_type = get_gint16 (mhod3->type, ctx->byte_order);
-	if (mhod3_type != MHOD_ARTWORK_TYPE_FILE_NAME) {
-		return -1;
-	}
-	thumb->filename = mhod3_get_ithmb_filename (ctx, mhod3);
-	dump_mhod_type_3 (mhod3);
+
+	thumb->filename = mhod->mhod_string;
+	g_free (mhod);
 	return 0;
 }
 
 static int
-parse_photo_mhni (DBParseContext *ctx, Itdb_Artwork *artwork, GError *error)
+parse_photo_mhni (DBParseContext *ctx, Itdb_Thumb_Ipod *thumbs, GError *error)
 {
 	MhniHeader *mhni;
 	DBParseContext *mhod_ctx; 
-	Itdb_Thumb *thumb;
+	Itdb_Thumb_Ipod_Item *thumb;
 
 	mhni = db_parse_context_get_m_header (ctx, MhniHeader, "mhni");
 	if (mhni == NULL) {
@@ -180,9 +199,9 @@
 	if (thumb == NULL) {
 		return 0;
 	}
+    
+        itdb_thumb_ipod_add (thumbs, thumb);
 
-	artwork->thumbnails = g_list_append (artwork->thumbnails, thumb);
-
 	mhod_ctx = db_parse_context_get_sub_context (ctx, ctx->header_len);
 	if (mhod_ctx == NULL) {
 	  return -1;
@@ -194,7 +213,7 @@
 }
 
 static int
-parse_photo_mhod (DBParseContext *ctx, Itdb_Artwork *artwork, GError *error)
+parse_photo_mhod (DBParseContext *ctx, Itdb_Thumb_Ipod *thumbs, GError *error)
 {
 	ArtworkDB_MhodHeader *mhod;
 	DBParseContext *mhni_ctx;
@@ -208,11 +227,7 @@
 
 	type = get_gint16 (mhod->type, ctx->byte_order);
 
-	if ( type == MHOD_ARTWORK_TYPE_ALBUM_NAME) {
-		dump_mhod_type_1 ((MhodHeaderArtworkType1 *)mhod);
-	} else {
-		dump_mhod (mhod);
-	}
+        dump_mhod (mhod);
 
 	/* if this is a container... */
 	if (type == MHOD_ARTWORK_TYPE_THUMBNAIL) {
@@ -220,12 +235,13 @@
 		if (mhni_ctx == NULL) {
 			return -1;
 		}
-		parse_photo_mhni (mhni_ctx, artwork, NULL);
+		parse_photo_mhni (mhni_ctx, thumbs, NULL);
 		g_free (mhni_ctx);
 	}
 
 	return 0;
 }
+
 static int
 parse_mhii (DBParseContext *ctx, GError *error)
 {
@@ -233,14 +249,12 @@
 	DBParseContext *mhod_ctx;
 	int num_children;
 	off_t cur_offset;
-	iPodSong *song = NULL;
 	Itdb_Artwork *artwork;
 	Itdb_PhotoDB *photodb;
-	Itdb_iTunesDB *itunesdb;
-	guint64 dbid;
 	guint64 mactime;
 	Itdb_Device *device = db_get_device (ctx->db);
-
+        Itdb_Thumb_Ipod *thumbs;
+            
 	mhii = db_parse_context_get_m_header (ctx, MhiiHeader, "mhii");
 	if (mhii == NULL)
 	{
@@ -249,32 +263,7 @@
 	db_parse_context_set_total_len (ctx, get_gint32 (mhii->total_len, ctx->byte_order));
 	dump_mhii (mhii);
 
-	switch (ctx->db->db_type)
-	{
-	case DB_TYPE_PHOTO:
-	    photodb = db_get_photodb (ctx->db);
-	    g_return_val_if_fail (photodb, -1);
-	    artwork = g_new0 (Itdb_Artwork, 1);
-	    photodb->photos = g_list_append (photodb->photos, artwork);
-	    break;
-	case DB_TYPE_ITUNES:
-	    itunesdb = db_get_itunesdb (ctx->db);
-	    g_return_val_if_fail (itunesdb, -1);
-	    dbid = get_gint64 (mhii->song_id, ctx->byte_order);
-	    song = get_song_by_dbid (itunesdb, dbid);
-	    if (song == NULL)
-	    {
-		gchar *strval = g_strdup_printf("%" G_GINT64_FORMAT, dbid);
-		g_print (_("Could not find corresponding track (dbid: %s) for artwork entry.\n"), strval);
-		g_free (strval);
-		return -1;
-	    }
-	    artwork = song->artwork;
-	    g_return_val_if_fail (artwork, -1);
-	    break;
-	default:
-	    g_return_val_if_reached (-1);
-	}
+	artwork = itdb_artwork_new ();
 
 	artwork->id = get_gint32 (mhii->image_id, ctx->byte_order);
 	artwork->unk028 = get_gint32 (mhii->unknown4, ctx->byte_order);
@@ -285,30 +274,38 @@
 	mactime = get_gint32 (mhii->digitized_date, ctx->byte_order);
 	artwork->digitized_date = device_time_mac_to_time_t (device, mactime);
 	artwork->artwork_size = get_gint32 (mhii->orig_img_size, ctx->byte_order);
+	artwork->dbid = get_gint64 (mhii->song_id, ctx->byte_order);
 
-	if (song)
-	{
-	    if ((song->artwork_size+song->artwork_count) !=
-		artwork->artwork_size)
-	    {
-		g_warning (_("iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"),
-			   song->artwork_size,
-			   song->artwork_count,
-			   song->artwork->artwork_size);
-	    }
-	}
-
+        thumbs = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+        artwork->thumbnail = (Itdb_Thumb *)thumbs;
 	cur_offset = ctx->header_len;
 	mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
 	num_children = get_gint32 (mhii->num_children, ctx->byte_order);
 	while ((num_children > 0) && (mhod_ctx != NULL))
 	{
-	    parse_photo_mhod (mhod_ctx, artwork, NULL);
+	    parse_photo_mhod (mhod_ctx, thumbs, NULL);
 	    num_children--;
 	    cur_offset += mhod_ctx->total_len;
 	    g_free (mhod_ctx);
 	    mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
 	}
+        g_free (mhod_ctx);
+
+	switch (ctx->db->db_type)
+	{
+	case DB_TYPE_PHOTO:
+	    photodb = db_get_photodb (ctx->db);
+	    g_return_val_if_fail (photodb, -1);
+	    photodb->photos = g_list_append (photodb->photos, artwork);
+	    break;
+	case DB_TYPE_ITUNES:
+	    g_return_val_if_fail (ctx->artwork!=NULL, -1);
+	    *ctx->artwork = g_list_prepend (*ctx->artwork, artwork);
+	    break;
+	default:
+	    g_return_val_if_reached (-1);
+	}
+
 	return 0;
 }
 
@@ -316,6 +313,7 @@
 parse_mhba (DBParseContext *ctx, GError *error)
 {
 	MhbaHeader *mhba;
+	DBParseContext *mhod_ctx;
 	DBParseContext *mhia_ctx;
 	Itdb_PhotoAlbum *album;
 	Itdb_PhotoDB *photodb;
@@ -352,37 +350,35 @@
 
 	cur_offset = ctx->header_len;
 	num_children = get_gint32 (mhba->num_mhods, ctx->byte_order);
-	while (num_children > 0)
-	{
-	    MhodHeaderArtworkType1 *mhod1;
-	    ArtworkDB_MhodHeader *mhod;
-	    DBParseContext *mhod_ctx;
 
-	    mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
-	    /* FIXME: First mhod is album name, whats the others for? */
-	    mhod = db_parse_context_get_m_header (mhod_ctx,
-						  ArtworkDB_MhodHeader, "mhod");
-	    if (mhod == NULL) {
+        mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+        while ((num_children > 0) && (mhod_ctx != NULL)) {
+		struct ParsedMhodString *mhod;
+
+		mhod = parse_mhod_string (mhod_ctx, error);
+		if (mhod == NULL) {
+			break;
+		}
+		switch (mhod->mhod_type)
+		{  /* FIXME: type==1 is album name. type==2 seems to be
+		    * the transtition type between photos,
+		    * e.g. "Dissolve". Not handled yet. */
+		case MHOD_ARTWORK_TYPE_ALBUM_NAME:
+			g_free (album->name);
+			album->name = mhod->mhod_string;
+			g_free (mhod);
+			break;
+		default:
+			g_free (mhod->mhod_string);
+			g_free (mhod);
+			break;
+		}
+		cur_offset += mhod_ctx->total_len;
 		g_free (mhod_ctx);
-		return -1;
-	    }
-	    db_parse_context_set_total_len (mhod_ctx,
-					    get_gint32(mhod->total_len, ctx->byte_order));
-	    mhod1 = (MhodHeaderArtworkType1*)mhod;
-	    switch (mhod1->type)
-	    {  /* FIXME: type==1 is album name. type==2 seems to be
-		* the transtition type between photos,
-		* e.g. "Dissolve". Not handled yet. */
-	    case 1:
-		album->name = g_strndup ((gchar *)mhod1->string,
-					 get_gint32(mhod1->string_len, ctx->byte_order));
-		dump_mhod_type_1 (mhod1);
-		break;
-	    }
-	    cur_offset += mhod_ctx->total_len;
-	    g_free (mhod_ctx);
-	    num_children--;
-	}
+		num_children--;
+		mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+        }
+	g_free (mhod_ctx);
 
 	mhia_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
 	num_children = get_gint32 (mhba->num_mhias, ctx->byte_order);
@@ -393,8 +389,10 @@
 		g_free (mhia_ctx);
 		mhia_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
 	}
+        g_free (mhia_ctx);
 	photodb = db_get_photodb (ctx->db);
 	g_return_val_if_fail (photodb, -1);
+	album->photodb = photodb;
 	photodb->photoalbums = g_list_append (photodb->photoalbums,
 					      album);
 	return 0;
@@ -433,6 +431,7 @@
 		g_free (mhi_ctx);
 		mhi_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
 	}
+        g_free (mhi_ctx);
 
 	return 0;
 
@@ -483,6 +482,110 @@
 	return 0;
 }
 
+
+/* Apple introduced a new way to associate artwork. The former way
+ * used the dbid to link each artwork (mhii) back to the track. The
+ * new way uses the mhii id to link from each track to the mhii. Above
+ * we only handled the former way */
+static int
+mhfd_associate_itunesdb_artwork (DBParseContext *ctx)
+{
+    GHashTable *mhii_id_hash;
+    Itdb_iTunesDB *itdb;
+    GList *gl;
+
+    g_return_val_if_fail (ctx && ctx->artwork, -1);
+    itdb = db_get_itunesdb (ctx->db);
+    g_return_val_if_fail (itdb, -1);
+
+    /* make a hash linking the mhii with the artwork for faster
+       lookup */
+    mhii_id_hash = g_hash_table_new_full (g_direct_hash,
+					  g_direct_equal,
+					  NULL,
+					  (GDestroyNotify)itdb_artwork_free);
+
+    for (gl=*ctx->artwork; gl; gl=gl->next)
+    {
+	Itdb_Track *track;
+	Itdb_Artwork *artwork=gl->data;
+	g_return_val_if_fail (artwork, -1);
+
+	g_hash_table_insert (mhii_id_hash, GINT_TO_POINTER (artwork->id), artwork);
+
+	/* add Artwork to track indicated by the dbid for backward
+	   compatibility */
+	track = get_song_by_dbid (itdb, artwork->dbid);
+	if (track == NULL)
+	{
+	    gchar *strval = g_strdup_printf("%" G_GINT64_FORMAT, artwork->dbid);
+	    g_print (_("Could not find corresponding track (dbid: %s) for artwork entry.\n"), strval);
+	    g_free (strval);
+	}
+	else
+	{
+	    if ((track->artwork_size + track->artwork_count) !=
+		artwork->artwork_size)
+	    {
+		g_warning (_("iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"),
+			   track->artwork_size,
+			   track->artwork_count,
+			   track->artwork->artwork_size);
+	    }
+	    itdb_artwork_free (track->artwork);
+	    track->artwork = itdb_artwork_duplicate (artwork);
+	}
+    }
+    /* Now go through all the tracks and add artwork where an
+     * mhii_link is available */
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	g_return_val_if_fail (track, -1);
+	if (track->mhii_link)
+	{
+	    Itdb_Artwork *artwork;
+	    artwork = g_hash_table_lookup (mhii_id_hash,
+					   GINT_TO_POINTER (track->mhii_link));
+	    if (artwork)
+	    {
+		g_return_val_if_fail (track->artwork, -1);
+		if (track->artwork->id != track->mhii_link)
+		{
+		    itdb_artwork_free (track->artwork);
+		    track->artwork = itdb_artwork_duplicate (artwork);
+		}
+		else
+		{
+		    /* same artwork -- don't copy again */
+		}
+	    }
+	    else
+	    {
+		/* The user can't do much here, so let's not worry them with
+		 * this warning...
+		gchar *strval = g_strdup_printf("%" G_GINT64_FORMAT, track->dbid);
+		g_print (_("Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"), track->mhii_link, strval);
+		g_free (strval);
+		 */
+
+		/* couldn't find artwork -- make sure track data is in
+		   a consistent state. */
+		itdb_track_remove_thumbnails (track);
+	    }
+	}
+    }
+    g_hash_table_destroy (mhii_id_hash);
+    /* The actual ItdbArtwork data was freed through the GHashTable
+       value_destroy_func */
+    g_list_free (*ctx->artwork);
+    ctx->artwork = NULL;
+
+    return 0;
+}
+	
+
+
 /* Database Object */
 static int
 parse_mhfd (DBParseContext *ctx, GError **error)
@@ -491,6 +594,8 @@
 	DBParseContext *mhsd_context;
 	unsigned int cur_pos;
 	gint total_len;
+	gint32 i;
+	GList *artwork_glist = NULL;
 
 	mhfd = db_parse_context_get_m_header (ctx, MhfdHeader, "mhfd");
 	if (mhfd == NULL) {
@@ -503,38 +608,35 @@
 	dump_mhfd (mhfd);
 	cur_pos = ctx->header_len;
 
-	/* The mhfd record always has 3 mhsd children, so it's hardcoded here.
-	 * It could be replaced with a loop using the nb_children field from
-	 * the mhfd record. [explanation by Christophe]
-	 */
-	mhsd_context = db_parse_context_get_sub_context (ctx, cur_pos);
-	if (mhsd_context == NULL) {
-		return -1;
+	if (ctx->db->db_type == DB_TYPE_ITUNES)
+	{   /* we need to collect all artwork in this GList for
+	       iTunesDB (see below) */
+	    ctx->artwork = &artwork_glist;
 	}
-	parse_mhsd (mhsd_context, NULL);
-	cur_pos += mhsd_context->total_len;
-	g_free (mhsd_context);
 
-	mhsd_context = db_parse_context_get_sub_context (ctx, cur_pos);
-	if (mhsd_context == NULL) {
+	for (i=0; i<mhfd->num_children; ++i)
+	{
+	    /* so far all mhfd we know have 3 children, but better be
+	       safe than sorry */
+	    mhsd_context = db_parse_context_get_sub_context (ctx, cur_pos);
+	    if (mhsd_context == NULL) {
 		return -1;
+	    }
+	    parse_mhsd (mhsd_context, NULL);
+	    cur_pos += mhsd_context->total_len;
+	    g_free (mhsd_context);
 	}
-	parse_mhsd (mhsd_context, NULL);
-	cur_pos += mhsd_context->total_len;
-	g_free (mhsd_context);
 
-	mhsd_context = db_parse_context_get_sub_context (ctx, cur_pos);
-	if (mhsd_context == NULL) {
-		return -1;
+	if (ctx->db->db_type == DB_TYPE_ITUNES)
+	{
+	    return mhfd_associate_itunesdb_artwork (ctx);
 	}
-	parse_mhsd (mhsd_context, NULL);
-	cur_pos += mhsd_context->total_len;
-	g_free (mhsd_context);
-	
+
 	return 0;
 }
 
 
+
 G_GNUC_INTERNAL char *
 ipod_db_get_artwork_db_path (const char *mount_point)
 {
@@ -575,83 +677,6 @@
 	return filename;
 }
 
-G_GNUC_INTERNAL gboolean
-ipod_supports_cover_art (Itdb_Device *device)
-{
-	const Itdb_ArtworkFormat *formats;
-
-	if (device == NULL) {
-		return FALSE;
-	}
-
-	formats = itdb_device_get_artwork_formats (device);
-	if (formats == NULL) {
-		return FALSE;
-	}
-	
-	while (formats->type != -1)
-	{
-	    switch (formats->type)
-	    {
-	    case ITDB_THUMB_COVER_SMALL:
-	    case ITDB_THUMB_COVER_LARGE:
-		return TRUE;
-	    case ITDB_THUMB_PHOTO_SMALL:
-	    case ITDB_THUMB_PHOTO_LARGE:
-	    case ITDB_THUMB_PHOTO_FULL_SCREEN:
-	    case ITDB_THUMB_PHOTO_TV_SCREEN:
-		break;
-	    case ITDB_THUMB_COVER_XLARGE:
-	    case ITDB_THUMB_COVER_MEDIUM:
-	    case ITDB_THUMB_COVER_SMEDIUM:
-	    case ITDB_THUMB_COVER_XSMALL:
-		break;
-	    }
-	    formats++;
-	}
-
-	return FALSE;
-}
-
-G_GNUC_INTERNAL gboolean
-ipod_supports_photos (Itdb_Device *device)
-{
-	const Itdb_ArtworkFormat *formats;
-
-	if (device == NULL) {
-		return FALSE;
-	}
-
-	formats = itdb_device_get_artwork_formats (device);
-	if (formats == NULL) {
-		return FALSE;
-	}
-	
-	while (formats->type != -1)
-	{
-	    switch (formats->type)
-	    {
-	    case ITDB_THUMB_COVER_SMALL:
-	    case ITDB_THUMB_COVER_LARGE:
-		break;
-	    case ITDB_THUMB_PHOTO_SMALL:
-	    case ITDB_THUMB_PHOTO_LARGE:
-	    case ITDB_THUMB_PHOTO_FULL_SCREEN:
-	    case ITDB_THUMB_PHOTO_TV_SCREEN:
-		return TRUE;
-	    case ITDB_THUMB_COVER_XLARGE:
-	    case ITDB_THUMB_COVER_MEDIUM:
-	    case ITDB_THUMB_COVER_SMEDIUM:
-	    case ITDB_THUMB_COVER_XSMALL:
-		break;
-	    }
-	    formats++;
-	}
-
-	return FALSE;
-}
-
-
 int
 ipod_parse_artwork_db (Itdb_iTunesDB *itdb)
 {
@@ -664,7 +689,7 @@
 
 	g_return_val_if_fail (itdb, -1);
 
-	if (!ipod_supports_cover_art (itdb->device)) {
+	if (!itdb_device_supports_artwork (itdb->device)) {
 		return -1;
 	}
 	ctx = NULL;
@@ -679,17 +704,18 @@
 
 	ctx = db_parse_context_new_from_file (filename, &db);
 	g_free (filename);
+
 	if (ctx == NULL) {
 		goto error;
 	}	
 
 	parse_mhfd (ctx, NULL);
-	db_parse_context_destroy (ctx, TRUE);
+	db_parse_context_destroy (ctx);
 	return 0;
 
  error:
 	if (ctx != NULL) {
-		db_parse_context_destroy (ctx, TRUE);
+		db_parse_context_destroy (ctx);
 	}
 	return -1;
 }
@@ -757,7 +783,7 @@
 		return  -1;
 	}
 	parse_mhfd (ctx, NULL);
-	db_parse_context_destroy (ctx, TRUE);
+	db_parse_context_destroy (ctx);
 
 	/* Now we need to replace references to artwork_ids in the
 	 * photo albums with references to the actual artwork

Modified: libgpod/trunk/src/db-artwork-parser.h
===================================================================
--- libgpod/trunk/src/db-artwork-parser.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-artwork-parser.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -20,7 +20,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
- *  $Id: db-artwork-parser.h 1299 2006-06-04 16:24:45Z jcsjcs $
+ *  $Id: db-artwork-parser.h 2009 2008-06-09 19:53:36Z teuf $
  */
 
 
@@ -37,6 +37,4 @@
 G_GNUC_INTERNAL char *ipod_db_get_photos_db_path (const char *mount_point);
 G_GNUC_INTERNAL int ipod_parse_photo_db (Itdb_PhotoDB *photodb); 
 G_GNUC_INTERNAL int ipod_write_photo_db (Itdb_PhotoDB *db);
-G_GNUC_INTERNAL gboolean ipod_supports_cover_art (Itdb_Device *device);
-G_GNUC_INTERNAL gboolean ipod_supports_photos (Itdb_Device *device);
 #endif

Modified: libgpod/trunk/src/db-artwork-writer.c
===================================================================
--- libgpod/trunk/src/db-artwork-writer.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-artwork-writer.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -24,25 +24,35 @@
 
 #include <config.h>
 #include "itdb.h"
+#include "itdb_device.h"
 #include "itdb_private.h"
 #include "db-artwork-parser.h"
 
 #if HAVE_GDKPIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include "db-artwork-debug.h"
 #include "db-itunes-parser.h"
 #include "db-image-parser.h"
 #include "itdb_endianness.h"
 
+#include <glib/gstdio.h>
+
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <stdio.h>
 #include <sys/types.h>
 
+#ifdef WITH_INTERNAL_GCHECKSUM
+#include "gchecksum.h"
+#endif
+
 #define DEFAULT_GSTRING_SIZE 128*1024
 
 struct iPodSharedDataBuffer {
@@ -63,13 +73,13 @@
 static gboolean
 ipod_gstring_flush (struct iPodSharedDataBuffer *shared, GError **error)
 {
-	gboolean result;
+	gboolean success;
 
-	result = g_file_set_contents (shared->filename, 
-				      shared->data->str, shared->data->len,
-				      error);
-	if (!result) {
-		return FALSE;
+	success = itdb_file_set_contents (shared->filename, 
+	 	 		          shared->data->str, shared->data->len,
+				          error);
+	if (!success) {
+                return FALSE;
 	}
 	g_string_free (shared->data, TRUE);
 	g_free (shared->filename);
@@ -219,32 +229,32 @@
 static int
 write_mhod_type_1 (gchar *string, iPodBuffer *buffer)
 {
-	MhodHeaderArtworkType1 *mhod;
+	ArtworkDB_MhodHeaderString *mhod;
 	unsigned int total_bytes;
 	int len;
 	int padding;
 
 	g_assert (string != NULL);
 
-	mhod = (MhodHeaderArtworkType1 *)init_header (buffer, "mhod",
-						      sizeof (MhodHeaderArtworkType1));
+	total_bytes = sizeof (ArtworkDB_MhodHeaderString);
+	mhod = (ArtworkDB_MhodHeaderString *)init_header (buffer, "mhod",
+                                                          total_bytes);
 	if (mhod == NULL) {
 		return -1;
 	}
-	total_bytes = sizeof (MhodHeaderArtworkType1);
 	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
 	/* Modify header length, since iTunes only puts the length of
 	 * MhodHeader in header_len
 	 */
 	mhod->header_len = get_gint32 (sizeof (ArtworkDB_MhodHeader), buffer->byte_order);
-	mhod->unknown3 = get_gint32 (0x01, buffer->byte_order);
+	mhod->encoding = get_gint32 (0x01, buffer->byte_order);
 	len = strlen (string);
 	mhod->string_len = get_gint32 (len, buffer->byte_order);
 
 	padding = 4 - ( (total_bytes + len) % 4 );
 	if (padding == 4)
 	    padding = 0;
-	mhod->padding = padding;
+	mhod->padding_len = padding;
 	mhod->type = get_gint16 (0x01, buffer->byte_order);
 
 	/* Make sure we have enough free space to write the string */
@@ -257,7 +267,7 @@
 	total_bytes += len + padding;
 	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
 
-	dump_mhod_type_1 (mhod);
+	dump_mhod_string (mhod);
 
 	return total_bytes;
 }
@@ -265,7 +275,7 @@
 static int
 write_mhod_type_3 (gchar *string, iPodBuffer *buffer)
 {
-	ArtworkDB_MhodHeaderArtworkType3 *mhod;
+	ArtworkDB_MhodHeaderString *mhod;
 	unsigned int total_bytes;
 	glong len;
 	const gint g2l = sizeof (gunichar2);
@@ -274,13 +284,12 @@
 
 	g_assert (string != NULL);
 
-	mhod = (ArtworkDB_MhodHeaderArtworkType3 *)
-	    init_header (buffer, "mhod",
-			 sizeof (ArtworkDB_MhodHeaderArtworkType3));
+	total_bytes = sizeof (ArtworkDB_MhodHeaderString);
+	mhod = (ArtworkDB_MhodHeaderString *) init_header (buffer, "mhod", 
+                                                           total_bytes);
 	if (mhod == NULL) {
 		return -1;
 	}
-	total_bytes = sizeof (ArtworkDB_MhodHeaderArtworkType3);
 	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
 	/* Modify header length, since iTunes only puts the length of
 	 * MhodHeader in header_len
@@ -301,13 +310,15 @@
 		return -1;
 	    }
 
-	    mhod->mhod_version = 2;
+	    mhod->encoding = 2; /* 8 bit field, no need to byteswap */
+
 	    /* number of bytes of the string encoded in UTF-16 */
 	    mhod->string_len = get_gint32 (g2l * len, buffer->byte_order);
 	    padding = 4 - ( (total_bytes + g2l*len) % 4 );
 	    if (padding == 4)
 		padding = 0;
-	    mhod->padding = padding;
+	    mhod->padding_len = padding; /* 8 bit field, no need to byteswap */
+
  	    total_bytes += g2l*len + padding;
 
 	    /* Make sure we have enough free space to write the string */
@@ -322,9 +333,10 @@
 		strp[i] = get_gint16 (utf16[i], buffer->byte_order);
 	    }
 	    g_free (utf16);
+	    memset (mhod->string + g2l*len, 0, padding);
 	    break;
 	case G_BIG_ENDIAN:
-	    mhod->mhod_version = 1;
+	    mhod->encoding = 1; /* 8 bit field, no need to byteswap */
             /* FIXME: len isn't initialized */
 	    mhod->string_len = get_gint32 (len, buffer->byte_order);
 	    /* pad string if necessary */
@@ -333,7 +345,8 @@
 	    padding = 4 - ( (total_bytes + len) % 4 );
 	    if (padding == 4)
 		padding = 0;
-	    mhod->padding = padding;
+	    mhod->padding_len = padding; /* 8 bit field, no need to byteswap */
+
 	    /* Make sure we have enough free space to write the string */
 	    ipod_buffer_maybe_grow (buffer, len+padding);
 	    mhod = ipod_buffer_get_pointer (buffer);
@@ -341,24 +354,26 @@
 		    return -1;
 	    }
 	    memcpy (mhod->string, string, len);
+	    memset (mhod->string + len, 0, padding);
 	    total_bytes += (len+padding);
 	}
 	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
 
-	dump_mhod_type_3 (mhod);
+	dump_mhod_string (mhod);
 
 	return total_bytes;
 }
 
 static int
-write_mhni (Itdb_DB *db, Itdb_Thumb *thumb, int correlation_id, iPodBuffer *buffer)
+write_mhni (Itdb_DB *db, Itdb_Thumb_Ipod_Item *item, iPodBuffer *buffer)
 {
 	MhniHeader *mhni;
 	unsigned int total_bytes;
 	int bytes_written;
 	iPodBuffer *sub_buffer;
+        const Itdb_ArtworkFormat *format;
 
-	if (thumb == NULL) {
+	if (item == NULL) {
 		return -1;
 	}
 
@@ -371,26 +386,22 @@
 					   buffer->byte_order);
 	mhni->total_len =      get_gint32 (total_bytes,
 					   buffer->byte_order);
-	mhni->correlation_id = get_gint32 (correlation_id,
-					   buffer->byte_order);
-	mhni->image_width =    get_gint16 (thumb->width,
-					   buffer->byte_order);
-	mhni->image_height =   get_gint16 (thumb->height,
-					   buffer->byte_order);
-	mhni->image_size =     get_gint32 (thumb->size,
-					   buffer->byte_order);
-	mhni->ithmb_offset =   get_gint32 (thumb->offset,
-					   buffer->byte_order);
-	mhni->vertical_padding = get_gint16 (thumb->vertical_padding,
+        format = item->format;
+	mhni->format_id = get_gint32 (format->format_id, buffer->byte_order);
+	mhni->image_width =    get_gint16 (item->width, buffer->byte_order);
+	mhni->image_height =   get_gint16 (item->height, buffer->byte_order);
+	mhni->image_size =     get_gint32 (item->size, buffer->byte_order);
+	mhni->ithmb_offset =   get_gint32 (item->offset, buffer->byte_order);
+	mhni->vertical_padding = get_gint16 (item->vertical_padding,
 					     buffer->byte_order);
-	mhni->horizontal_padding = get_gint16 (thumb->horizontal_padding,
+	mhni->horizontal_padding = get_gint16 (item->horizontal_padding,
 					       buffer->byte_order);
 
 	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
 	if (sub_buffer == NULL) {
 		return  -1;
 	}
-	bytes_written = write_mhod_type_3 (thumb->filename, sub_buffer);
+	bytes_written = write_mhod_type_3 (item->filename, sub_buffer);
 	ipod_buffer_destroy (sub_buffer);
 	if (bytes_written == -1) {
 		return -1;
@@ -409,7 +420,7 @@
 }
 
 static int
-write_mhod (Itdb_DB *db, Itdb_Thumb *thumb, int correlation_id, iPodBuffer *buffer)
+write_mhod (Itdb_DB *db, Itdb_Thumb_Ipod_Item *thumb, iPodBuffer *buffer)
 {
 	ArtworkDB_MhodHeader *mhod;
 	unsigned int total_bytes;
@@ -433,7 +444,7 @@
 	if (sub_buffer == NULL) {
 		return -1;
 	}
-	bytes_written = write_mhni (db, thumb, correlation_id, sub_buffer);
+	bytes_written = write_mhni (db, thumb, sub_buffer);
 	ipod_buffer_destroy (sub_buffer);
 	if (bytes_written == -1) {
 		return -1;
@@ -454,7 +465,7 @@
 	unsigned int total_bytes;
 	int bytes_written;
 	int num_children;
-	GList *it = NULL;
+	const GList *it = NULL;
 	Itdb_Track *song;
 	Itdb_Artwork *artwork;
 	guint64 mactime;
@@ -492,16 +503,20 @@
 
 	mhii->orig_img_size = get_gint32 (artwork->artwork_size, buffer->byte_order);
 	num_children = 0;
-	for (it=artwork->thumbnails; it!=NULL; it=it->next)
+        /* Before trying to write the artwork or photo database, the ithmb
+         * files have been written, which will have converted all thumbnails 
+         * attached to the tracks to ITDB_THUMB_TYPE_IPOD thumbnails.
+         */
+        g_assert (artwork->thumbnail->data_type == ITDB_THUMB_TYPE_IPOD);
+	for (it=itdb_thumb_ipod_get_thumbs ((Itdb_Thumb_Ipod *)artwork->thumbnail); 
+             it!=NULL; 
+             it=it->next)
 	{
 		iPodBuffer *sub_buffer;
-		Itdb_Thumb *thumb;
-		const Itdb_ArtworkFormat *img_info;
+		Itdb_Thumb_Ipod_Item *thumb;
 
-		thumb = (Itdb_Thumb *)it->data;
-		img_info = itdb_get_artwork_info_from_type (
-		    db_get_device(db), thumb->type);
-		if (img_info == NULL) {
+                thumb = (Itdb_Thumb_Ipod_Item *)it->data;
+                if (thumb->format == NULL) {
 		    /* skip this thumb */
 		    continue;
 		}
@@ -513,8 +528,7 @@
 		if (sub_buffer == NULL) {
 			return -1;
 		}
-		bytes_written = write_mhod (db, thumb, img_info->correlation_id,
-					    sub_buffer);
+		bytes_written = write_mhod (db, thumb, sub_buffer);
 		ipod_buffer_destroy (sub_buffer);
 		if (bytes_written == -1) {
 			return -1;
@@ -563,7 +577,7 @@
 		iPodBuffer *sub_buffer;
 		if (buffer->db_type == DB_TYPE_ITUNES) {
 			song = (Itdb_Track*)it->data;
-			if (!song->artwork || (song->artwork->id == 0)) {
+			if (!song->artwork->thumbnail || (song->artwork->dbid == 0)) {
 				it = it->next;
 				continue;
 			}
@@ -731,8 +745,8 @@
 	}
 	mhif->total_len = mhif->header_len;
 
-	mhif->correlation_id = get_gint32 (img_info->correlation_id,
-					   buffer->byte_order);
+	mhif->format_id = get_gint32 (img_info->format_id,
+		               	      buffer->byte_order);
 	mhif->image_size = get_gint32 (img_info->height * img_info->width * 2,
 				       buffer->byte_order);
 
@@ -741,34 +755,14 @@
 	return get_gint32 (mhif->header_len, buffer->byte_order);
 }
 
-G_GNUC_INTERNAL gboolean
-itdb_thumb_type_is_valid_for_db (const ItdbThumbType thumb_type, DbType db_type)
-{
-        switch (thumb_type) {
-        case ITDB_THUMB_COVER_SMALL:
-        case ITDB_THUMB_COVER_LARGE:
-        case ITDB_THUMB_COVER_XLARGE:
-        case ITDB_THUMB_COVER_MEDIUM:
-        case ITDB_THUMB_COVER_SMEDIUM:
-        case ITDB_THUMB_COVER_XSMALL:
-	    return (db_type == DB_TYPE_ITUNES);
-        case ITDB_THUMB_PHOTO_SMALL:
-        case ITDB_THUMB_PHOTO_LARGE:
-        case ITDB_THUMB_PHOTO_FULL_SCREEN:
-        case ITDB_THUMB_PHOTO_TV_SCREEN:
-	    return (db_type == DB_TYPE_PHOTO);
-        }
-
-        g_return_val_if_reached (FALSE);
-}
-
 static int
 write_mhlf (Itdb_DB *db, iPodBuffer *buffer)
 {
 	MhlfHeader *mhlf;
 	unsigned int total_bytes;
 	int bytes_written;
-        const Itdb_ArtworkFormat *formats; 
+        GList *formats; 
+        GList *it;
         unsigned int num_children;
 
 	mhlf = (MhlfHeader *)init_header (buffer, "mhlf", sizeof (MhlfHeader));
@@ -780,23 +774,31 @@
         num_children = 0;
         mhlf->num_files = get_gint32 (num_children, buffer->byte_order);
 
-        formats = itdb_device_get_artwork_formats (db_get_device(db));
+        formats = NULL;
+        switch (buffer->db_type) {
+        case DB_TYPE_ITUNES:
+            formats = itdb_device_get_cover_art_formats(db_get_device(db));
+            break;
+	case DB_TYPE_PHOTO:
+            formats = itdb_device_get_photo_formats(db_get_device(db));
+            break;
+        }
         if (formats == NULL) {
                 return total_bytes;
         }
 
-        while (formats->type != -1) {
+        for (it = formats; it != NULL; it = it->next) {
+                const Itdb_ArtworkFormat *format;
 	        iPodBuffer *sub_buffer;
-                if (!itdb_thumb_type_is_valid_for_db (formats->type, buffer->db_type)) {
-                        formats++;
-                        continue;
-                }
+                
+                format = (const Itdb_ArtworkFormat *)it->data;
         	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
         	if (sub_buffer == NULL) {
+                        g_list_free (formats);
         		return -1;
         	}
 
-        	bytes_written = write_mhif (db, sub_buffer, formats);
+        	bytes_written = write_mhif (db, sub_buffer, format);
 	        			    
         	ipod_buffer_destroy (sub_buffer);
         	if (bytes_written == -1) {
@@ -810,9 +812,9 @@
                  * to get something somewhat consistent when there are errors
         	 */
         	mhlf->num_files = get_gint32 (num_children, buffer->byte_order);
-                formats++;
         }
 	dump_mhl ((MhlHeader *)mhlf, "mhlf");
+        g_list_free (formats);
 
 	return total_bytes;
 }
@@ -914,96 +916,234 @@
 	return total_bytes;
 }
 
-static unsigned int
+/* renumber the artwork IDs for all tracks containing artwork and with
+   an ID of != 0 */
+/* if the iPod does not support sparse artwork, renumber consecutively
+   and all artwork */
+/* returns the highest assigned ID or 0 if no IDs were used */
+static guint32
 ipod_artwork_db_set_ids (Itdb_iTunesDB *db)
 {
-	GList *it;
-	unsigned int max_id;
+    GList *gl;
+    const guint32 min_id = 0x64;
+    guint32 cur_id;
 
-	max_id = 0;
-	for (it = db->tracks; it != NULL; it = it->next) {
-		Itdb_Track *song;
+    cur_id = min_id;
 
-		song = (Itdb_Track *)it->data;
-		if (max_id <= song->id) {
-		  max_id = song->id;
+    if (itdb_device_supports_sparse_artwork (db->device))
+    {
+	GHashTable *id_hash;
+
+	id_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+	for (gl = db->tracks; gl != NULL; gl = gl->next)
+	{
+	    Itdb_Track *song;
+	    Itdb_Artwork *artwork;
+
+	    song = gl->data;
+	    g_return_val_if_fail (song, -1);
+
+	    artwork = song->artwork;
+	    g_return_val_if_fail (artwork, -1);
+
+	    if (itdb_track_has_thumbnails (song) && (artwork->id != 0))
+	    {
+		gpointer orig_key;
+		gpointer orig_val;
+
+		if (g_hash_table_lookup_extended (id_hash, GINT_TO_POINTER (artwork->id),
+						  &orig_key, &orig_val))
+		{   /* ID was encountered before */
+		    artwork->id = GPOINTER_TO_INT (orig_val);
+		    artwork->dbid = 0;
 		}
-		if (song->artwork->thumbnails != NULL) {
-			song->artwork->id = song->id;
+		else
+		{   /* first time we see this ID */
+		    g_hash_table_insert (id_hash, GINT_TO_POINTER (artwork->id),
+					 GINT_TO_POINTER (cur_id));
+		    artwork->id = cur_id++;
+		    artwork->dbid = song->dbid;
 		}
+		song->mhii_link = artwork->id;
+	    }
+	    else
+	    {
+		song->mhii_link = 0;
+	    }
 	}
+	g_hash_table_destroy (id_hash);
+    }
+    else 
+    {   /* iPod does not support sparse artwork -- just renumber */
+	for (gl = db->tracks; gl != NULL; gl = gl->next)
+	{
+	    Itdb_Track *song;
 
-	return max_id;
+	    song = gl->data;
+	    g_return_val_if_fail (song, -1);
+	    g_return_val_if_fail (song->artwork, -1);
+
+	    song->mhii_link = 0;
+
+	    if (itdb_track_has_thumbnails (song))
+	    {
+		song->artwork->id = cur_id++;
+		song->artwork->dbid = song->dbid;
+	    }
+	    song->mhii_link = song->artwork->id;
+	}
+    }	
+
+    if (cur_id == min_id)
+	return 0;
+    else
+	return cur_id-1;
 }
 
 
-static void
-itdb_track_filter_thumbnails (Itdb_iTunesDB *itdb, Itdb_Track *track)
+
+/* for all tracks with new artwork (id == 0) do the following:
+   - try to identify if this artwork is identical to previous artwork
+     (within the same album)
+   - if no: assign new ID
+   - if yes: assign same ID
+
+   Returns the highest ID used.
+*/
+static guint32
+ipod_artwork_mark_new_doubles (Itdb_iTunesDB *itdb, guint max_id)
 {
-    const Itdb_ArtworkFormat *formats;
-    const Itdb_ArtworkFormat *format;
-    GList *it;
-    GList *supported_thumbs;
+    GList *gl;
+    GHashTable *hash_file, *hash_memory, *hash_pixbuf;
 
-    if (track->artwork == NULL) {
-        return;
-    }
+    hash_file =   g_hash_table_new_full (g_str_hash, g_str_equal,
+					 g_free, NULL);
+    hash_memory = g_hash_table_new_full (g_str_hash, g_str_equal,
+					 g_free, NULL);
+    hash_pixbuf = g_hash_table_new_full (g_str_hash, g_str_equal,
+					 g_free, NULL);
 
-    if (track->artwork->thumbnails == NULL) {
-        return;
-    }
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Artwork *artwork;
+	Itdb_Track *track;
 
-    if (itdb->device == NULL) {
-        itdb_artwork_free (track->artwork);
-        track->artwork = NULL;
-        return;
-    }
+	track= gl->data;
+	g_return_val_if_fail (track, max_id);
+	artwork = track->artwork;
+	g_return_val_if_fail (artwork, max_id);
 
-    formats = itdb_device_get_artwork_formats (itdb->device);
-    if (formats == NULL) {
-        itdb_artwork_free (track->artwork);
-        track->artwork = NULL;
-        return;
-    }
+	if ((artwork->id == 0) && itdb_track_has_thumbnails (track))
+	{
+	    const gchar *checkstring;
+	    GHashTable *hash=NULL;
+	    gpointer orig_val = NULL;
+	    Itdb_Thumb *thumb = artwork->thumbnail;
+	    GChecksum *checksum = g_checksum_new (G_CHECKSUM_SHA1);
 
-    supported_thumbs = NULL;
-    for (format = formats; format->type != -1; format++) {
-        for (it = track->artwork->thumbnails; it != NULL; it = it->next) {
-            Itdb_Thumb *thumb = (Itdb_Thumb *)it->data;
+	    /* use the album name as part of the checksum */
+	    if (track->album && *track->album)
+	    {
+		g_checksum_update (checksum,
+				   (guchar *)track->album, strlen (track->album));
+	    }
 
-            if (thumb->type == format->type) {
-                supported_thumbs = g_list_prepend (supported_thumbs, it->data);
-                /* Remove element from the original list, there will
-                 * be less work next time we iterate over the thumbnails
-                 */
-                track->artwork->thumbnails = g_list_remove_link (track->artwork->thumbnails, it);
-                break;
-            }
-        }
+	    switch (thumb->data_type)
+	    {
+	    case ITDB_THUMB_TYPE_MEMORY:
+	    {
+		Itdb_Thumb_Memory *mthumb = (Itdb_Thumb_Memory *)thumb;
+		g_checksum_update (checksum,
+				   mthumb->image_data, mthumb->image_data_len);
+		hash = hash_memory;
+		break;
+	    }
+	    case ITDB_THUMB_TYPE_PIXBUF:
+	    {
+		Itdb_Thumb_Pixbuf *pthumb = (Itdb_Thumb_Pixbuf *)thumb;
+		g_return_val_if_fail (pthumb->pixbuf, max_id);
+		g_checksum_update (checksum,
+				   gdk_pixbuf_get_pixels (pthumb->pixbuf),
+				   gdk_pixbuf_get_height (pthumb->pixbuf) * gdk_pixbuf_get_rowstride (pthumb->pixbuf));
+		hash = hash_pixbuf;
+		break;
+	    }
+	    case ITDB_THUMB_TYPE_FILE:
+	    {
+		Itdb_Thumb_File *fthumb = (Itdb_Thumb_File *)thumb;
+		g_return_val_if_fail (fthumb->filename, max_id);
+		g_checksum_update (checksum,
+				   (guchar *)fthumb->filename,
+				   strlen (fthumb->filename));
+		hash = hash_file;
+		break;
+	    }
+	    case ITDB_THUMB_TYPE_INVALID:
+		/* programming error */
+		g_print ("encountered invalid thumb.\n");
+		g_return_val_if_reached (max_id);
+		break;
+	    case ITDB_THUMB_TYPE_IPOD:
+		/* thumbs on the iPod are definitely not expected to
+		   have an ID of 0 */
+		g_print ("encountered iPod thumb with ID = 0.\n");
+		g_return_val_if_reached (max_id);
+		break;
+	    }
+
+	    checkstring = g_checksum_get_string (checksum);
+	    if (g_hash_table_lookup_extended (hash, checkstring, NULL, &orig_val))
+	    {   /* same artwork was used before */
+		Itdb_Artwork *previous_artwork = orig_val;
+		artwork->id = previous_artwork->id;
+		artwork->dbid = 0;
+	    }
+	    else
+	    {   /* first occurence of this artwork */
+		artwork->id = ++max_id;
+		artwork->dbid = track->dbid;
+		g_hash_table_insert (hash, g_strdup (checkstring), artwork);
+	    }
+	    track->mhii_link = artwork->id;
+	    g_checksum_free (checksum);
+	}
     }
 
-    if (supported_thumbs == NULL) {
-        itdb_artwork_free (track->artwork);
-        track->artwork = NULL;
-        return;
-    }
-    g_list_free (track->artwork->thumbnails);
-    track->artwork->thumbnails = supported_thumbs;
+    g_hash_table_destroy (hash_memory);
+    g_hash_table_destroy (hash_file);
+    g_hash_table_destroy (hash_pixbuf);
+
+    return max_id;
 }
 
-static void
-itdb_filter_thumbnails (Itdb_iTunesDB *itdb)
+
+/* returns the highest ID used */
+static guint32 itdb_prepare_thumbnails (Itdb_iTunesDB *itdb)
 {
-    GList *it;
+    gint max_id;
 
-    for (it = itdb->tracks; it != NULL; it = it->next) {
-        itdb_track_filter_thumbnails (itdb, (Itdb_Track *)it->data);
+    /* first renumber the old thumbnails to make sure we don't get too
+     * high */
+    max_id = ipod_artwork_db_set_ids (itdb);
+
+    if (itdb_device_supports_sparse_artwork (itdb->device))
+    {
+	/* go through all newly added artwork and pass out new IDs. the
+	   same ID will be assigned to identical artwork within one album */
+	max_id = ipod_artwork_mark_new_doubles (itdb, max_id);
+
+	/* set the IDs again to make sure they are in the right order */
+	max_id = ipod_artwork_db_set_ids (itdb);
     }
+
+    return max_id;
 }
 
 
 
-int
+
+G_GNUC_INTERNAL int
 ipod_write_artwork_db (Itdb_iTunesDB *itdb)
 {
 	iPodBuffer *buf;
@@ -1011,19 +1151,20 @@
 	char *filename;
 	int id_max;
 	Itdb_DB db;
+	int status;
 
 	db.db_type = DB_TYPE_ITUNES;
 	db.db.itdb = itdb;
 
+	id_max = itdb_prepare_thumbnails (itdb);
 
-        itdb_filter_thumbnails (itdb);
-
 	/* First, let's write the .ithmb files, this will create the
 	 * various thumbnails as well */
 
-	itdb_write_ithumb_files (&db);
-	/* Now we can update the ArtworkDB file */
-	id_max = ipod_artwork_db_set_ids (itdb);
+	status = itdb_write_ithumb_files (&db);
+	if (status != 0) {
+		return -1;
+	}
 
 	filename = ipod_db_get_artwork_db_path (itdb_get_mountpoint (itdb));
 	if (filename == NULL) {
@@ -1063,13 +1204,17 @@
 	char *filename;
 	int id_max;
 	Itdb_DB db;
+	int status;
 
 	db.db_type = DB_TYPE_PHOTO;
 	db.db.photodb = photodb;
 
 	filename = ipod_db_get_photos_db_path (db_get_mountpoint (&db));
 
-	itdb_write_ithumb_files (&db);
+	status = itdb_write_ithumb_files (&db);
+	if (status != 0) {
+		return -1;
+	}
 
 	if (filename == NULL) {
 		return -1;
@@ -1080,8 +1225,8 @@
 		g_free (filename);
 		return -1;
 	}
-	id_max = itdb_get_free_photo_id( photodb );
-	bytes_written = write_mhfd (&db, buf, id_max);
+	id_max = itdb_get_max_photo_id( photodb );
+	bytes_written = write_mhfd (&db, buf, id_max+1);
 
 	/* Refcount of the shared buffer should drop to 0 and this should
 	 * sync buffered data to disk
@@ -1097,7 +1242,7 @@
 	return 0;
 }
 #else
-int
+G_GNUC_INTERNAL int
 ipod_write_artwork_db (Itdb_iTunesDB *itdb)
 {
     return -1;

Modified: libgpod/trunk/src/db-image-parser.c
===================================================================
--- libgpod/trunk/src/db-image-parser.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-image-parser.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -35,66 +35,65 @@
 #include "db-image-parser.h"
 #include <glib/gi18n-lib.h>
 
-static int
-image_type_from_corr_id (Itdb_Device *device, gint16 corr_id)
+static const Itdb_ArtworkFormat *
+find_format (GList *formats, gint16 format_id)
 {
-	const Itdb_ArtworkFormat *formats;
+        GList *it;
 
-	if (device == NULL) {
-		return -1;
-	}
+        for (it = formats; it != NULL; it = it->next) {
+                const Itdb_ArtworkFormat *format;
+                format = (const Itdb_ArtworkFormat *)it->data;
+                if (format->format_id == format_id) {
+                        return format;
+                }
+        }
 
-	formats = itdb_device_get_artwork_formats (device);
-
-	if (formats == NULL) {
-		return -1;
-	}
-	
-	while (formats->type != -1) {
-		if (formats->correlation_id == corr_id) {
-			return formats->type;
-		}
-		formats++;
-	}
-
-	return -1;
+        return NULL;
 }
 
-
-G_GNUC_INTERNAL const Itdb_ArtworkFormat *
-itdb_get_artwork_info_from_type (Itdb_Device *device,
-				 ItdbThumbType image_type)
+static const Itdb_ArtworkFormat * 
+image_format_from_id (Itdb_Device *device, gint16 format_id)
 {
-	const Itdb_ArtworkFormat *formats;
-	
+        GList *formats;
+        const Itdb_ArtworkFormat *format;
+
 	if (device == NULL) {
 		return NULL;
 	}
 
-	formats = itdb_device_get_artwork_formats (device);
-	if (formats == NULL) {
-		return NULL;
-	}
-	
-	while ((formats->type != -1) && (formats->type != image_type)) {
-		formats++;
-	}
+	formats = itdb_device_get_cover_art_formats (device);
+        format = find_format (formats, format_id);
+        g_list_free (formats);
+        if (format != NULL) {
+                return format;
+        }
 
-	if (formats->type == -1) {
-		return NULL;
-	}
-
-	return formats;
+	formats = itdb_device_get_photo_formats (device);
+        format = find_format (formats, format_id);
+        g_list_free (formats);
+	return format;
 }
 
-G_GNUC_INTERNAL Itdb_Thumb *
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *
 ipod_image_new_from_mhni (MhniHeader *mhni, Itdb_DB *db)
 {
-	Itdb_Thumb *img;
-	gint16 corr_id;
+	Itdb_Thumb_Ipod_Item *img;
+        const Itdb_ArtworkFormat *format;
+	gint16 format_id;
 	Itdb_Device *device = NULL;
 
-	img = g_new0 (Itdb_Thumb, 1);
+	device = db_get_device (db);
+	g_return_val_if_fail (device, NULL);
+
+	format_id = get_gint32_db (db, mhni->format_id);
+        format = image_format_from_id (device, format_id);
+        if (format == NULL) {
+            g_warning (_("Unexpected image type in mhni: %d, offset: %d\n"), 
+                       format_id, get_guint32_db (db, mhni->ithmb_offset));
+            return NULL;
+        }
+
+        img = itdb_thumb_new_item_from_ipod (format);
 	if (img == NULL) {
 		return NULL;
 	}
@@ -107,25 +106,10 @@
 	img->vertical_padding =
 	    get_gint16_db (db, mhni->vertical_padding);
 
-	device = db_get_device (db);
-	g_return_val_if_fail (device, NULL);
-
-	corr_id = get_gint32_db (db, mhni->correlation_id);
-	img->type = image_type_from_corr_id (device, corr_id);
-
 #if DEBUG_ARTWORK
-	printf ("corr_id: %d, of: %6d sz: %6d, x: %3d, y: %3d, xpad: %3d, ypad: %3d\n",
-		corr_id, img->offset, img->size, img->width, img->height, img->horizontal_padding, img->vertical_padding);
+	printf ("format_id: %d, of: %6d sz: %6d, x: %3d, y: %3d, xpad: %3d, ypad: %3d\n",
+		format_id, img->offset, img->size, img->width, img->height, img->horizontal_padding, img->vertical_padding);
 #endif
 
-	if (img->type == -1)
-	{
-	    g_warning (_("Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"), 
-		       img->width, img->height, 
-		       corr_id, img->offset);
-	    g_free (img);
-	    return NULL;
-	}
-
 	return img;
 }

Modified: libgpod/trunk/src/db-image-parser.h
===================================================================
--- libgpod/trunk/src/db-image-parser.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-image-parser.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -20,7 +20,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
- *  $Id: db-image-parser.h 1753 2007-11-04 00:48:12Z jcsjcs $
+ *  $Id: db-image-parser.h 2010 2008-06-09 19:57:02Z teuf $
  */
 
 #ifndef IMAGE_PARSER_H
@@ -29,6 +29,7 @@
 #include "db-itunes-parser.h"
 #include "itdb_device.h"
 #include "itdb_private.h"
+#include "itdb_thumb.h"
 #include "itdb.h"
 
 #define DEBUG_ARTWORK 0
@@ -77,16 +78,8 @@
 #define BLUE_SHIFT_888 0
 #define BLUE_MASK_888 (((1 << BLUE_BITS_888)-1) << BLUE_SHIFT_888)
 
-G_GNUC_INTERNAL Itdb_Thumb *ipod_image_new_from_mhni (MhniHeader *mhni, 
-						      Itdb_DB *db);
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *ipod_image_new_from_mhni (MhniHeader *mhni, 
+			        			   Itdb_DB *db);
 
 G_GNUC_INTERNAL int itdb_write_ithumb_files (Itdb_DB *db);
-
-G_GNUC_INTERNAL gboolean
-itdb_thumb_type_is_valid_for_db (const ItdbThumbType thumb_type, DbType db_type);
-
-G_GNUC_INTERNAL
-const Itdb_ArtworkFormat *itdb_get_artwork_info_from_type (
-    Itdb_Device *ipod, ItdbThumbType image_type);
-
 #endif

Modified: libgpod/trunk/src/db-itunes-parser.h
===================================================================
--- libgpod/trunk/src/db-itunes-parser.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-itunes-parser.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -20,7 +20,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
- * $Id: db-itunes-parser.h 1729 2007-10-21 10:52:46Z teuf $
+ * $Id: db-itunes-parser.h 2040 2008-07-06 14:04:33Z teuf $
  */
 
 
@@ -28,10 +28,7 @@
 #define DB_PARSER_H
 
 #include <glib.h>
-/*#include "ipod-db-parser.h"*/
 
-#define ITUNESDB_MAX_SIZE 10 * 1024 * 1024
-
 struct _MHeader {
 	unsigned char header_id[4];
 	gint32 header_len;
@@ -71,10 +68,8 @@
 
 typedef struct _MhitHeader471 MhitHeader471;
 /* MHOD typedef mess */
-typedef struct _ArtworkDB_MhodHeaderArtworkType3 ArtworkDB_MhodHeaderArtworkType3;
+typedef struct _ArtworkDB_MhodHeaderString ArtworkDB_MhodHeaderString;
 typedef struct _MhodHeaderString MhodHeaderString;
-typedef struct _MhodHeaderArtworkType1 MhodHeaderArtworkType1;
-/* typedef struct _MhodHeaderArtworkType3 MhodHeaderArtworkType3; */
 typedef struct _MhodHeaderSmartPlaylistData MhodHeaderSmartPlaylistData;
 typedef struct _MhodHeaderSmartPlaylistRuleString MhodHeaderSmartPlaylistRuleString; 
 typedef struct _MhodHeaderSmartPlaylistRuleNonString MhodHeaderSmartPlaylistRuleNonString;
@@ -158,7 +153,7 @@
 	gint32 header_len;
 	gint32 total_len;
 	gint32 unknown1;
-	gint32 correlation_id;
+	gint32 format_id;
 	gint32 unknown2;
 	gint32 track_id;
 	gint32 timestamp;
@@ -362,57 +357,23 @@
 	MHOD_ARTWORK_TYPE_IMAGE      = 5  /* container: full resolution image (in the Photo Database) */
 };
 
-struct _MhodHeaderArtworkType1 {
+struct _ArtworkDB_MhodHeaderString {
 	unsigned char header_id[4];
 	gint32 header_len;
 	gint32 total_len;
-	gint16 type; 
-	gint8 unknown;
-	gint8 padding;
-	gint32 unknown1;
-	gint32 unknown2;
-	gint32 string_len;
-	gint32 unknown3; /* might be the string encoding */
-	gint32 unknown4; /* always zero? */
-	unsigned char string[];
-};
-
-#if 0
-/* not used at all */
-struct _MhodHeaderArtworkType3 {
-	unsigned char header_id[4];
-	gint32 header_len;
-	gint32 total_len;
-	gint16 type; /* 3 */
-	gint16 padding; /* high byte is padding length (0-3) */
-	gint32 unknown1;
-	gint32 unknown2;
-	gint32 string_len;
-	gint32 mhod_version;
-	gint32 unknown4;
-	gunichar2 string[];
-};
-#endif
-
-struct _ArtworkDB_MhodHeaderArtworkType3 {
-	unsigned char header_id[4];
-	gint32 header_len;
-	gint32 total_len;
-        gint16 type; /* 3 */
+        gint16 type;
         gint8  unknown13;
-	gint8  padding;
+	gint8  padding_len;
 	gint32 unknown1;
 	gint32 unknown2;
 	gint32 string_len;
-	gint8 mhod_version; /* 0,1: string is UTF8, 2: string is
-			       UTF16-LE */
+	gint8 encoding; /* 0,1: string is UTF8, 2: string is UTF16-LE */
         gint8 unknown5;
         gint16 unknown6;
 	gint32 unknown4;
         gchar  string[];
 };
 
-
 enum MhodLimitType {
 	MHOD_LIMIT_MINUTES = 1,
 	MHOD_LIMIT_MEGABYTES = 2,
@@ -598,7 +559,7 @@
 	gint32 header_len;
 	gint32 total_len;
 	gint32 num_children;
-	gint32 correlation_id;
+	gint32 format_id;
 	gint32 ithmb_offset;
 	gint32 image_size;
 	gint16 vertical_padding;
@@ -657,7 +618,7 @@
 	gint32 header_len;
 	gint32 total_len;
 	gint32 unknown1;
-	gint32 correlation_id;
+	gint32 format_id;
 	gint32 image_size;
 	unsigned char padding[];
 };

Modified: libgpod/trunk/src/db-parse-context.c
===================================================================
--- libgpod/trunk/src/db-parse-context.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-parse-context.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -21,17 +21,21 @@
  *  This product is not supported/written/published by Apple!
  *
  */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
-
-#include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #include <glib.h>
+#include <glib/gstdio.h>
 #include "db-parse-context.h"
 #include "db-itunes-parser.h"
 #include "itdb_endianness.h"
@@ -55,13 +59,14 @@
 }
 
 void
-db_parse_context_destroy (DBParseContext *ctx, gboolean unmap) 
+db_parse_context_destroy (DBParseContext *ctx) 
 {
 	g_return_if_fail (ctx != NULL);
 
-	if (unmap) {
-		munmap ((void*)ctx->buffer, ctx->total_len);
+	if (ctx->mapped_file) {
+		g_mapped_file_free(ctx->mapped_file);
 	}
+
 	g_free (ctx);
 }
 
@@ -112,6 +117,7 @@
 				     ctx->total_len - offset, 
 				     ctx->byte_order);
 	sub_ctx->db = ctx->db;
+	sub_ctx->artwork = ctx->artwork;
 	return sub_ctx;
 }
 
@@ -170,63 +176,50 @@
 DBParseContext *
 db_parse_context_new_from_file (const char *filename, Itdb_DB *db)
 {
-	int fd;
-	struct stat stat_buf;
-	int result;
-	unsigned char *buffer;
 	DBParseContext *ctx;
 	Itdb_Device *device;
+	GError* error;
+	GMappedFile* mapped_file;
+	struct stat stat_buf;
 
-	buffer = NULL;
 	ctx = NULL;
+	error = NULL;
+	mapped_file = NULL;
 
 	device = db_get_device (db);
 	g_return_val_if_fail (device, NULL);
 
-	fd = open (filename, O_RDONLY);
-	if (fd == -1) {
-		g_print ("Failed to open %s: %s\n", 
-			 filename, strerror (errno));
+	if (g_stat (filename, &stat_buf) != 0) {
+		return NULL;	
+	};
+	if (stat_buf.st_size > 64 * 1024 * 1024) {
+		g_warning ("%s is too big to be mmapped (%llu bytes)\n",
+			   filename, (unsigned long long)stat_buf.st_size);
 		return NULL;
 	}
 
-	result = fstat (fd, &stat_buf);
-	if (result == -1) {
-		g_print ("Failed to read %s size: %s\n", 
-			 filename, strerror (errno));
-		goto error;
+	mapped_file = g_mapped_file_new(filename, FALSE, &error);
+	
+	if (mapped_file == NULL) {
+		g_print ("Error while mapping %s: %s\n", filename, 
+                    error->message);
+		g_error_free(error);
+		return NULL;
 	}
 
-	if (!S_ISREG (stat_buf.st_mode)) {
-		g_print ("%s is not a regular file\n", filename);
-		goto error;
-	}
-
-	if (stat_buf.st_size > ITUNESDB_MAX_SIZE) {
-		g_print ("%s is too big to be an buffer file\n", filename);
-		goto error;
-	}
-
-	buffer = mmap (NULL, stat_buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
-
-	if (buffer == MAP_FAILED) {
-		g_print ("Error while mmap'ing %s: %s\n", 
-			 filename, strerror (errno));
-		goto error;
-	}
-
 	if (device->byte_order == 0)
 	    itdb_device_autodetect_endianess (device);
 
-	ctx = db_parse_context_new (buffer,
-				    stat_buf.st_size, device->byte_order);
+	ctx = db_parse_context_new ((guchar *)g_mapped_file_get_contents(mapped_file),
+					g_mapped_file_get_length(mapped_file), 
+					device->byte_order);
 
 	if (ctx == NULL) {
-		munmap (buffer, stat_buf.st_size);
+		g_mapped_file_free(mapped_file);
+		return NULL;
 	}
 	ctx->db = db;
+	ctx->mapped_file = mapped_file;
 
- error:
-	close (fd);
-	return ctx;
+        return ctx;
 }

Modified: libgpod/trunk/src/db-parse-context.h
===================================================================
--- libgpod/trunk/src/db-parse-context.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/db-parse-context.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -21,7 +21,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
- *  $Id: db-parse-context.h 1669 2007-08-04 06:46:45Z tmzullinger $
+ *  $Id: db-parse-context.h 2154 2008-11-30 10:45:21Z jcsjcs $
  */
 
 
@@ -39,6 +39,8 @@
 	off_t total_len;
 	guint byte_order;
 	Itdb_DB *db;
+	GMappedFile *mapped_file;
+	GList **artwork;
 };
 
 typedef struct _DBParseContext DBParseContext;
@@ -54,7 +56,7 @@
 db_parse_context_set_total_len (DBParseContext *ctx, off_t len);
 
 G_GNUC_INTERNAL off_t 
-db_parse_context_get_remaining_length (DBParseContext *ctx) G_GNUC_INTERNAL;
+db_parse_context_get_remaining_length (DBParseContext *ctx);
 
 G_GNUC_INTERNAL DBParseContext *
 db_parse_context_get_sub_context (DBParseContext *ctx, off_t offset);
@@ -73,6 +75,6 @@
 
 
 G_GNUC_INTERNAL void 
-db_parse_context_destroy (DBParseContext *ctx, gboolean unmap);
+db_parse_context_destroy (DBParseContext *ctx);
 
 #endif

Copied: libgpod/trunk/src/gchecksum.c (from rev 340, libgpod/branches/upstream/current/src/gchecksum.c)
===================================================================
--- libgpod/trunk/src/gchecksum.c	                        (rev 0)
+++ libgpod/trunk/src/gchecksum.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,1411 @@
+/* gchecksum.h - data hashing functions
+ *
+ * Copyright (C) 2007  Emmanuele Bassi  <ebassi at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "glibconfig.h"
+#include "gchecksum.h"
+#include "glib.h"
+
+#define IS_VALID_TYPE(type)     ((type) >= G_CHECKSUM_MD5 && (type) <= G_CHECKSUM_SHA256)
+
+static const gchar hex_digits[] = "0123456789abcdef";
+
+#define MD5_DATASIZE    64
+#define MD5_DIGEST_LEN  16
+
+typedef struct
+{
+  guint32 buf[4];
+  guint32 bits[2];
+  
+  guchar data[MD5_DATASIZE];
+
+  guchar digest[MD5_DIGEST_LEN];
+} Md5sum;
+
+#define SHA1_DATASIZE   64
+#define SHA1_DIGEST_LEN 20
+
+typedef struct
+{
+  guint32 buf[5];
+  guint32 bits[2];
+
+  /* we pack 64 unsigned chars into 16 32-bit unsigned integers */
+  guint32 data[16];
+
+  guchar digest[SHA1_DIGEST_LEN];
+} Sha1sum;
+
+#define SHA256_DATASIZE         64
+#define SHA256_DIGEST_LEN       32
+
+typedef struct
+{
+  guint32 buf[8];
+  guint32 bits[2];
+
+  guint8 data[SHA256_DATASIZE];
+
+  guchar digest[SHA256_DIGEST_LEN];
+} Sha256sum;
+
+struct _GChecksum
+{
+  GChecksumType type;
+
+  gchar *digest_str;
+
+  union {
+    Md5sum md5;
+    Sha1sum sha1;
+    Sha256sum sha256;
+  } sum;
+};
+
+/* we need different byte swapping functions because MD5 expects buffers
+ * to be little-endian, while SHA1 and SHA256 expect them in big-endian
+ * form.
+ */
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define md5_byte_reverse(buffer,length)
+#else
+/* assume that the passed buffer is integer aligned */
+static inline void
+md5_byte_reverse (guchar *buffer,
+                  gulong  length)
+{
+  guint32 bit;
+
+  do
+    {
+      bit = (guint32) ((unsigned) buffer[3] << 8 | buffer[2]) << 16 |
+                      ((unsigned) buffer[1] << 8 | buffer[0]);
+      * (guint32 *) buffer = bit;
+      buffer += 4;
+    }
+  while (--length);
+}
+#endif /* G_BYTE_ORDER == G_LITTLE_ENDIAN */
+
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+#define sha_byte_reverse(buffer,length)
+#else
+static inline void
+sha_byte_reverse (guint32 *buffer,
+                  gint     length)
+{
+  length /= sizeof (guint32);
+  while (length--)
+    {
+      *buffer = ((guint32) (((*buffer & (guint32) 0x000000ffU) << 24) |
+                            ((*buffer & (guint32) 0x0000ff00U) <<  8) |
+                            ((*buffer & (guint32) 0x00ff0000U) >>  8) |
+                            ((*buffer & (guint32) 0xff000000U) >> 24)));
+      ++buffer;
+    }
+}
+#endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
+
+static gchar *
+digest_to_string (guint8 *digest,
+                  gsize   digest_len)
+{
+  gint len = digest_len * 2;
+  gint i;
+  gchar *retval;
+
+  retval = g_new (gchar, len + 1);
+
+  for (i = 0; i < digest_len; i++)
+    {
+      guint8 byte = digest[i];
+
+      retval[2 * i] = hex_digits[byte >> 4];
+      retval[2 * i + 1] = hex_digits[byte & 0xf];
+    }
+
+  retval[len] = 0;
+
+  return retval;
+}
+
+/*
+ * MD5 Checksum
+ */
+
+/* This MD5 digest computation is based on the equivalent code
+ * written by Colin Plumb. It came with this notice:
+ *
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest.  This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ */
+
+static void
+md5_sum_init (Md5sum *md5)
+{
+  /* arbitrary constants */
+  md5->buf[0] = 0x67452301;
+  md5->buf[1] = 0xefcdab89;
+  md5->buf[2] = 0x98badcfe;
+  md5->buf[3] = 0x10325476;
+
+  md5->bits[0] = md5->bits[1] = 0;
+}
+
+/*
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data.  md5_sum_update()
+ * blocks the data and converts bytes into longwords for this routine.
+ */
+static void 
+md5_transform (guint32	     buf[4],
+	       guint32 const in[16])
+{
+  register guint32 a, b, c, d;
+
+/* The four core functions - F1 is optimized somewhat */
+#define F1(x, y, z)     (z ^ (x & (y ^ z)))
+#define F2(x, y, z)     F1 (z, x, y)
+#define F3(x, y, z)     (x ^ y ^ z)
+#define F4(x, y, z)     (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define md5_step(f, w, x, y, z, data, s) \
+	( w += f (x, y, z) + data,  w = w << s | w >> (32 - s),  w += x )
+
+  a = buf[0];
+  b = buf[1];
+  c = buf[2];
+  d = buf[3];
+
+  md5_step (F1, a, b, c, d, in[0]  + 0xd76aa478,  7);
+  md5_step (F1, d, a, b, c, in[1]  + 0xe8c7b756, 12);
+  md5_step (F1, c, d, a, b, in[2]  + 0x242070db, 17);
+  md5_step (F1, b, c, d, a, in[3]  + 0xc1bdceee, 22);
+  md5_step (F1, a, b, c, d, in[4]  + 0xf57c0faf,  7);
+  md5_step (F1, d, a, b, c, in[5]  + 0x4787c62a, 12);
+  md5_step (F1, c, d, a, b, in[6]  + 0xa8304613, 17);
+  md5_step (F1, b, c, d, a, in[7]  + 0xfd469501, 22);
+  md5_step (F1, a, b, c, d, in[8]  + 0x698098d8,  7);
+  md5_step (F1, d, a, b, c, in[9]  + 0x8b44f7af, 12);
+  md5_step (F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+  md5_step (F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+  md5_step (F1, a, b, c, d, in[12] + 0x6b901122,  7);
+  md5_step (F1, d, a, b, c, in[13] + 0xfd987193, 12);
+  md5_step (F1, c, d, a, b, in[14] + 0xa679438e, 17);
+  md5_step (F1, b, c, d, a, in[15] + 0x49b40821, 22);
+	
+  md5_step (F2, a, b, c, d, in[1]  + 0xf61e2562,  5);
+  md5_step (F2, d, a, b, c, in[6]  + 0xc040b340,  9);
+  md5_step (F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+  md5_step (F2, b, c, d, a, in[0]  + 0xe9b6c7aa, 20);
+  md5_step (F2, a, b, c, d, in[5]  + 0xd62f105d,  5);
+  md5_step (F2, d, a, b, c, in[10] + 0x02441453,  9);
+  md5_step (F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+  md5_step (F2, b, c, d, a, in[4]  + 0xe7d3fbc8, 20);
+  md5_step (F2, a, b, c, d, in[9]  + 0x21e1cde6,  5);
+  md5_step (F2, d, a, b, c, in[14] + 0xc33707d6,  9);
+  md5_step (F2, c, d, a, b, in[3]  + 0xf4d50d87, 14);
+  md5_step (F2, b, c, d, a, in[8]  + 0x455a14ed, 20);
+  md5_step (F2, a, b, c, d, in[13] + 0xa9e3e905,  5);
+  md5_step (F2, d, a, b, c, in[2]  + 0xfcefa3f8,  9);
+  md5_step (F2, c, d, a, b, in[7]  + 0x676f02d9, 14);
+  md5_step (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+  md5_step (F3, a, b, c, d, in[5]  + 0xfffa3942,  4);
+  md5_step (F3, d, a, b, c, in[8]  + 0x8771f681, 11);
+  md5_step (F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+  md5_step (F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+  md5_step (F3, a, b, c, d, in[1]  + 0xa4beea44,  4);
+  md5_step (F3, d, a, b, c, in[4]  + 0x4bdecfa9, 11);
+  md5_step (F3, c, d, a, b, in[7]  + 0xf6bb4b60, 16);
+  md5_step (F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+  md5_step (F3, a, b, c, d, in[13] + 0x289b7ec6,  4);
+  md5_step (F3, d, a, b, c, in[0]  + 0xeaa127fa, 11);
+  md5_step (F3, c, d, a, b, in[3]  + 0xd4ef3085, 16);
+  md5_step (F3, b, c, d, a, in[6]  + 0x04881d05, 23);
+  md5_step (F3, a, b, c, d, in[9]  + 0xd9d4d039,  4);
+  md5_step (F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+  md5_step (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+  md5_step (F3, b, c, d, a, in[2]  + 0xc4ac5665, 23);
+
+  md5_step (F4, a, b, c, d, in[0]  + 0xf4292244,  6);
+  md5_step (F4, d, a, b, c, in[7]  + 0x432aff97, 10);
+  md5_step (F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+  md5_step (F4, b, c, d, a, in[5]  + 0xfc93a039, 21);
+  md5_step (F4, a, b, c, d, in[12] + 0x655b59c3,  6);
+  md5_step (F4, d, a, b, c, in[3]  + 0x8f0ccc92, 10);
+  md5_step (F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+  md5_step (F4, b, c, d, a, in[1]  + 0x85845dd1, 21);
+  md5_step (F4, a, b, c, d, in[8]  + 0x6fa87e4f,  6);
+  md5_step (F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+  md5_step (F4, c, d, a, b, in[6]  + 0xa3014314, 15);
+  md5_step (F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+  md5_step (F4, a, b, c, d, in[4]  + 0xf7537e82,  6);
+  md5_step (F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+  md5_step (F4, c, d, a, b, in[2]  + 0x2ad7d2bb, 15);
+  md5_step (F4, b, c, d, a, in[9]  + 0xeb86d391, 21);
+
+  buf[0] += a;
+  buf[1] += b;
+  buf[2] += c;
+  buf[3] += d;
+
+#undef F1
+#undef F2
+#undef F3
+#undef F4
+#undef md5_step
+}
+
+static void
+md5_sum_update (Md5sum       *md5,
+                const guchar *data,
+                gsize         length)
+{
+  guint32 bit;
+
+  bit = md5->bits[0];
+  md5->bits[0] = bit + ((guint32) length << 3);
+
+  /* carry from low to high */
+  if (md5->bits[0] < bit)
+    md5->bits[1] += 1;
+
+  md5->bits[1] += length >> 29;
+
+  /* bytes already in Md5sum->data */
+  bit = (bit >> 3) & 0x3f;
+
+  /* handle any leading odd-sized chunks */
+  if (bit)
+    {
+      guchar *p = (guchar *) md5->data + bit;
+
+      bit = MD5_DATASIZE - bit;
+      if (length < bit)
+        {
+          memcpy (p, data, length);
+          return;
+        }
+
+      memcpy (p, data, bit);
+      
+      md5_byte_reverse (md5->data, 16);
+      md5_transform (md5->buf, (guint32 *) md5->data);
+
+      data += bit;
+      length -= bit;
+    }
+
+  /* process data in 64-byte chunks */
+  while (length >= MD5_DATASIZE)
+    {
+      memcpy (md5->data, data, MD5_DATASIZE);
+      
+      md5_byte_reverse (md5->data, 16);
+      md5_transform (md5->buf, (guint32 *) md5->data);
+
+      data += MD5_DATASIZE;
+      length -= MD5_DATASIZE;
+    }
+
+  /* handle any remaining bytes of data */
+  memcpy (md5->data, data, length);
+}
+
+/* closes a checksum */
+static void
+md5_sum_close (Md5sum *md5)
+{
+  guint count;
+  guchar *p;
+
+  /* Compute number of bytes mod 64 */
+  count = (md5->bits[0] >> 3) & 0x3F;
+
+  /* Set the first char of padding to 0x80.
+   * This is safe since there is always at least one byte free
+   */
+  p = md5->data + count;
+  *p++ = 0x80;
+
+  /* Bytes of padding needed to make 64 bytes */
+  count = MD5_DATASIZE - 1 - count;
+
+  /* Pad out to 56 mod 64 */
+  if (count < 8)
+    {
+      /* Two lots of padding:  Pad the first block to 64 bytes */
+      memset (p, 0, count);
+      
+      md5_byte_reverse (md5->data, 16);
+      md5_transform (md5->buf, (guint32 *) md5->data);
+
+      /* Now fill the next block with 56 bytes */
+      memset (md5->data, 0, MD5_DATASIZE - 8);
+    }
+  else
+    {
+      /* Pad block to 56 bytes */
+      memset (p, 0, count - 8);
+    }
+
+  md5_byte_reverse (md5->data, 14);
+
+  /* Append length in bits and transform */
+  ((guint32 *) md5->data)[14] = md5->bits[0];
+  ((guint32 *) md5->data)[15] = md5->bits[1];
+
+  md5_transform (md5->buf, (guint32 *) md5->data);
+  md5_byte_reverse ((guchar *) md5->buf, 4);
+  
+  memcpy (md5->digest, md5->buf, 16);
+
+  /* Reset buffers in case they contain sensitive data */
+  memset (md5->buf, 0, sizeof (md5->buf));
+  memset (md5->data, 0, sizeof (md5->data));
+}
+
+static gchar *
+md5_sum_to_string (Md5sum *md5)
+{
+  return digest_to_string (md5->digest, MD5_DIGEST_LEN);
+}
+
+static void
+md5_sum_digest (Md5sum *md5,
+                guint8 *digest)
+{
+  gint i;
+
+  for (i = 0; i < MD5_DIGEST_LEN; i++)
+    digest[i] = md5->digest[i];
+}
+
+/*
+ * SHA-1 Checksum
+ */
+
+/* The following implementation comes from D-Bus dbus-sha.c. I've changed
+ * it to use GLib types and to work more like the MD5 implementation above.
+ * I left the comments to have an history of this code.
+ *      -- Emmanuele Bassi, ebassi at gnome.org
+ */
+
+/* The following comments have the history of where this code
+ * comes from. I actually copied it from GNet in GNOME CVS.
+ * - hp at redhat.com
+ */
+
+/*
+ *  sha.h : Implementation of the Secure Hash Algorithm
+ *
+ * Part of the Python Cryptography Toolkit, version 1.0.0
+ *
+ * Copyright (C) 1995, A.M. Kuchling
+ *
+ * Distribute and use freely; there are no restrictions on further
+ * dissemination and usage except those imposed by the laws of your
+ * country of residence.
+ *
+ */
+
+/* SHA: NIST's Secure Hash Algorithm */
+
+/* Based on SHA code originally posted to sci.crypt by Peter Gutmann
+   in message <30ajo5$oe8 at ccu2.auckland.ac.nz>.
+   Modified to test for endianness on creation of SHA objects by AMK.
+   Also, the original specification of SHA was found to have a weakness
+   by NSA/NIST.  This code implements the fixed version of SHA.
+*/
+
+/* Here's the first paragraph of Peter Gutmann's posting:
+
+The following is my SHA (FIPS 180) code updated to allow use of the "fixed"
+SHA, thanks to Jim Gillogly and an anonymous contributor for the information on
+what's changed in the new version.  The fix is a simple change which involves
+adding a single rotate in the initial expansion function.  It is unknown
+whether this is an optimal solution to the problem which was discovered in the
+SHA or whether it's simply a bandaid which fixes the problem with a minimum of
+effort (for example the reengineering of a great many Capstone chips).
+*/
+
+static void
+sha1_sum_init (Sha1sum *sha1)
+{
+  /* initialize constants */
+  sha1->buf[0] = 0x67452301L;
+  sha1->buf[1] = 0xEFCDAB89L;
+  sha1->buf[2] = 0x98BADCFEL;
+  sha1->buf[3] = 0x10325476L;
+  sha1->buf[4] = 0xC3D2E1F0L;
+
+  /* initialize bits */
+  sha1->bits[0] = sha1->bits[1] = 0;
+}
+
+/* The SHA f()-functions. */
+
+#define f1(x,y,z)       (z ^ (x & (y ^ z)))             /* Rounds  0-19 */
+#define f2(x,y,z)       (x ^ y ^ z)                     /* Rounds 20-39 */
+#define f3(x,y,z)       (( x & y) | (z & (x | y)))      /* Rounds 40-59 */
+#define f4(x,y,z)       (x ^ y ^ z)                     /* Rounds 60-79 */
+
+/* The SHA Mysterious Constants */
+#define K1  0x5A827999L                                 /* Rounds  0-19 */
+#define K2  0x6ED9EBA1L                                 /* Rounds 20-39 */
+#define K3  0x8F1BBCDCL                                 /* Rounds 40-59 */
+#define K4  0xCA62C1D6L                                 /* Rounds 60-79 */
+
+/* 32-bit rotate left - kludged with shifts */
+#define ROTL(n,X) (((X) << n ) | ((X) >> (32 - n)))
+
+/* The initial expanding function.  The hash function is defined over an
+   80-word expanded input array W, where the first 16 are copies of the input
+   data, and the remaining 64 are defined by
+
+        W[ i ] = W[ i - 16 ] ^ W[ i - 14 ] ^ W[ i - 8 ] ^ W[ i - 3 ]
+
+   This implementation generates these values on the fly in a circular
+   buffer - thanks to Colin Plumb, colin at nyx10.cs.du.edu for this
+   optimization.
+
+   The updated SHA changes the expanding function by adding a rotate of 1
+   bit.  Thanks to Jim Gillogly, jim at rand.org, and an anonymous contributor
+   for this information */
+
+#define expand(W,i) (W[ i & 15 ] = ROTL (1, (W[ i       & 15] ^ \
+                                             W[(i - 14) & 15] ^ \
+                                             W[(i -  8) & 15] ^ \
+                                             W[(i -  3) & 15])))
+
+
+/* The prototype SHA sub-round.  The fundamental sub-round is:
+
+        a' = e + ROTL( 5, a ) + f( b, c, d ) + k + data;
+        b' = a;
+        c' = ROTL( 30, b );
+        d' = c;
+        e' = d;
+
+   but this is implemented by unrolling the loop 5 times and renaming the
+   variables ( e, a, b, c, d ) = ( a', b', c', d', e' ) each iteration.
+   This code is then replicated 20 times for each of the 4 functions, using
+   the next 20 values from the W[] array each time */
+
+#define subRound(a, b, c, d, e, f, k, data) \
+   (e += ROTL (5, a) + f(b, c, d) + k + data, b = ROTL (30, b))
+
+static void
+sha1_transform (guint32  buf[5],
+                guint32  in[16])
+{
+  guint32 A, B, C, D, E;
+
+  A = buf[0];
+  B = buf[1];
+  C = buf[2];
+  D = buf[3];
+  E = buf[4];
+
+  /* Heavy mangling, in 4 sub-rounds of 20 interations each. */
+  subRound (A, B, C, D, E, f1, K1, in[0]);
+  subRound (E, A, B, C, D, f1, K1, in[1]);
+  subRound (D, E, A, B, C, f1, K1, in[2]);
+  subRound (C, D, E, A, B, f1, K1, in[3]);
+  subRound (B, C, D, E, A, f1, K1, in[4]);
+  subRound (A, B, C, D, E, f1, K1, in[5]);
+  subRound (E, A, B, C, D, f1, K1, in[6]);
+  subRound (D, E, A, B, C, f1, K1, in[7]);
+  subRound (C, D, E, A, B, f1, K1, in[8]);
+  subRound (B, C, D, E, A, f1, K1, in[9]);
+  subRound (A, B, C, D, E, f1, K1, in[10]);
+  subRound (E, A, B, C, D, f1, K1, in[11]);
+  subRound (D, E, A, B, C, f1, K1, in[12]);
+  subRound (C, D, E, A, B, f1, K1, in[13]);
+  subRound (B, C, D, E, A, f1, K1, in[14]);
+  subRound (A, B, C, D, E, f1, K1, in[15]);
+  subRound (E, A, B, C, D, f1, K1, expand (in, 16));
+  subRound (D, E, A, B, C, f1, K1, expand (in, 17));
+  subRound (C, D, E, A, B, f1, K1, expand (in, 18));
+  subRound (B, C, D, E, A, f1, K1, expand (in, 19));
+
+  subRound (A, B, C, D, E, f2, K2, expand (in, 20));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 21));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 22));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 23));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 24));
+  subRound (A, B, C, D, E, f2, K2, expand (in, 25));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 26));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 27));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 28));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 29));
+  subRound (A, B, C, D, E, f2, K2, expand (in, 30));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 31));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 32));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 33));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 34));
+  subRound (A, B, C, D, E, f2, K2, expand (in, 35));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 36));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 37));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 38));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 39));
+  
+  subRound (A, B, C, D, E, f3, K3, expand (in, 40));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 41));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 42));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 43));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 44));
+  subRound (A, B, C, D, E, f3, K3, expand (in, 45));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 46));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 47));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 48));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 49));
+  subRound (A, B, C, D, E, f3, K3, expand (in, 50));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 51));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 52));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 53));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 54));
+  subRound (A, B, C, D, E, f3, K3, expand (in, 55));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 56));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 57));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 58));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 59));
+
+  subRound (A, B, C, D, E, f4, K4, expand (in, 60));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 61));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 62));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 63));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 64));
+  subRound (A, B, C, D, E, f4, K4, expand (in, 65));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 66));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 67));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 68));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 69));
+  subRound (A, B, C, D, E, f4, K4, expand (in, 70));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 71));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 72));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 73));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 74));
+  subRound (A, B, C, D, E, f4, K4, expand (in, 75));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 76));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 77));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 78));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 79));
+
+  /* Build message digest */
+  buf[0] += A;
+  buf[1] += B;
+  buf[2] += C;
+  buf[3] += D;
+  buf[4] += E;
+}
+
+#undef K1
+#undef K2
+#undef K3
+#undef K4
+#undef f1
+#undef f2
+#undef f3
+#undef f4
+#undef ROTL
+#undef expand
+#undef subRound
+
+static void
+sha1_sum_update (Sha1sum      *sha1,
+                 const guchar *buffer,
+                 gsize         count)
+{
+  guint32 tmp;
+  guint dataCount;
+
+  /* Update bitcount */
+  tmp = sha1->bits[0];
+  if ((sha1->bits[0] = tmp + ((guint32) count << 3) ) < tmp)
+    sha1->bits[1] += 1;             /* Carry from low to high */
+  sha1->bits[1] += count >> 29;
+
+  /* Get count of bytes already in data */
+  dataCount = (guint) (tmp >> 3) & 0x3F;
+
+  /* Handle any leading odd-sized chunks */
+  if (dataCount)
+    {
+      guchar *p = (guchar *) sha1->data + dataCount;
+
+      dataCount = SHA1_DATASIZE - dataCount;
+      if (count < dataCount)
+        {
+          memcpy (p, buffer, count);
+          return;
+        }
+      
+      memcpy (p, buffer, dataCount);
+
+      sha_byte_reverse (sha1->data, SHA1_DATASIZE);
+      sha1_transform (sha1->buf, sha1->data);
+
+      buffer += dataCount;
+      count -= dataCount;
+    }
+
+  /* Process data in SHA1_DATASIZE chunks */
+  while (count >= SHA1_DATASIZE)
+    {
+      memcpy (sha1->data, buffer, SHA1_DATASIZE);
+      
+      sha_byte_reverse (sha1->data, SHA1_DATASIZE);
+      sha1_transform (sha1->buf, sha1->data);
+
+      buffer += SHA1_DATASIZE;
+      count -= SHA1_DATASIZE;
+    }
+
+  /* Handle any remaining bytes of data. */
+  memcpy (sha1->data, buffer, count);
+}
+
+/* Final wrapup - pad to SHA_DATASIZE-byte boundary with the bit pattern
+   1 0* (64-bit count of bits processed, MSB-first) */
+static void
+sha1_sum_close (Sha1sum *sha1)
+{
+  gint count;
+  guchar *data_p;
+
+  /* Compute number of bytes mod 64 */
+  count = (gint) ((sha1->bits[0] >> 3) & 0x3f);
+
+  /* Set the first char of padding to 0x80.  This is safe since there is
+     always at least one byte free */
+  data_p = (guchar *) sha1->data + count;
+  *data_p++ = 0x80;
+
+  /* Bytes of padding needed to make 64 bytes */
+  count = SHA1_DATASIZE - 1 - count;
+
+  /* Pad out to 56 mod 64 */
+  if (count < 8)
+    {
+      /* Two lots of padding:  Pad the first block to 64 bytes */
+      memset (data_p, 0, count);
+
+      sha_byte_reverse (sha1->data, SHA1_DATASIZE);
+      sha1_transform (sha1->buf, sha1->data);
+
+      /* Now fill the next block with 56 bytes */
+      memset (sha1->data, 0, SHA1_DATASIZE - 8);
+    }
+  else
+    {
+      /* Pad block to 56 bytes */
+      memset (data_p, 0, count - 8);
+    }
+
+  /* Append length in bits and transform */
+  sha1->data[14] = sha1->bits[1];
+  sha1->data[15] = sha1->bits[0];
+
+  sha_byte_reverse (sha1->data, SHA1_DATASIZE - 8);
+  sha1_transform (sha1->buf, sha1->data);
+  sha_byte_reverse (sha1->buf, SHA1_DIGEST_LEN);
+
+  memcpy (sha1->digest, sha1->buf, SHA1_DIGEST_LEN);
+
+  /* Reset buffers in case they contain sensitive data */
+  memset (sha1->buf, 0, sizeof (sha1->buf));
+  memset (sha1->data, 0, sizeof (sha1->data));
+}
+
+static gchar *
+sha1_sum_to_string (Sha1sum *sha1)
+{
+  return digest_to_string (sha1->digest, SHA1_DIGEST_LEN);
+}
+
+static void
+sha1_sum_digest (Sha1sum *sha1,
+                 guint8  *digest)
+{
+  gint i;
+
+  for (i = 0; i < SHA1_DIGEST_LEN; i++)
+    digest[i] = sha1->digest[i];
+}
+
+/*
+ * SHA-256 Checksum
+ */
+
+/* adapted from the SHA256 implementation in gsk/src/hash/gskhash.c.
+ *
+ * Copyright (C) 2006 Dave Benson
+ * Released under the terms of the GNU Lesser General Public License
+ */
+
+static void
+sha256_sum_init (Sha256sum *sha256)
+{
+  sha256->buf[0] = 0x6a09e667;
+  sha256->buf[1] = 0xbb67ae85;
+  sha256->buf[2] = 0x3c6ef372;
+  sha256->buf[3] = 0xa54ff53a;
+  sha256->buf[4] = 0x510e527f;
+  sha256->buf[5] = 0x9b05688c;
+  sha256->buf[6] = 0x1f83d9ab;
+  sha256->buf[7] = 0x5be0cd19;
+
+  sha256->bits[0] = sha256->bits[1] = 0;
+}
+
+#define GET_UINT32(n,b,i)               G_STMT_START{   \
+    (n) = ((guint32) (b)[(i)    ] << 24)                \
+        | ((guint32) (b)[(i) + 1] << 16)                \
+        | ((guint32) (b)[(i) + 2] <<  8)                \
+        | ((guint32) (b)[(i) + 3]      ); } G_STMT_END
+
+#define PUT_UINT32(n,b,i)               G_STMT_START{   \
+    (b)[(i)    ] = (guint8) ((n) >> 24);                \
+    (b)[(i) + 1] = (guint8) ((n) >> 16);                \
+    (b)[(i) + 2] = (guint8) ((n) >>  8);                \
+    (b)[(i) + 3] = (guint8) ((n)      ); } G_STMT_END
+
+static void
+sha256_transform (guint32      buf[8],
+                  guint8 const data[64])
+{
+  guint32 temp1, temp2, W[64];
+  guint32 A, B, C, D, E, F, G, H;
+
+  GET_UINT32 (W[0],  data,  0);
+  GET_UINT32 (W[1],  data,  4);
+  GET_UINT32 (W[2],  data,  8);
+  GET_UINT32 (W[3],  data, 12);
+  GET_UINT32 (W[4],  data, 16);
+  GET_UINT32 (W[5],  data, 20);
+  GET_UINT32 (W[6],  data, 24);
+  GET_UINT32 (W[7],  data, 28);
+  GET_UINT32 (W[8],  data, 32);
+  GET_UINT32 (W[9],  data, 36);
+  GET_UINT32 (W[10], data, 40);
+  GET_UINT32 (W[11], data, 44);
+  GET_UINT32 (W[12], data, 48);
+  GET_UINT32 (W[13], data, 52);
+  GET_UINT32 (W[14], data, 56);
+  GET_UINT32 (W[15], data, 60);
+
+#define SHR(x,n)        ((x & 0xFFFFFFFF) >> n)
+#define ROTR(x,n)       (SHR (x,n) | (x << (32 - n)))
+
+#define S0(x) (ROTR (x, 7) ^ ROTR (x,18) ^  SHR (x, 3))
+#define S1(x) (ROTR (x,17) ^ ROTR (x,19) ^  SHR (x,10))
+#define S2(x) (ROTR (x, 2) ^ ROTR (x,13) ^ ROTR (x,22))
+#define S3(x) (ROTR (x, 6) ^ ROTR (x,11) ^ ROTR (x,25))
+
+#define F0(x,y,z) ((x & y) | (z & (x | y)))
+#define F1(x,y,z) (z ^ (x & (y ^ z)))
+
+#define R(t)    (W[t] = S1(W[t -  2]) + W[t -  7] + \
+                        S0(W[t - 15]) + W[t - 16])
+
+#define P(a,b,c,d,e,f,g,h,x,K)          G_STMT_START {  \
+        temp1 = h + S3(e) + F1(e,f,g) + K + x;          \
+        temp2 = S2(a) + F0(a,b,c);                      \
+        d += temp1; h = temp1 + temp2; } G_STMT_END
+
+  A = buf[0];
+  B = buf[1];
+  C = buf[2];
+  D = buf[3];
+  E = buf[4];
+  F = buf[5];
+  G = buf[6];
+  H = buf[7];
+
+  P (A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98);
+  P (H, A, B, C, D, E, F, G, W[ 1], 0x71374491);
+  P (G, H, A, B, C, D, E, F, W[ 2], 0xB5C0FBCF);
+  P (F, G, H, A, B, C, D, E, W[ 3], 0xE9B5DBA5);
+  P (E, F, G, H, A, B, C, D, W[ 4], 0x3956C25B);
+  P (D, E, F, G, H, A, B, C, W[ 5], 0x59F111F1);
+  P (C, D, E, F, G, H, A, B, W[ 6], 0x923F82A4);
+  P (B, C, D, E, F, G, H, A, W[ 7], 0xAB1C5ED5);
+  P (A, B, C, D, E, F, G, H, W[ 8], 0xD807AA98);
+  P (H, A, B, C, D, E, F, G, W[ 9], 0x12835B01);
+  P (G, H, A, B, C, D, E, F, W[10], 0x243185BE);
+  P (F, G, H, A, B, C, D, E, W[11], 0x550C7DC3);
+  P (E, F, G, H, A, B, C, D, W[12], 0x72BE5D74);
+  P (D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE);
+  P (C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7);
+  P (B, C, D, E, F, G, H, A, W[15], 0xC19BF174);
+  P (A, B, C, D, E, F, G, H, R(16), 0xE49B69C1);
+  P (H, A, B, C, D, E, F, G, R(17), 0xEFBE4786);
+  P (G, H, A, B, C, D, E, F, R(18), 0x0FC19DC6);
+  P (F, G, H, A, B, C, D, E, R(19), 0x240CA1CC);
+  P (E, F, G, H, A, B, C, D, R(20), 0x2DE92C6F);
+  P (D, E, F, G, H, A, B, C, R(21), 0x4A7484AA);
+  P (C, D, E, F, G, H, A, B, R(22), 0x5CB0A9DC);
+  P (B, C, D, E, F, G, H, A, R(23), 0x76F988DA);
+  P (A, B, C, D, E, F, G, H, R(24), 0x983E5152);
+  P (H, A, B, C, D, E, F, G, R(25), 0xA831C66D);
+  P (G, H, A, B, C, D, E, F, R(26), 0xB00327C8);
+  P (F, G, H, A, B, C, D, E, R(27), 0xBF597FC7);
+  P (E, F, G, H, A, B, C, D, R(28), 0xC6E00BF3);
+  P (D, E, F, G, H, A, B, C, R(29), 0xD5A79147);
+  P (C, D, E, F, G, H, A, B, R(30), 0x06CA6351);
+  P (B, C, D, E, F, G, H, A, R(31), 0x14292967);
+  P (A, B, C, D, E, F, G, H, R(32), 0x27B70A85);
+  P (H, A, B, C, D, E, F, G, R(33), 0x2E1B2138);
+  P (G, H, A, B, C, D, E, F, R(34), 0x4D2C6DFC);
+  P (F, G, H, A, B, C, D, E, R(35), 0x53380D13);
+  P (E, F, G, H, A, B, C, D, R(36), 0x650A7354);
+  P (D, E, F, G, H, A, B, C, R(37), 0x766A0ABB);
+  P (C, D, E, F, G, H, A, B, R(38), 0x81C2C92E);
+  P (B, C, D, E, F, G, H, A, R(39), 0x92722C85);
+  P (A, B, C, D, E, F, G, H, R(40), 0xA2BFE8A1);
+  P (H, A, B, C, D, E, F, G, R(41), 0xA81A664B);
+  P (G, H, A, B, C, D, E, F, R(42), 0xC24B8B70);
+  P (F, G, H, A, B, C, D, E, R(43), 0xC76C51A3);
+  P (E, F, G, H, A, B, C, D, R(44), 0xD192E819);
+  P (D, E, F, G, H, A, B, C, R(45), 0xD6990624);
+  P (C, D, E, F, G, H, A, B, R(46), 0xF40E3585);
+  P (B, C, D, E, F, G, H, A, R(47), 0x106AA070);
+  P (A, B, C, D, E, F, G, H, R(48), 0x19A4C116);
+  P (H, A, B, C, D, E, F, G, R(49), 0x1E376C08);
+  P (G, H, A, B, C, D, E, F, R(50), 0x2748774C);
+  P (F, G, H, A, B, C, D, E, R(51), 0x34B0BCB5);
+  P (E, F, G, H, A, B, C, D, R(52), 0x391C0CB3);
+  P (D, E, F, G, H, A, B, C, R(53), 0x4ED8AA4A);
+  P (C, D, E, F, G, H, A, B, R(54), 0x5B9CCA4F);
+  P (B, C, D, E, F, G, H, A, R(55), 0x682E6FF3);
+  P (A, B, C, D, E, F, G, H, R(56), 0x748F82EE);
+  P (H, A, B, C, D, E, F, G, R(57), 0x78A5636F);
+  P (G, H, A, B, C, D, E, F, R(58), 0x84C87814);
+  P (F, G, H, A, B, C, D, E, R(59), 0x8CC70208);
+  P (E, F, G, H, A, B, C, D, R(60), 0x90BEFFFA);
+  P (D, E, F, G, H, A, B, C, R(61), 0xA4506CEB);
+  P (C, D, E, F, G, H, A, B, R(62), 0xBEF9A3F7);
+  P (B, C, D, E, F, G, H, A, R(63), 0xC67178F2);
+
+#undef SHR
+#undef ROTR
+#undef S0
+#undef S1
+#undef S2
+#undef S3
+#undef F0
+#undef F1
+#undef R
+#undef P
+
+  buf[0] += A;
+  buf[1] += B;
+  buf[2] += C;
+  buf[3] += D;
+  buf[4] += E;
+  buf[5] += F;
+  buf[6] += G;
+  buf[7] += H;
+}
+
+static void
+sha256_sum_update (Sha256sum    *sha256,
+                   const guchar *buffer,
+                   gsize         length)
+{
+  guint32 left, fill;
+  const guint8 *input = buffer;
+
+  if (length == 0)
+    return;
+
+  left = sha256->bits[0] & 0x3F;
+  fill = 64 - left;
+
+  sha256->bits[0] += length;
+  sha256->bits[0] &= 0xFFFFFFFF;
+
+  if (sha256->bits[0] < length)
+      sha256->bits[1]++;
+
+  if (left > 0 && length >= fill)
+    {
+      memcpy ((sha256->data + left), input, fill);
+
+      sha256_transform (sha256->buf, sha256->data);
+      length -= fill;
+      input += fill;
+
+      left = 0;
+    }
+
+  while (length >= SHA256_DATASIZE)
+    {
+      sha256_transform (sha256->buf, input);
+
+      length -= 64;
+      input += 64;
+    }
+
+  if (length)
+    memcpy (sha256->data + left, input, length);
+}
+
+static guint8 sha256_padding[64] =
+{
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static void
+sha256_sum_close (Sha256sum *sha256)
+{
+  guint32 last, padn;
+  guint32 high, low;
+  guint8 msglen[8];
+
+  high = (sha256->bits[0] >> 29)
+       | (sha256->bits[1] <<  3);
+  low  = (sha256->bits[0] <<  3);
+
+  PUT_UINT32 (high, msglen, 0);
+  PUT_UINT32 (low, msglen, 4);
+
+  last = sha256->bits[0] & 0x3F;
+  padn = (last < 56) ? (56 - last) : (120 - last);
+
+  sha256_sum_update (sha256, sha256_padding, padn);
+  sha256_sum_update (sha256, msglen, 8);
+
+  PUT_UINT32 (sha256->buf[0], sha256->digest,  0);
+  PUT_UINT32 (sha256->buf[1], sha256->digest,  4);
+  PUT_UINT32 (sha256->buf[2], sha256->digest,  8);
+  PUT_UINT32 (sha256->buf[3], sha256->digest, 12);
+  PUT_UINT32 (sha256->buf[4], sha256->digest, 16);
+  PUT_UINT32 (sha256->buf[5], sha256->digest, 20);
+  PUT_UINT32 (sha256->buf[6], sha256->digest, 24);
+  PUT_UINT32 (sha256->buf[7], sha256->digest, 28);
+}
+
+#undef PUT_UINT32
+#undef GET_UINT32
+
+static gchar *
+sha256_sum_to_string (Sha256sum *sha256)
+{
+  return digest_to_string (sha256->digest, SHA256_DIGEST_LEN);
+}
+
+static void
+sha256_sum_digest (Sha256sum *sha256,
+                   guint8    *digest)
+{
+  gint i;
+
+  for (i = 0; i < SHA256_DIGEST_LEN; i++)
+    digest[i] = sha256->digest[i];
+}
+
+
+/*
+ * Public API
+ */
+
+/**
+ * g_checksum_type_get_length:
+ * @checksum_type: a #GChecksumType
+ *
+ * Gets the length in bytes of digests of type @checksum_type
+ *
+ * Return value: the checksum length, or -1 if @checksum_type is
+ * not supported.
+ * 
+ * Since: 2.16
+ */
+gssize
+g_checksum_type_get_length (GChecksumType checksum_type)
+{
+  gssize len = -1;
+
+  switch (checksum_type)
+    {
+    case G_CHECKSUM_MD5:
+      len = MD5_DIGEST_LEN;
+      break;
+    case G_CHECKSUM_SHA1:
+      len = SHA1_DIGEST_LEN;
+      break;
+    case G_CHECKSUM_SHA256:
+      len = SHA256_DIGEST_LEN;
+      break;
+    default:
+      len = -1;
+      break;
+    }
+
+  return len;
+}
+
+/**
+ * g_checksum_new:
+ * @checksum_type: the desired type of checksum
+ *
+ * Creates a new #GChecksum, using the checksum algorithm @checksum_type. 
+ * If the @checksum_type is not known, %NULL is returned.
+ * A #GChecksum can be used to compute the checksum, or digest, of an
+ * arbitrary binary blob, using different hashing algorithms.
+ *
+ * A #GChecksum works by feeding a binary blob through g_checksum_update()
+ * until there is data to be checked; the digest can then be extracted
+ * using g_checksum_get_string(), which will return the checksum as a
+ * hexadecimal string; or g_checksum_get_digest(), which will return a
+ * vector of raw bytes. Once either g_checksum_get_string() or
+ * g_checksum_get_digest() have been called on a #GChecksum, the checksum
+ * will be closed and it won't be possible to call g_checksum_update()
+ * on it anymore.
+ *
+ * Return value: the newly created #GChecksum, or %NULL. 
+ *   Use g_checksum_free() to free the memory allocated by it.
+ *
+ * Since: 2.16
+ */
+GChecksum *
+g_checksum_new (GChecksumType checksum_type)
+{
+  GChecksum *checksum;
+
+  if (! IS_VALID_TYPE (checksum_type))
+    return NULL;
+
+  checksum = g_slice_new0 (GChecksum);
+  checksum->type = checksum_type;
+
+  switch (checksum_type)
+    {
+    case G_CHECKSUM_MD5:
+      md5_sum_init (&(checksum->sum.md5));
+      break;
+    case G_CHECKSUM_SHA1:
+      sha1_sum_init (&(checksum->sum.sha1));
+      break;
+    case G_CHECKSUM_SHA256:
+      sha256_sum_init (&(checksum->sum.sha256));
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+
+  return checksum;
+}
+
+/**
+ * g_checksum_copy:
+ * @checksum: the #GChecksum to copy
+ *
+ * Copies a #GChecksum. If @checksum has been closed, by calling
+ * g_checksum_get_string() or g_checksum_get_digest(), the copied
+ * checksum will be closed as well.
+ *
+ * Return value: the copy of the passed #GChecksum. Use g_checksum_free()
+ *   when finished using it.
+ *
+ * Since: 2.16
+ */
+GChecksum *
+g_checksum_copy (const GChecksum *checksum)
+{
+  GChecksum *copy;
+
+  g_return_val_if_fail (checksum != NULL, NULL);
+
+  copy = g_slice_new (GChecksum);
+  *copy = *checksum;
+
+  copy->digest_str = g_strdup (checksum->digest_str);
+
+  return copy;
+}
+
+/**
+ * g_checksum_free:
+ * @checksum: a #GChecksum
+ *
+ * Frees the memory allocated for @checksum.
+ *
+ * Since: 2.16
+ */
+void
+g_checksum_free (GChecksum *checksum)
+{
+  if (G_LIKELY (checksum))
+    {
+      g_free (checksum->digest_str);
+
+      g_slice_free (GChecksum, checksum);
+    }
+}
+
+/**
+ * g_checksum_update:
+ * @checksum: a #GChecksum
+ * @data: buffer used to compute the checksum
+ * @length: size of the buffer, or -1 if it is a null-terminated string.
+ *
+ * Feeds @data into an existing #GChecksum. The checksum must still be
+ * open, that is g_checksum_get_string() or g_checksum_get_digest() must
+ * not have been called on @checksum.
+ *
+ * Since: 2.16
+ */
+void
+g_checksum_update (GChecksum    *checksum,
+                   const guchar *data,
+                   gssize        length)
+{
+  g_return_if_fail (checksum != NULL);
+  g_return_if_fail (data != NULL);
+
+  if (length < 0)
+    length = strlen ((gchar *)data);
+
+  if (checksum->digest_str)
+    {
+      g_warning ("The checksum `%s' has been closed and cannot be updated "
+                 "anymore.",
+                 checksum->digest_str);
+      return;
+    }
+
+  switch (checksum->type)
+    {
+    case G_CHECKSUM_MD5:
+      md5_sum_update (&(checksum->sum.md5), data, length);
+      break;
+    case G_CHECKSUM_SHA1:
+      sha1_sum_update (&(checksum->sum.sha1), data, length);
+      break;
+    case G_CHECKSUM_SHA256:
+      sha256_sum_update (&(checksum->sum.sha256), data, length);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+}
+
+/**
+ * g_checksum_get_string:
+ * @checksum: a #GChecksum
+ *
+ * Gets the digest as an hexadecimal string.
+ *
+ * Once this function has been called the #GChecksum can no longer be
+ * updated with g_checksum_update().
+ *
+ * Return value: the hexadecimal representation of the checksum. The
+ *   returned string is owned by the checksum and should not be modified
+ *   or freed.
+ * 
+ * Since: 2.16
+ */
+G_CONST_RETURN gchar *
+g_checksum_get_string (GChecksum *checksum)
+{
+  gchar *str = NULL;
+
+  g_return_val_if_fail (checksum != NULL, NULL);
+  
+  if (checksum->digest_str)
+    return checksum->digest_str;
+
+  switch (checksum->type)
+    {
+    case G_CHECKSUM_MD5:
+      md5_sum_close (&(checksum->sum.md5));
+      str = md5_sum_to_string (&(checksum->sum.md5));
+      break;
+    case G_CHECKSUM_SHA1:
+      sha1_sum_close (&(checksum->sum.sha1));
+      str = sha1_sum_to_string (&(checksum->sum.sha1));
+      break;
+    case G_CHECKSUM_SHA256:
+      sha256_sum_close (&(checksum->sum.sha256));
+      str = sha256_sum_to_string (&(checksum->sum.sha256));
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+
+  checksum->digest_str = str;
+
+  return checksum->digest_str;
+}
+
+/**
+ * g_checksum_get_digest:
+ * @checksum: a #GChecksum
+ * @buffer: output buffer
+ * @digest_len: an inout parameter. The caller initializes it to the size of @buffer.
+ *   After the call it contains the length of the digest.
+ *
+ * Gets the digest from @checksum as a raw binary vector and places it
+ * into @buffer. The size of the digest depends on the type of checksum.
+ *
+ * Once this function has been called, the #GChecksum is closed and can
+ * no longer be updated with g_checksum_update().
+ *
+ * Since: 2.16
+ */
+void
+g_checksum_get_digest (GChecksum  *checksum,
+                       guint8     *buffer,
+                       gsize      *digest_len)
+{
+  gboolean checksum_open = FALSE;
+  gchar *str = NULL;
+  gsize len;
+
+  g_return_if_fail (checksum != NULL);
+
+  len = g_checksum_type_get_length (checksum->type);
+  g_return_if_fail (*digest_len >= len);
+
+  checksum_open = !!(checksum->digest_str == NULL);
+
+  switch (checksum->type)
+    {
+    case G_CHECKSUM_MD5:
+      if (checksum_open)
+        {
+          md5_sum_close (&(checksum->sum.md5));
+          str = md5_sum_to_string (&(checksum->sum.md5));
+        }
+      md5_sum_digest (&(checksum->sum.md5), buffer);
+      break;
+    case G_CHECKSUM_SHA1:
+      if (checksum_open)
+        {
+          sha1_sum_close (&(checksum->sum.sha1));
+          str = sha1_sum_to_string (&(checksum->sum.sha1));
+        }
+      sha1_sum_digest (&(checksum->sum.sha1), buffer);
+      break;
+    case G_CHECKSUM_SHA256:
+      if (checksum_open)
+        {
+          sha256_sum_close (&(checksum->sum.sha256));
+          str = sha256_sum_to_string (&(checksum->sum.sha256));
+        }
+      sha256_sum_digest (&(checksum->sum.sha256), buffer);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+
+  if (str)
+    checksum->digest_str = str;
+
+  *digest_len = len;
+}
+
+/**
+ * g_compute_checksum_for_data:
+ * @checksum_type: a #GChecksumType
+ * @data: binary blob to compute the digest of
+ * @length: length of @data
+ *
+ * Computes the checksum for a binary @data of @length. This is a
+ * convenience wrapper for g_checksum_new(), g_checksum_get_string()
+ * and g_checksum_free().
+ *
+ * Return value: the digest of the binary data as a string in hexadecimal.
+ *   The returned string should be freed with g_free() when done using it.
+ *
+ * Since: 2.16
+ */
+gchar *
+g_compute_checksum_for_data (GChecksumType  checksum_type,
+                             const guchar  *data,
+                             gsize          length)
+{
+  GChecksum *checksum;
+  gchar *retval;
+
+  g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
+  g_return_val_if_fail (data != NULL, NULL);
+  g_return_val_if_fail (length > 1, NULL);
+
+  checksum = g_checksum_new (checksum_type);
+  if (!checksum)
+    return NULL;
+
+  g_checksum_update (checksum, data, length);
+  retval = g_strdup (g_checksum_get_string (checksum));
+  g_checksum_free (checksum);
+
+  return retval;
+}
+
+/**
+ * g_compute_checksum_for_string:
+ * @checksum_type: a #GChecksumType
+ * @str: the string to compute the checksum of
+ * @length: the length of the string, or -1 if the string is null-terminated.
+ *
+ * Computes the checksum of a string.
+ *
+ * Return value: the checksum as a hexadecimal string. The returned string
+ *   should be freed with g_free() when done using it.
+ *
+ * Since: 2.16
+ */
+gchar *
+g_compute_checksum_for_string (GChecksumType  checksum_type,
+                               const gchar   *str,
+                               gssize         length)
+{
+  g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
+  g_return_val_if_fail (str != NULL, NULL);
+
+  if (length < 0)
+    length = strlen (str);
+
+  return g_compute_checksum_for_data (checksum_type, (const guchar *) str, length);
+}

Copied: libgpod/trunk/src/gchecksum.h (from rev 340, libgpod/branches/upstream/current/src/gchecksum.h)
===================================================================
--- libgpod/trunk/src/gchecksum.h	                        (rev 0)
+++ libgpod/trunk/src/gchecksum.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,72 @@
+/* gchecksum.h - data hashing functions
+ *
+ * Copyright (C) 2007  Emmanuele Bassi  <ebassi at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __G_CHECKSUM_H__
+#define __G_CHECKSUM_H__
+
+#include <glib/gtypes.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GChecksumType:
+ * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
+ * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
+ * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
+ *
+ * The hashing algorithm to be used by #GChecksum when performing the
+ * digest of some data.
+ *
+ * Note that the #GChecksumType enumeration may be extended at a later 
+ * date to include new hashing algorithm types. 
+ *
+ * Since: 2.16
+ */
+typedef enum {
+  G_CHECKSUM_MD5,
+  G_CHECKSUM_SHA1,
+  G_CHECKSUM_SHA256
+} GChecksumType;
+
+typedef struct _GChecksum       GChecksum;
+
+gssize                g_checksum_type_get_length (GChecksumType checksum_type);
+
+GChecksum *           g_checksum_new        (GChecksumType     checksum_type);
+GChecksum *           g_checksum_copy       (const GChecksum  *checksum);
+void                  g_checksum_free       (GChecksum        *checksum);
+void                  g_checksum_update     (GChecksum        *checksum,
+                                             const guchar     *data,
+                                             gssize            length);
+G_CONST_RETURN gchar *g_checksum_get_string (GChecksum        *checksum);
+void                  g_checksum_get_digest (GChecksum        *checksum,
+                                             guint8           *buffer,
+                                             gsize            *digest_len);
+
+gchar *g_compute_checksum_for_data   (GChecksumType  checksum_type,
+                                      const guchar  *data,
+                                      gsize          length);
+gchar *g_compute_checksum_for_string (GChecksumType  checksum_type,
+                                      const gchar   *str,
+                                      gssize         length);
+
+G_END_DECLS
+
+#endif /* __G_CHECKSUM_H__ */

Modified: libgpod/trunk/src/itdb.h
===================================================================
--- libgpod/trunk/src/itdb.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -29,7 +29,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb.h 1753 2007-11-04 00:48:12Z jcsjcs $
+|  $Id: itdb.h 2193 2009-01-03 02:58:02Z tmzullinger $
 */
 
 #ifndef __ITUNESDB_H__
@@ -50,13 +50,29 @@
 #define G_GNUC_INTERNAL
 #endif 
 
+/**
+ * ItdbUserDataDestroyFunc:
+ * @userdata: A #gpointer to user data
+ *
+ * Function called to free userdata
+ */
 typedef void (* ItdbUserDataDestroyFunc) (gpointer userdata);
+
+/**
+ * ItdbUserDataDuplicateFunc:
+ * @userdata: A #gpointer to user data
+ *
+ * Function called to duplicate userdata
+ *
+ * Returns: A #gpointer
+ */
 typedef gpointer (* ItdbUserDataDuplicateFunc) (gpointer userdata);
 
 /* public structures */
 typedef struct _Itdb_Device Itdb_Device;
 typedef struct _Itdb_IpodInfo Itdb_IpodInfo;
 typedef struct _Itdb_Artwork Itdb_Artwork;
+typedef struct _Itdb_ArtworkFormat Itdb_ArtworkFormat;
 typedef struct _Itdb_Thumb Itdb_Thumb;
 typedef struct _Itdb_SPLPref Itdb_SPLPref;
 typedef struct _Itdb_SPLRule Itdb_SPLRule;
@@ -66,6 +82,8 @@
 typedef struct _Itdb_Playlist Itdb_Playlist;
 typedef struct _Itdb_PhotoAlbum Itdb_PhotoAlbum;
 typedef struct _Itdb_Track Itdb_Track;
+typedef struct _Itdb_Chapter Itdb_Chapter;
+typedef struct _Itdb_Chapterdata Itdb_Chapterdata;
 
 
 /* ------------------------------------------------------------ *\
@@ -74,6 +92,38 @@
  *
 \* ------------------------------------------------------------ */
 
+/**
+ * Itdb_IpodGeneration:
+ * @ITDB_IPOD_GENERATION_UNKNOWN:   Unknown iPod
+ * @ITDB_IPOD_GENERATION_FIRST:     First Generation iPod
+ * @ITDB_IPOD_GENERATION_SECOND:    Second Generation iPod
+ * @ITDB_IPOD_GENERATION_THIRD:     Third Generation iPod
+ * @ITDB_IPOD_GENERATION_FOURTH:    Fourth Generation iPod
+ * @ITDB_IPOD_GENERATION_PHOTO:     Photo iPod
+ * @ITDB_IPOD_GENERATION_MOBILE:    Mobile iPod
+ * @ITDB_IPOD_GENERATION_MINI_1:    First Generation iPod Mini
+ * @ITDB_IPOD_GENERATION_MINI_2:    Second Generation iPod Mini
+ * @ITDB_IPOD_GENERATION_SHUFFLE_1: First Generation iPod Shuffle
+ * @ITDB_IPOD_GENERATION_SHUFFLE_2: Second Generation iPod Shuffle
+ * @ITDB_IPOD_GENERATION_SHUFFLE_3: Third Generation iPod Shuffle
+ * @ITDB_IPOD_GENERATION_NANO_1:    First Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_NANO_2:    Second Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_NANO_3:    Third Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_NANO_4:    Fourth Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_VIDEO_1:   First Generation iPod Video (aka 5g)
+ * @ITDB_IPOD_GENERATION_VIDEO_2:   Second Generation iPod Video (aka 5.5g)
+ * @ITDB_IPOD_GENERATION_CLASSIC_1: First Generation iPod Classic
+ * @ITDB_IPOD_GENERATION_CLASSIC_2: Second Generation iPod Classic
+ * @ITDB_IPOD_GENERATION_TOUCH_1:   First Generation iPod Touch
+ * @ITDB_IPOD_GENERATION_IPHONE_1:  First Generation iPhone
+ *
+ * iPod generation information
+ *
+ * See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod
+ * for more details.
+ *
+ * Since: 0.4.0
+ */
 typedef enum {
     ITDB_IPOD_GENERATION_UNKNOWN,
     ITDB_IPOD_GENERATION_FIRST,
@@ -90,15 +140,59 @@
     ITDB_IPOD_GENERATION_NANO_1,
     ITDB_IPOD_GENERATION_NANO_2,
     ITDB_IPOD_GENERATION_NANO_3,
+    ITDB_IPOD_GENERATION_NANO_4,
     ITDB_IPOD_GENERATION_VIDEO_1,
     ITDB_IPOD_GENERATION_VIDEO_2,
     ITDB_IPOD_GENERATION_CLASSIC_1,
+    ITDB_IPOD_GENERATION_CLASSIC_2,
     ITDB_IPOD_GENERATION_TOUCH_1,
-    /* The following 2 are no longer in use and should be removed */
-    ITDB_IPOD_GENERATION_FIFTH,
-    ITDB_IPOD_GENERATION_SIXTH,
+    ITDB_IPOD_GENERATION_IPHONE_1,
 } Itdb_IpodGeneration;
 
+/**
+ * Itdb_IpodModel:
+ * @ITDB_IPOD_MODEL_INVALID:        Invalid model
+ * @ITDB_IPOD_MODEL_UNKNOWN:        Unknown model
+ * @ITDB_IPOD_MODEL_COLOR:          Color iPod
+ * @ITDB_IPOD_MODEL_COLOR_U2:       Color iPod (U2)
+ * @ITDB_IPOD_MODEL_REGULAR:        Regular iPod
+ * @ITDB_IPOD_MODEL_REGULAR_U2:     Regular iPod (U2)
+ * @ITDB_IPOD_MODEL_MINI:           iPod Mini
+ * @ITDB_IPOD_MODEL_MINI_BLUE:      iPod Mini (Blue)
+ * @ITDB_IPOD_MODEL_MINI_PINK:      iPod Mini (Pink)
+ * @ITDB_IPOD_MODEL_MINI_GREEN:     iPod Mini (Green)
+ * @ITDB_IPOD_MODEL_MINI_GOLD:      iPod Mini (Gold)
+ * @ITDB_IPOD_MODEL_SHUFFLE:        iPod Shuffle
+ * @ITDB_IPOD_MODEL_NANO_WHITE:     iPod Nano (White)
+ * @ITDB_IPOD_MODEL_NANO_BLACK:     iPod Nano (Black)
+ * @ITDB_IPOD_MODEL_VIDEO_WHITE:    iPod Video (White)
+ * @ITDB_IPOD_MODEL_VIDEO_BLACK:    iPod Video (Black)
+ * @ITDB_IPOD_MODEL_MOBILE_1:       Mobile iPod
+ * @ITDB_IPOD_MODEL_VIDEO_U2:       iPod Video (U2)
+ * @ITDB_IPOD_MODEL_NANO_SILVER:    iPod Nano (Silver)
+ * @ITDB_IPOD_MODEL_NANO_BLUE:      iPod Nano (Blue)
+ * @ITDB_IPOD_MODEL_NANO_GREEN:     iPod Nano (Green)
+ * @ITDB_IPOD_MODEL_NANO_PINK:      iPod Nano (Pink)
+ * @ITDB_IPOD_MODEL_NANO_RED:       iPod Nano (Red)
+ * @ITDB_IPOD_MODEL_NANO_YELLOW:    iPod Nano (Yellow)
+ * @ITDB_IPOD_MODEL_NANO_PURPLE:    iPod Nano (Purple)
+ * @ITDB_IPOD_MODEL_NANO_ORANGE:    iPod Nano (Orange)
+ * @ITDB_IPOD_MODEL_IPHONE_1:       iPhone
+ * @ITDB_IPOD_MODEL_SHUFFLE_SILVER: iPod Shuffle (Silver)
+ * @ITDB_IPOD_MODEL_SHUFFLE_PINK:   iPod Shuffle (Pink)
+ * @ITDB_IPOD_MODEL_SHUFFLE_BLUE:   iPod Shuffle (Blue)
+ * @ITDB_IPOD_MODEL_SHUFFLE_GREEN:  iPod Shuffle (Green)
+ * @ITDB_IPOD_MODEL_SHUFFLE_ORANGE: iPod Shuffle (Orange)
+ * @ITDB_IPOD_MODEL_SHUFFLE_PURPLE: iPod Shuffle (Purple)
+ * @ITDB_IPOD_MODEL_SHUFFLE_RED:    iPod Shuffle (Red)
+ * @ITDB_IPOD_MODEL_CLASSIC_SILVER: iPod Classic (Silver)
+ * @ITDB_IPOD_MODEL_CLASSIC_BLACK:  iPod Classic (Black)
+ * @ITDB_IPOD_MODEL_TOUCH_BLACK:    iPod Touch (Black)
+ *
+ * iPod model information
+ *
+ * Since: 0.4.0
+ */
 typedef enum {
     ITDB_IPOD_MODEL_INVALID,
     ITDB_IPOD_MODEL_UNKNOWN,
@@ -123,6 +217,9 @@
     ITDB_IPOD_MODEL_NANO_GREEN,
     ITDB_IPOD_MODEL_NANO_PINK,
     ITDB_IPOD_MODEL_NANO_RED,
+    ITDB_IPOD_MODEL_NANO_YELLOW,
+    ITDB_IPOD_MODEL_NANO_PURPLE,
+    ITDB_IPOD_MODEL_NANO_ORANGE,
     ITDB_IPOD_MODEL_IPHONE_1,
     ITDB_IPOD_MODEL_SHUFFLE_SILVER,
     ITDB_IPOD_MODEL_SHUFFLE_PINK,
@@ -130,24 +227,40 @@
     ITDB_IPOD_MODEL_SHUFFLE_GREEN,
     ITDB_IPOD_MODEL_SHUFFLE_ORANGE,
     ITDB_IPOD_MODEL_SHUFFLE_PURPLE,
+    ITDB_IPOD_MODEL_SHUFFLE_RED,
     ITDB_IPOD_MODEL_CLASSIC_SILVER,
     ITDB_IPOD_MODEL_CLASSIC_BLACK,
     ITDB_IPOD_MODEL_TOUCH_BLACK,
 } Itdb_IpodModel;
 
+/**
+ * Itdb_IpodInfo:
+ * @model_number:    The model number.  This is abbreviated.  If the first
+ *                   character is not numeric, it is ommited. e.g.
+ *                   "MA350 -> A350", "M9829 -> 9829"
+ * @capacity:        The iPod's capacity in gigabytes
+ * @ipod_model:      The iPod model
+ * @ipod_generation: The iPod generation
+ * @musicdirs:       The number of music (Fnn) dirs created by iTunes. The
+ *                   exact number seems to be version dependent. Therefore, the
+ *                   numbers here represent a mixture of reported values and
+ *                   common sense.  Note: this number does not necessarily
+ *                   represent the number of dirs present on a particular iPod.
+ *                   It is used when setting up a new iPod from scratch.
+ * @reserved_int1:   Reserved for future use
+ * @reserved_int2:   Reserved for future use
+ * @reserved1:       Reserved for future use
+ * @reserved2:       Reserved for future use
+ *
+ * Structure representing information about an iPod
+ *
+ * Since: 0.4.0
+ */
 struct _Itdb_IpodInfo {
-    /* model_number is abbreviated: if the first character is not
-       numeric, it is ommited. e.g. "MA350 -> A350", "M9829 -> 9829" */
     const gchar *model_number;
-    const double capacity;  /* in GB */
+    const double capacity;
     const Itdb_IpodModel ipod_model;
     const Itdb_IpodGeneration ipod_generation;
-    /* Number of music (Fnn) dirs created by iTunes. The exact number
-       seems to be version dependent. Therefore, the numbers here
-       represent a mixture of reported values and common sense. Note:
-       this number does not necessarily represent the number of dirs
-       present on a particular iPod. It is used when setting up a new
-       iPod from scratch. */
     const guint musicdirs;
     /* reserved for future use */
     const gint32 reserved_int1;
@@ -170,17 +283,51 @@
    copy. Further, all enums and #defines below, Itdb_SPLRule, Itdb_SPLRules, and
    Itdb_SPLPref may also be used under a FreeBSD license. */
 
+/**
+ * ITDB_SPL_STRING_MAXLEN:
+ *
+ * Maximum string length for smart playlists
+ *
+ * Since: 0.5.0
+ */
 #define ITDB_SPL_STRING_MAXLEN 255
+
+/**
+ * ITDB_SPL_DATE_IDENTIFIER:
+ *
+ * Identifier for smart playlist date fields
+ *
+ * Since: 0.5.0
+ */
 #define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
 
 /* Definitions for smart playlists */
-typedef enum { /* types for match_operator */
-    ITDB_SPLMATCH_AND = 0, /* AND rule - all of the rules must be true in
-			 order for the combined rule to be applied */
-    ITDB_SPLMATCH_OR = 1   /* OR rule */
+
+/**
+ * ItdbSPLMatch:
+ * @ITDB_SPLMATCH_AND: Logical AND - all of the rules must be true in order for
+ *                     the combined rule to be applied
+ * @ITDB_SPLMATCH_OR:  Logical OR - any of the rules may be true
+ *
+ * Types for smart playlist rules match_operator
+ */
+typedef enum {
+    ITDB_SPLMATCH_AND = 0,
+    ITDB_SPLMATCH_OR = 1
 } ItdbSPLMatch;
 
-/* Limit Types.. like limit playlist to 100 minutes or to 100 songs */
+/**
+ * ItdbLimitType:
+ * @ITDB_LIMITTYPE_MINUTES: Limit in minutes
+ * @ITDB_LIMITTYPE_MB:      Limit in megabytes
+ * @ITDB_LIMITTYPE_SONGS:   Limit in number of songs
+ * @ITDB_LIMITTYPE_HOURS:   Limit in hours
+ * @ITDB_LIMITTYPE_GB:      Limit in gigabytes
+ *
+ * The type of unit to use when limiting a playlist
+ *
+ * Since: 0.5.0
+ */
 typedef enum {
     ITDB_LIMITTYPE_MINUTES = 0x01,
     ITDB_LIMITTYPE_MB      = 0x02,
@@ -189,19 +336,39 @@
     ITDB_LIMITTYPE_GB      = 0x05
 } ItdbLimitType;
 
-/* Limit Sorts.. Like which songs to pick when using a limit type
-   Special note: the values for ITDB_LIMITSORT_LEAST_RECENTLY_ADDED,
-   ITDB_LIMITSORT_LEAST_OFTEN_PLAYED, ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED, and
-   ITDB_LIMITSORT_LOWEST_RATING are really 0x10, 0x14, 0x15, 0x17, with the
-   'limitsort_opposite' flag set.  This is the same value as the
-   "positive" value (i.e. ITDB_LIMITSORT_LEAST_RECENTLY_ADDED), and is
-   really very terribly awfully weird, so we map the values to iPodDB
-   specific values with the high bit set.
-
-   On writing, we check the high bit and write the limitsort_opposite
-   from that. That way, we don't have to deal with programs using the
-   class needing to set the wrong limit and then make it into the
-   "opposite", which would be frickin' annoying. */
+/**
+ * ItdbLimitSort:
+ * @ITDB_LIMITSORT_RANDOM:                Sort randomly
+ * @ITDB_LIMITSORT_SONG_NAME:             Sort by track name
+ * @ITDB_LIMITSORT_ALBUM:                 Sort by album name
+ * @ITDB_LIMITSORT_ARTIST:                Sort by artist name
+ * @ITDB_LIMITSORT_GENRE:                 Sort by genre
+ * @ITDB_LIMITSORT_MOST_RECENTLY_ADDED:   Sort by most recently added
+ * @ITDB_LIMITSORT_LEAST_RECENTLY_ADDED:  Sort by least recently added
+ * @ITDB_LIMITSORT_MOST_OFTEN_PLAYED:     Sort by most often played
+ * @ITDB_LIMITSORT_LEAST_OFTEN_PLAYED:    Sort by least often played
+ * @ITDB_LIMITSORT_MOST_RECENTLY_PLAYED:  Sort by most recently played
+ * @ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED: Sort by least recently played
+ * @ITDB_LIMITSORT_HIGHEST_RATING:        Sort by highest rating
+ * @ITDB_LIMITSORT_LOWEST_RATING:         Sort by lowest rating
+ *
+ * Which songs to pick when using a limit type
+ *
+ * Note: the values for #ITDB_LIMITSORT_LEAST_RECENTLY_ADDED,
+ * #ITDB_LIMITSORT_LEAST_OFTEN_PLAYED, #ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED,
+ * and #ITDB_LIMITSORT_LOWEST_RATING are really 0x10, 0x14, 0x15, 0x17, with the
+ * 'limitsort_opposite' flag set.  This is the same value as the "positive"
+ * value (i.e. #ITDB_LIMITSORT_LEAST_RECENTLY_ADDED), and is really very
+ * terribly awfully weird, so we map the values to iPodDB specific values with
+ * the high bit set.
+ *
+ * On writing, we check the high bit and write the limitsort_opposite from that.
+ * That way, we don't have to deal with programs using the class needing to set
+ * the wrong limit and then make it into the "opposite", which would be frickin'
+ * annoying.
+ *
+ * Since: 0.5.0
+ */
 typedef enum {
     ITDB_LIMITSORT_RANDOM = 0x02,
     ITDB_LIMITSORT_SONG_NAME = 0x03,
@@ -218,28 +385,57 @@
     ITDB_LIMITSORT_LOWEST_RATING = 0x80000017,        /* See note above */
 } ItdbLimitSort;
 
-/* Smartlist Actions - Used in the rules.
-Note by Otto (Samuel Wood):
- really this is a bitmapped field...
- high byte
- bit 0 = "string" values if set, "int" values if not set
- bit 1 = "not", or to negate the check.
- lower 2 bytes
- bit 0 = simple "IS" query
- bit 1 = contains
- bit 2 = begins with
- bit 3 = ends with
- bit 4 = greater than
- bit 5 = unknown, but probably greater than or equal to
- bit 6 = less than
- bit 7 = unknown, but probably less than or equal to
- bit 8 = a range selection
- bit 9 = "in the last"
+/**
+ * ItdbSPLAction:
+ * @ITDB_SPLACTION_IS_INT:              is integer ("Is Set" in iTunes)
+ * @ITDB_SPLACTION_IS_GREATER_THAN:     is greater than ("Is after" in iTunes)
+ * @ITDB_SPLACTION_IS_LESS_THAN:        is less than ("Is Before" in iTunes)
+ * @ITDB_SPLACTION_IS_IN_THE_RANGE:     is in the range
+ * @ITDB_SPLACTION_IS_IN_THE_LAST:      is in the last
+ * @ITDB_SPLACTION_BINARY_AND:          binary AND
+ * @ITDB_SPLACTION_IS_STRING:           is a string
+ * @ITDB_SPLACTION_CONTAINS:            contains
+ * @ITDB_SPLACTION_STARTS_WITH:         starts with
+ * @ITDB_SPLACTION_ENDS_WITH:           ends with
+ * @ITDB_SPLACTION_IS_NOT_INT:          is not an integer ("Is Not Set" in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_GREATER_THAN: is not greater than (not in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_LESS_THAN:    is not less than (not in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_IN_THE_RANGE: is not in the range (not in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_IN_THE_LAST:  is not in the last
+ * @ITDB_SPLACTION_IS_NOT:              is not
+ * @ITDB_SPLACTION_DOES_NOT_CONTAIN:    does not contain
+ * @ITDB_SPLACTION_DOES_NOT_START_WITH: does not start with (not in iTunes)
+ * @ITDB_SPLACTION_DOES_NOT_END_WITH:   does not end with (not in iTunes)
+ *
+ * Smartlist Actions used in smart playlist rules.
+ *
+ * Note by Otto (Samuel Wood):
+ * <informalexample>
+ *  <programlisting>
+ *  really this is a bitmapped field...
+ *  high byte
+ *  bit 0 = "string" values if set, "int" values if not set
+ *  bit 1 = "not", or to negate the check.
+ *  lower 2 bytes
+ *  bit 0 = simple "IS" query
+ *  bit 1 = contains
+ *  bit 2 = begins with
+ *  bit 3 = ends with
+ *  bit 4 = greater than
+ *  bit 5 = unknown, but probably greater than or equal to
+ *  bit 6 = less than
+ *  bit 7 = unknown, but probably less than or equal to
+ *  bit 8 = a range selection
+ *  bit 9 = "in the last"
+ *  </programlisting>
+ * </informalexample>
+ *
+ * Since: 0.5.0
 */
 typedef enum {
-    ITDB_SPLACTION_IS_INT = 0x00000001,          /* "Is Set" in iTunes */
-    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010, /* "Is After" in iTunes */
-    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,    /* "Is Before" in iTunes */
+    ITDB_SPLACTION_IS_INT = 0x00000001,
+    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010,
+    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,
     ITDB_SPLACTION_IS_IN_THE_RANGE = 0x00000100,
     ITDB_SPLACTION_IS_IN_THE_LAST = 0x00000200,
     ITDB_SPLACTION_BINARY_AND = 0x00000400,
@@ -249,25 +445,32 @@
     ITDB_SPLACTION_STARTS_WITH = 0x01000004,
     ITDB_SPLACTION_ENDS_WITH = 0x01000008,
 
-    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,     /* "Is Not Set" in iTunes */
-
-    /* Note: Not available in iTunes 4.5 (untested on iPod) */
+    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,
     ITDB_SPLACTION_IS_NOT_GREATER_THAN = 0x02000010,
-    /* Note: Not available in iTunes 4.5 (untested on iPod) */
     ITDB_SPLACTION_IS_NOT_LESS_THAN = 0x02000040,
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_IS_NOT_IN_THE_RANGE = 0x02000100,
+    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
 
-    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
     ITDB_SPLACTION_IS_NOT = 0x03000001,
     ITDB_SPLACTION_DOES_NOT_CONTAIN = 0x03000002,
-
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_DOES_NOT_START_WITH = 0x03000004,
-    /* Note: Not available in iTunes 4.5 (seems to work on iPod) */
     ITDB_SPLACTION_DOES_NOT_END_WITH = 0x03000008,
 } ItdbSPLAction;
 
+/**
+ * ItdbSPLFieldType:
+ * @ITDB_SPLFT_STRING:      string
+ * @ITDB_SPLFT_INT:         integer
+ * @ITDB_SPLFT_BOOLEAN:     boolean
+ * @ITDB_SPLFT_DATE:        date
+ * @ITDB_SPLFT_PLAYLIST:    playlist
+ * @ITDB_SPLFT_UNKNOWN:     unknown
+ * @ITDB_SPLFT_BINARY_AND:  binary AND
+ *
+ * Smart Playlist Field Types
+ *
+ * Since: 0.5.0
+ */
 typedef enum
 {
     ITDB_SPLFT_STRING = 1,
@@ -279,6 +482,24 @@
     ITDB_SPLFT_BINARY_AND
 } ItdbSPLFieldType;
 
+/**
+ * ItdbSPLActionType:
+ * @ITDB_SPLAT_STRING:      string
+ * @ITDB_SPLAT_INT:         from integer
+ * @ITDB_SPLAT_DATE:        from date ...
+ * @ITDB_SPLAT_RANGE_INT:   an integer range ...
+ * @ITDB_SPLAT_RANGE_DATE:  a date range ...
+ * @ITDB_SPLAT_INTHELAST:   in the last ...
+ * @ITDB_SPLAT_PLAYLIST:    in playlist
+ * @ITDB_SPLAT_NONE:        none
+ * @ITDB_SPLAT_INVALID:     invalid
+ * @ITDB_SPLAT_UNKNOWN:     unknown
+ * @ITDB_SPLAT_BINARY_AND:  is / is not (binary AND)
+ *
+ * Smart Playlist Action Types
+ *
+ * Since: 0.5.0
+ */
 typedef enum
 {
     ITDB_SPLAT_STRING = 1,
@@ -295,14 +516,23 @@
 } ItdbSPLActionType;
 
 
-/* These are to pass to AddRule() when you need a unit for the two "in
-   the last" action types Or, in theory, you can use any time
-   range... iTunes might not like it, but the iPod shouldn't care. */
+/**
+ * ItdbSPLActionLast:
+ * @ITDB_SPLACTION_LAST_DAYS_VALUE:   Seconds in 24 hours
+ * @ITDB_SPLACTION_LAST_WEEKS_VALUE:  Seconds in 7 days
+ * @ITDB_SPLACTION_LAST_MONTHS_VALUE: Seconds in 1 month (approximately)
+ *
+ * These are to pass to AddRule() when you need a unit for the two "in the last"
+ * action types.  In theory, you can use any time range.  iTunes might not
+ * like it, but the iPod shouldn't care.
+ *
+ * Since: 0.5.0
+ */
 typedef enum {
     ITDB_SPLACTION_LAST_DAYS_VALUE = 86400,    /* nr of secs in 24 hours */
     ITDB_SPLACTION_LAST_WEEKS_VALUE = 604800,  /* nr of secs in 7 days   */
     ITDB_SPLACTION_LAST_MONTHS_VALUE = 2628000,/* nr of secs in 30.4167
-					     days ~= 1 month */
+						  days ~= 1 month */
 } ItdbSPLActionLast;
 
 #if 0
@@ -324,84 +554,161 @@
 #define ITDB_SPLACTION_LAST_SIDEREAL_YEAR 	31558150	// a "sidereal year" is the time it takes the earth to reach the same point in space again, compared to the stars
 #endif
 
-/* Smartlist fields - Used for rules. */
+/**
+ * ItdbSPLField:
+ * @ITDB_SPLFIELD_SONG_NAME:        Song name (string)
+ * @ITDB_SPLFIELD_ALBUM:            Album (string)
+ * @ITDB_SPLFIELD_ARTIST:           Artist (string)
+ * @ITDB_SPLFIELD_BITRATE:          Bitrate (integer, e.g. from/to = 128)
+ * @ITDB_SPLFIELD_SAMPLE_RATE:      Sample rate (integer, e.g. from/to = 44100)
+ * @ITDB_SPLFIELD_YEAR:             Year (integer, e.g. from/to = 2004)
+ * @ITDB_SPLFIELD_GENRE:            Genre (string)
+ * @ITDB_SPLFIELD_KIND:             File type (string, e.g. MP3-File)
+ * @ITDB_SPLFIELD_DATE_MODIFIED:    Date modified (integer, e.g.
+ *                                  from/to = bcf93280 == is before 6/19/2004)
+ * @ITDB_SPLFIELD_TRACKNUMBER:      Track number (integer, e.g. from/to = 2)
+ * @ITDB_SPLFIELD_SIZE:             Size (integer, e.g.
+ *                                  from/to = 0x00600000 for 6MB)
+ * @ITDB_SPLFIELD_TIME:             Time (integer, e.g.
+ *                                  from/to = 83999 for 1:23/83 seconds)
+ * @ITDB_SPLFIELD_COMMENT:          Comment (string)
+ * @ITDB_SPLFIELD_DATE_ADDED:       Date added (integer, e.g.
+ *                                  from/to = bcfa83ff == is after 6/19/2004)
+ * @ITDB_SPLFIELD_COMPOSER:         Composer (string)
+ * @ITDB_SPLFIELD_PLAYCOUNT:        Playcount (integer, e.g. from/to = 1)
+ * @ITDB_SPLFIELD_LAST_PLAYED:      Date last played (integer, e.g.
+ *                                  from = bcfa83ff (6/19/2004)
+ *                                  to = 0xbcfbd57f (6/20/2004))
+ * @ITDB_SPLFIELD_DISC_NUMBER:      Disc number (integer, e.g. from/to = 1)
+ * @ITDB_SPLFIELD_RATING:           Rating (integer, e.g.
+ *                                  from/to = 60 (3 stars))
+ * @ITDB_SPLFIELD_COMPILATION:      Compilation (integer, e.g.
+ *                                  is set -> ITDB_SPLACTION_IS_INT/from=1,
+ *                                  not set -> ITDB_SPLACTION_IS_NOT_INT/from=1)
+ * @ITDB_SPLFIELD_BPM:              Beats per minute (integer, e.g.
+ *                                  from/to = 60)
+ * @ITDB_SPLFIELD_GROUPING:         Grouping (string)
+ * @ITDB_SPLFIELD_PLAYLIST:         FIXME Unknown...not parsed correctly...
+ *                                  from/to = 0xb6fbad5f for "Purchased Music".
+ *                                  Extra data after "to"...
+ * @ITDB_SPLFIELD_VIDEO_KIND:       Logical integer (works on mediatype)
+ * @ITDB_SPLFIELD_TVSHOW:           TV Show (string)
+ * @ITDB_SPLFIELD_SEASON_NR:        Season number (integer)
+ * @ITDB_SPLFIELD_SKIPCOUNT:        Skipcount (integer)
+ * @ITDB_SPLFIELD_LAST_SKIPPED:     Last skipped (integer)
+ * @ITDB_SPLFIELD_ALBUMARTIST:      Album artist (string)
+ *
+ * Smart Playlist Fields, used for Smart Playlist Rules (#Itdb_SPLRule).
+ *
+ * Since: 0.5.0
+ */
 typedef enum {
-    ITDB_SPLFIELD_SONG_NAME = 0x02,    /* String */
-    ITDB_SPLFIELD_ALBUM = 0x03,        /* String */
-    ITDB_SPLFIELD_ARTIST = 0x04,       /* String */
-    ITDB_SPLFIELD_BITRATE = 0x05,      /* Int (e.g. from/to = 128) */
-    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,  /* Int  (e.g. from/to = 44100) */
-    ITDB_SPLFIELD_YEAR = 0x07,         /* Int  (e.g. from/to = 2004) */
-    ITDB_SPLFIELD_GENRE = 0x08,        /* String */
-    ITDB_SPLFIELD_KIND = 0x09,         /* String */
-    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,/* Int (e.g. from/to = bcf93280 ==
-				     is before 6/19/2004)*/
-    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,  /* Int (e.g. from = 1, to = 2) */
-    ITDB_SPLFIELD_SIZE = 0x0c,         /* Int (e.g. from/to = 0x00600000
-				     for 6MB) */
-    ITDB_SPLFIELD_TIME = 0x0d,         /* Int (e.g. from/to = 83999 for
-				     1:23/83 seconds) */
-    ITDB_SPLFIELD_COMMENT = 0x0e,      /* String */
-    ITDB_SPLFIELD_DATE_ADDED = 0x10,   /* Int (e.g. from/to = bcfa83ff ==
-				     is after 6/19/2004) */
-    ITDB_SPLFIELD_COMPOSER = 0x12,     /* String */
-    ITDB_SPLFIELD_PLAYCOUNT = 0x16,    /* Int  (e.g. from/to = 1) */
-    ITDB_SPLFIELD_LAST_PLAYED = 0x17,  /* Int/ (e.g. from = bcfa83ff (6/19/2004)
-				     to = 0xbcfbd57f (6/20/2004)) */
-    ITDB_SPLFIELD_DISC_NUMBER = 0x18,  /* Int  (e.g. from/to = 1) */
-    ITDB_SPLFIELD_RATING = 0x19,       /* Int/Stars Rating (e.g. from/to =
-                                     60 (3 stars)) */
-    ITDB_SPLFIELD_COMPILATION = 0x1f,  /* Int (e.g. is set ->
-				     ITDB_SPLACTION_IS_INT/from=1,
-				     is not set ->
-				     ITDB_SPLACTION_IS_NOT_INT/from=1) */
-    ITDB_SPLFIELD_BPM = 0x23,          /* Int  (e.g. from/to = 60) */
-    ITDB_SPLFIELD_GROUPING = 0x27,     /* String */
-    ITDB_SPLFIELD_PLAYLIST = 0x28,     /* FIXME - Unknown...not parsed
-				     correctly...from/to = 0xb6fbad5f
-				     for "Purchased Music".  Extra
-				     data after "to"... */
-    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,   /* Logic Int */
-    ITDB_SPLFIELD_TVSHOW = 0x3e,       /* String */
-    ITDB_SPLFIELD_SEASON_NR = 0x3f,    /* Int */
-    ITDB_SPLFIELD_SKIPCOUNT = 0x44,    /* Int */
-    ITDB_SPLFIELD_LAST_SKIPPED = 0x45, /* Int */
-    ITDB_SPLFIELD_ALBUMARTIST = 0x47   /* String */
+    ITDB_SPLFIELD_SONG_NAME = 0x02,
+    ITDB_SPLFIELD_ALBUM = 0x03,
+    ITDB_SPLFIELD_ARTIST = 0x04,
+    ITDB_SPLFIELD_BITRATE = 0x05,
+    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,
+    ITDB_SPLFIELD_YEAR = 0x07,
+    ITDB_SPLFIELD_GENRE = 0x08,
+    ITDB_SPLFIELD_KIND = 0x09,
+    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,
+    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,
+    ITDB_SPLFIELD_SIZE = 0x0c,
+    ITDB_SPLFIELD_TIME = 0x0d,
+    ITDB_SPLFIELD_COMMENT = 0x0e,
+    ITDB_SPLFIELD_DATE_ADDED = 0x10,
+    ITDB_SPLFIELD_COMPOSER = 0x12,
+    ITDB_SPLFIELD_PLAYCOUNT = 0x16,
+    ITDB_SPLFIELD_LAST_PLAYED = 0x17,
+    ITDB_SPLFIELD_DISC_NUMBER = 0x18,
+    ITDB_SPLFIELD_RATING = 0x19,
+    ITDB_SPLFIELD_COMPILATION = 0x1f,
+    ITDB_SPLFIELD_BPM = 0x23,
+    ITDB_SPLFIELD_GROUPING = 0x27,
+    ITDB_SPLFIELD_PLAYLIST = 0x28,
+    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,
+    ITDB_SPLFIELD_TVSHOW = 0x3e,
+    ITDB_SPLFIELD_SEASON_NR = 0x3f,
+    ITDB_SPLFIELD_SKIPCOUNT = 0x44,
+    ITDB_SPLFIELD_LAST_SKIPPED = 0x45,
+    ITDB_SPLFIELD_ALBUMARTIST = 0x47
 } ItdbSPLField;
 
+/**
+ * Itdb_SPLPref:
+ * @liveupdate:         Live Updating
+ * @checkrules:         Match this number of rules.  If set to 0, ignore rules.
+ * @checklimits:        Limit to this number of @limittype.  If 0, no limits.
+ * @limittype:          an #ItdbLimitType
+ * @limitsort:          an #ItdbLimitSort
+ * @limitvalue:         The value typed next to "Limit type"
+ * @matchcheckedonly:   Match only checked songs
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ *
+ * Smart Playlist preferences are for various flags that are not strictly smart
+ * playlist "rules."
+ *
+ * Since: 0.5.0
+ */
 struct _Itdb_SPLPref
 {
-    guint8  liveupdate;        /* "live Updating" check box */
-    guint8  checkrules;        /* "Match X of the following
-				  conditions" check box */
-    guint8  checklimits;       /* "Limit To..." check box */
-    guint32 limittype;         /* See types defined above */
-    guint32 limitsort;         /* See types defined above */
-    guint32 limitvalue;        /* The value typed next to "Limit
-				  type" */
-    guint8  matchcheckedonly;  /* "Match only checked songs" check box */
-    /* reserved for future use */
+    guint8  liveupdate;
+    guint8  checkrules;
+    guint8  checklimits;
+    guint32 limittype;
+    guint32 limitsort;
+    guint32 limitvalue;
+    guint8  matchcheckedonly;
     gint32 reserved_int1;
     gint32 reserved_int2;
     gpointer reserved1;
     gpointer reserved2;
 };
 
+/**
+ * Itdb_SPLRule:
+ * @field:          an #ItdbSPLFieldType
+ * @action:         an #ItdbSPLActionType
+ * @string:         data in UTF8
+ * @fromvalue:      from value
+ * @fromdate:       from date
+ * @fromunits:      from units
+ * @tovalue:        to value
+ * @todate:         to date
+ * @tounits:        to units
+ * @unk052:         Unknown
+ * @unk056:         Unknown
+ * @unk060:         Unknown
+ * @unk064:         Unknown
+ * @unk068:         Unknown
+ * @reserved_int1:  Reserved for future use
+ * @reserved_int2:  Reserved for future use
+ * @reserved1:      Reserved for future use
+ * @reserved2:      Reserved for future use
+ *
+ * Smart Playlist Rule
+ *
+ * The from and to fields require some explanation.  If @field is a date type,
+ * then @value would be set to 0x2dae2dae2dae2dae, @date would be a number,
+ * (e.g. 2 or -2), and @units would be a time unit in seconds (e.g. one week
+ * would be 604800).  If @field is an integer comparison, like rating = 60 (i.e.
+ * 3 stars), then @value would be the value we care about (e.g. 60), @date would
+ * be 0, and @units would be 1.  Binary AND types are similar, @value is the
+ * important part, with @date = 0 and @units = 1.  Clear as mud, right?
+ *
+ * For more details see <ulink
+ * url="http://ipodlinux.org/ITunesDB.html&num;Smart_Playlist_Rule_Values">ipodlinux.org</ulink>.
+ *
+ * Since: 0.5.0
+ */
 struct _Itdb_SPLRule
 {
     guint32 field;
     guint32 action;
-    gchar *string;             /* data in UTF8  */
-    /* from and to are pretty stupid.. if it's a date type of field,
-       then
-         value = 0x2dae2dae2dae2dae,
-         date = some number, like 2 or -2
-         units = unit in seconds, like 604800 = a week
-       but if this is actually some kind of integer comparison, like
-       rating = 60 (3 stars)
-         value = the value we care about
-	 date = 0
-	 units = 1 */
+    gchar *string;
     guint64 fromvalue;
     gint64 fromdate;
     guint64 fromunits;
@@ -420,12 +727,25 @@
     gpointer reserved2;
 };
 
-
+/**
+ * Itdb_SPLRules:
+ * @unk004:         Unknown
+ * @match_operator: Whether all rules must match (#ITDB_SPLMATCH_AND) or any
+ *                  rules may match (#ITDB_SPLMATCH_OR)
+ * @rules:          list of #Itdb_SPLRule's
+ * @reserved_int1:  Reserved for future use
+ * @reserved_int2:  Reserved for future use
+ * @reserved1:      Reserved for future use
+ * @reserved2:      Reserved for future use
+ *
+ * Smart Playlist Rules
+ *
+ * Since: 0.5.0
+ */
 struct _Itdb_SPLRules
 {
     guint32 unk004;
-    guint32 match_operator;  /* "All" (logical AND): Itdb_SPLMATCH_AND,
-				"Any" (logical OR): Itdb_SPLMATCH_OR */
+    guint32 match_operator;
     GList *rules;
     /* reserved for future use */
     gint32 reserved_int1;
@@ -435,66 +755,58 @@
 };
 
 
-
 /* ------------------------------------------------------------ *\
  *
- * iTunesDB, Playlists, Tracks, PhotoDB, Artwork, Thumbnails
+ * Chapters
  *
 \* ------------------------------------------------------------ */
 
-/* one star is how much (track->rating) */
-#define ITDB_RATING_STEP 20
+/**
+ * Itdb_Chapter:
+ * @startpos:      The start position of the chapter in ms. The first chapter
+ *                 begins at 1.
+ * @chaptertitle:  The chapter title in UTF8
+ * @reserved_int1: Reserved for future use
+ * @reserved_int2: Reserved for future use
+ * @reserved1:     Reserved for future use
+ * @reserved2:     Reserved for future use
+ *
+ * Structure representing an iTunesDB Chapter
+ *
+ * Since: 0.7.0
+ */
+struct _Itdb_Chapter
+{
+    guint32 startpos;
+    gchar *chaptertitle;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+};
 
-/* Types of thumbnails in Itdb_Image */
-typedef enum { 
-    ITDB_THUMB_COVER_SMALL = 0,
-    ITDB_THUMB_COVER_LARGE,
-    ITDB_THUMB_PHOTO_SMALL,
-    ITDB_THUMB_PHOTO_LARGE,
-    ITDB_THUMB_PHOTO_FULL_SCREEN,
-    ITDB_THUMB_PHOTO_TV_SCREEN,
-    ITDB_THUMB_COVER_XLARGE,      /* iPhone: cover flow */
-    ITDB_THUMB_COVER_MEDIUM,      /* iPhone: cover view */
-    ITDB_THUMB_COVER_SMEDIUM,     /* iPhone: ??         */
-    ITDB_THUMB_COVER_XSMALL,      /* iPhone: ??         */
-} ItdbThumbType;
-
-
-/* The Itdb_Thumb structure can represent two slightly different
-   thumbnails:
-
-  a) a thumbnail before it's transferred to the iPod.
-
-     offset and size are 0
-
-     width and height, if unequal 0, will indicate the size on the
-     iPod. width and height are set the first time a pixbuf is
-     requested for this thumbnail.
-
-     type is set according to the type this thumbnail represents
-
-     filename point to a 'real' image file OR image_data and
-     image_data_len are set.
- 
-  b) a thumbnail (big or small) stored on a database in the iPod.  In
-     these cases, id corresponds to the ID originally used in the
-     database, filename points to a .ithmb file on the iPod
+/**
+ * Itdb_Chapterdata:
+ * @chapters:      A list of chapters (#Itdb_Chapter)
+ * @unk024:        Unknown
+ * @unk028:        Unknown
+ * @unk032:        Unknown
+ * @reserved_int1: Reserved for future use
+ * @reserved_int2: Reserved for future use
+ * @reserved1:     Reserved for future use
+ * @reserved2:     Reserved for future use
+ *
+ * Structure representing iTunesDB Chapter data
+ *
+ * Since: 0.7.0
  */
-struct _Itdb_Thumb {
-    ItdbThumbType type;
-    gchar   *filename;
-    guchar  *image_data;      /* holds the thumbnail data of
-				 non-transfered thumbnails when
-				 filename == NULL */
-    gsize   image_data_len;   /* length of data */
-    gpointer pixbuf;
-    gint    rotation;         /* angle (0, 90, 180, 270) to rotate the image */
-    guint32 offset;
-    guint32 size;
-    gint16  width;
-    gint16  height;
-    gint16  horizontal_padding;
-    gint16  vertical_padding;
+struct _Itdb_Chapterdata
+{
+    GList *chapters;
+    guint32 unk024;
+    guint32 unk028;
+    guint32 unk032;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -502,20 +814,59 @@
     gpointer reserved2;
 };
 
+
+/* ------------------------------------------------------------ *\
+ *
+ * iTunesDB, Playlists, Tracks, PhotoDB, Artwork, Thumbnails
+ *
+\* ------------------------------------------------------------ */
+
+/**
+ * ITDB_RATING_STEP:
+ *
+ * The multiplier for each star in #track->rating
+ */
+#define ITDB_RATING_STEP 20
+
+/**
+ * Itdb_Artwork:
+ * @thumbnail:          An #Itdb_Thumb
+ * @id:                 Artwork id used by photoalbums.  This starts at 0x40 and
+ *                      is set automatically when the ArtworkDB or PhotoDB is
+ *                      written
+ * @dbid:               The dbid of associated track.  Used internally by
+ *                      libgpod.
+ * @unk028:             Unknown
+ * @rating:             Rating from iPhoto * 20 (PhotoDB only)
+ * @unk036:             Unknown
+ * @creation_date:      Date the image file was created (PhotoDB only)
+ * @digitized_date:     Date the image was taken (EXIF information, PhotoDB
+ *                      only)
+ * @artwork_size:       Size in bytes of the original source image (PhotoDB
+ *                      only -- don't touch in case of ArtworkDB!)
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing artwork in an #Itdb_iTunesDB or #Itdb_PhotoDB
+ *
+ * Since: 0.3.0
+ */
 struct _Itdb_Artwork {
-    GList *thumbnails;     /* list of Itdb_Thumbs */
-    guint32 id;            /* Artwork id used by photoalbums, starts at
-			    * 0x40... libgpod will set this on sync. */
+    Itdb_Thumb *thumbnail;
+    guint32 id;
+    guint64 dbid;
     gint32  unk028;
-    guint32 rating;        /* Rating from iPhoto * 20 (PhotoDB only) */
+    guint32 rating;
     gint32  unk036;
-    time_t  creation_date;  /* Date the image file was created
-			      (creation date of image file (PhotoDB only) */
-    time_t  digitized_date;/* Date the image was taken (EXIF information,
-			      PhotoDB only) */
-    guint32 artwork_size;  /* Size in bytes of the original source
-			      image (PhotoDB only -- don't touch in
-			      case of ArtworkDB!) */
+    time_t  creation_date;
+    time_t  digitized_date;
+    guint32 artwork_size;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -529,12 +880,29 @@
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
-
+/**
+ * Itdb_PhotoDB:
+ * @photos:             A list of photos in the database (#Itdb_Artwork)
+ * @photoalbums:        A list of albums in the database (#Itdb_PhotoAlbum)
+ * @device:             iPod device info (#Itdb_Device)
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing an iTunes Photo database
+ *
+ * Since: 0.4.0
+ */
 struct _Itdb_PhotoDB
 {
-    GList *photos;      /* (Itdb_Artwork *)     */
-    GList *photoalbums; /* (Itdb_PhotoAlbum *)  */
-    Itdb_Device *device;/* iPod device info     */
+    GList *photos;
+    GList *photoalbums;
+    Itdb_Device *device;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -548,12 +916,31 @@
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
+/**
+ * Itdb_iTunesDB:
+ * @tracks:             A list of tracks in the database (#Itdb_Track)
+ * @playlists:          A list of playlists in the database (#Itdb_Playlist)
+ * @filename:           The filename of the iTunesDB
+ * @device:             iPod device info (#Itdb_Device)
+ * @version:            The version number of the iTunesDB
+ * @id:                 A 64 bit id value for the iTunesDB
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing an iTunes database
+ */
 struct _Itdb_iTunesDB
 {
     GList *tracks;
     GList *playlists;
-    gchar *filename;    /* filename of iTunesDB */
-    Itdb_Device *device;/* iPod device info     */
+    gchar *filename;
+    Itdb_Device *device;
     guint32 version;
     guint64 id;
     /* reserved for future use */
@@ -569,31 +956,62 @@
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
+/**
+ * Itdb_PhotoAlbum:
+ * @photodb:              A pointer to the #Itdb_PhotoDB (for convenience)
+ * @name:                 The name of photoalbum in UTF8
+ * @members:              A list of photos in album (#Itdb_Artwork)
+ * @album_type:           The album type.  0x01 for master (Photo Library),
+ *                        0x02 for a normal album.  (4 and 5 have also been
+ *                        seen.)
+ * @playmusic:            Play music during slideshow
+ * @repeat:               Repeat the slideshow
+ * @random:               Show slides in random order
+ * @show_titles:          Show slide captions
+ * @transition_direction: Transition direction.  0=none, 1=left-to-right,
+ *                        2=right-to-left, 3=top-to-bottom, 4=bottom-to-top
+ * @slide_duration:       Slide duration in seconds
+ * @transition_duration:  Transition duration, in milliseconds
+ * @song_id:              The @dbid2 of a track to play during slideshow
+ * @unk024:               Unknown, seems to be always 0
+ * @unk028:               Unknown, seems to be always 0
+ * @unk044:               Unknown, seems to always be 0
+ * @unk048:               Unknown, seems to always be 0
+ * @album_id:             The id of the album.  This is set automatically when
+ *                        the PhotoDB is written.
+ * @prev_album_id:        The id of the previous playlist.  This is set
+ *                        automatically when the PhotoDB is written.
+ * @reserved_int1:        Reserved for future use
+ * @reserved_int2:        Reserved for future use
+ * @reserved1:            Reserved for future use
+ * @reserved2:            Reserved for future use
+ * @usertype:             For use by application
+ * @userdata:             For use by application
+ * @userdata_duplicate:   A function to duplicate #userdata
+ * @userdata_destroy:     A function to free #userdata
+ *
+ * Structure representing an iTunes Photo Album
+ *
+ * Since: 0.4.0
+ */
 struct _Itdb_PhotoAlbum
 {
-    gchar *name;                 /* name of photoalbum in UTF8            */
-    GList *members;              /* photos in album (Itdb_Artwork *)      */
-    guint8 album_type;           /* 0x01 for master (Photo Library),
-				    0x02 otherwise (sometimes 4 and 5)    */
-    guint8 playmusic;            /* play music during slideshow (from
-				    iPhoto setting)                       */
-    guint8 repeat;               /* repeat the slideshow (from iPhoto
-				    setting)                              */
-    guint8 random;               /* show the slides in random order
-			            (from iPhoto setting)                 */
-    guint8 show_titles;          /* show slide captions (from iPhoto
-				    setting)                              */
-    guint8 transition_direction; /* 0=none, 1=left-to-right,
-				    2=right-to-left, 3=top-to-bottom,
-				    4=bottom-to-top (from iPhoto setting) */
-    gint32 slide_duration;       /* in seconds (from iPhoto setting)      */
-    gint32 transition_duration;  /* in milliseconds (from iPhoto setting) */
-    gint64 song_id;              /* dbid2 of track in iTunesDB to play
-				    during slideshow (from iPhoto setting)*/
-    gint32 unk024;               /* unknown, seems to be always 0         */
-    gint16 unk028;               /* unknown, seems to be always 0         */
-    gint32 unk044;               /* unknown, seems to always be 0         */
-    gint32 unk048;               /* unknown, seems to always be 0         */
+    Itdb_PhotoDB *photodb;
+    gchar *name;
+    GList *members;
+    guint8 album_type;
+    guint8 playmusic;
+    guint8 repeat;
+    guint8 random;
+    guint8 show_titles;
+    guint8 transition_direction;
+    gint32 slide_duration;
+    gint32 transition_duration;
+    gint64 song_id;
+    gint32 unk024;
+    gint16 unk028;
+    gint32 unk044;
+    gint32 unk048;
     /* set automatically at time of writing the PhotoDB */
     gint32  album_id;
     gint32  prev_album_id;
@@ -610,25 +1028,61 @@
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
+/**
+ * Itdb_Playlist:
+ * @itdb:               A pointer to the #Itdb_iTunesDB (for convenience)
+ * @name:               The name of the playlist in UTF8
+ * @type:               The playlist type (normal or master)
+ * @flag1:              Unknown, usually set to 0
+ * @flag2:              Unknown, always set to 0
+ * @flag3:              Unknown, always set to 0
+ * @num:                The number of tracks in the playlist
+ * @members:            A list of tracks in the playlist (#Itdb_Track)
+ * @is_spl:             True if the playlist is a smart playlist, otherwise
+ *                      false
+ * @timestamp:          When the playlist was created
+ * @id:                 The playlist ID
+ * @sortorder:          The playlist sort order (#ItdbPlaylistSortOrder)
+ * @podcastflag:        This is set to 0 on normal playlists and to 1 for the
+ *                      Podcast playlist. If set to 1, the playlist will not be
+ *                      shown under 'Playlists' on the iPod, but as 'Podcasts'
+ *                      under the Music menu. The actual title of the Playlist
+ *                      does not matter. If more than one playlist is set to 1,
+ *                      they don't show up at all.
+ * @splpref:            Smart playlist preferences (#Itdb_SPLPref)
+ * @splrules:           Smart playlist rules (#Itdb_SPLRules)
+ * @reserved100:        Reserved for MHOD100 implementation
+ * @reserved101:        Reserved for MHOD100 implementation
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing an iTunes Playlist
+ */
 struct _Itdb_Playlist
 {
-    Itdb_iTunesDB *itdb;  /* pointer to iTunesDB (for convenience) */
-    gchar *name;          /* name of playlist in UTF8              */
-    guint8 type;          /* ITDB_PL_TYPE_NORM/_MPL                */
-    guint8 flag1;         /* unknown, usually set to 0             */
-    guint8 flag2;         /* unknown, always set to 0              */
-    guint8 flag3;         /* unknown, always set to 0              */
-    gint  num;            /* number of tracks in playlist          */
-    GList *members;       /* tracks in playlist (Track *)          */
-    gboolean is_spl;      /* smart playlist?                       */
-    time_t timestamp;     /* timestamp of playlist creation        */
-    guint64 id;           /* playlist ID                           */
-    guint32 sortorder;    /* How to sort playlist -- see below     */
-    guint32 podcastflag;  /* ITDB_PL_FLAG_NORM/_PODCAST            */
-    Itdb_SPLPref splpref;      /* smart playlist prefs                  */
-    Itdb_SPLRules splrules;    /* rules for smart playlists             */
-    gpointer reserved100; /* reserved for MHOD100 implementation   */
-    gpointer reserved101; /* reserved for MHOD100 implementation   */
+    Itdb_iTunesDB *itdb;
+    gchar *name;
+    guint8 type;
+    guint8 flag1;
+    guint8 flag2;
+    guint8 flag3;
+    gint  num;
+    GList *members;
+    gboolean is_spl;
+    time_t timestamp;
+    guint64 id;
+    guint32 sortorder;
+    guint32 podcastflag;
+    Itdb_SPLPref splpref;
+    Itdb_SPLRules splrules;
+    gpointer reserved100;
+    gpointer reserved101;
     /* reserved for future use */
     gint32 reserved_int1;
     gint32 reserved_int2;
@@ -643,39 +1097,39 @@
 };
 
 
-/*
-Playlist Sort Order
-
-1 - playlist order (manual sort order)
-2 - ???
-3 - songtitle
-4 - album
-5 - artist
-6 - bitrate
-7 - genre
-8 - kind
-9 - date modified
-10 - track nr
-11 - size
-12 - time
-13 - year
-14 - sample rate
-15 - comment
-16 - date added
-17 - equalizer
-18 - composer
-19 - ???
-20 - play count
-21 - last played
-22 - disc nr
-23 - my rating
-24 - release date (I guess, it's the value for the "Podcasts" list)
-25 - BPM
-26 - grouping
-27 - category
-28 - description
-*/
-
+/**
+ * ItdbPlaylistSortOrder:
+ * @ITDB_PSO_MANUAL:        Sort by playlist order (manual sort)
+ * @ITDB_PSO_TITLE:         Sort by track title
+ * @ITDB_PSO_ALBUM:         Sort by album
+ * @ITDB_PSO_ARTIST:        Sort by artist
+ * @ITDB_PSO_BIRATE:        Sort by bitrate
+ * @ITDB_PSO_GENRE:         Sort by genre
+ * @ITDB_PSO_FILETYPE:      Sort by filetype
+ * @ITDB_PSO_TIME_MODIFIED: Sort by date modified
+ * @ITDB_PSO_TRACK_NR:      Sort by track number
+ * @ITDB_PSO_SIZE:          Sort by track size
+ * @ITDB_PSO_TIME:          Sort by track time
+ * @ITDB_PSO_YEAR:          Sort by year
+ * @ITDB_PSO_SAMPLERATE:    Sort by samplerate
+ * @ITDB_PSO_COMMENT:       Sort by comments
+ * @ITDB_PSO_TIME_ADDED:    Sort by date added
+ * @ITDB_PSO_EQUALIZER:     Sort by equilizer
+ * @ITDB_PSO_COMPOSER:      Sort by composer
+ * @ITDB_PSO_PLAYCOUNT:     Sort by playcount
+ * @ITDB_PSO_TIME_PLAYED:   Sort by date last played
+ * @ITDB_PSO_CD_NR:         Sort by disc number
+ * @ITDB_PSO_RATING:        Sort by rating
+ * @ITDB_PSO_RELEASE_DATE:  Sort by release date
+ * @ITDB_PSO_BPM:           Sort by beats per minute
+ * @ITDB_PSO_GROUPING:      Sort by grouping
+ * @ITDB_PSO_CATEGORY:      Sort by category
+ * @ITDB_PSO_DESCRIPTION:   Sort by description
+ *
+ * Playlist Sort Order
+ *
+ * Since: 0.1.3
+ */
 typedef enum
 {
     ITDB_PSO_MANUAL = 1,
@@ -709,7 +1163,23 @@
 } ItdbPlaylistSortOrder;
 
 
-/* Mediatype definitions */
+/**
+ * Itdb_Mediatype:
+ * @ITDB_MEDIATYPE_AUDIO:      Audio files
+ * @ITDB_MEDIATYPE_MOVIE:      Movies
+ * @ITDB_MEDIATYPE_PODCAST:    Podcasts
+ * @ITDB_MEDIATYPE_AUDIOBOOK:  Audio books
+ * @ITDB_MEDIATYPE_MUSICVIDEO: Music videos
+ * @ITDB_MEDIATYPE_TVSHOW:     TV Shows
+ *
+ * Mediatype definitions
+ *
+ * The mediatype is used to determine what menu a track appears under.  For
+ * example, setting the mediatype to #ITDB_MEDIATYPE_PODCAST makes the track
+ * appear on the Podcast menu.
+ *
+ * Since: 0.5.0
+ */
 typedef enum
 {
     ITDB_MEDIATYPE_AUDIO      = 0x0001,
@@ -720,35 +1190,333 @@
     ITDB_MEDIATYPE_TVSHOW     = 0x0040,
 } Itdb_Mediatype;
 
-/* some of the descriptive comments below are copied verbatim from
-   http://ipodlinux.org/ITunesDB. 
-   http://ipodlinux.org/ITunesDB is the best source for information
-   about the iTunesDB and related files. */
+/**
+ * Itdb_Track:
+ * @itdb:                       A pointer to the #Itdb_iTunesDB (for convenience)
+ * @title:                      The title of the track in UTF8
+ * @ipod_path:                  The file path on the iPod.  Directories are
+ *                              separated with ":" instead of "/".  The path is
+ *                              relative to the iPod mountpoint.
+ * @album:                      The album name in UTF8
+ * @artist:                     The artist name in UTF8
+ * @genre:                      The genre in UTF8
+ * @filetype:                   A UTF8 string describing the file type.  E.g.
+ *                              "MP3-File".
+ * @comment:                    A comment in UTF8
+ * @category:                   The category ("Technology", "Music", etc.)
+ *                              where the podcast was located.  (Added in
+ *                              dbversion 0x0d)
+ * @composer:                   The composer name in UTF8
+ * @grouping:                   ??? (UTF8)
+ * @description:                Description text (such as podcast show notes).
+ *                              (Added in dbversion 0x0d)
+ * @podcasturl:                 Podcast Enclosure URL in UTF-8 or ASCII.
+ *                              (Added in dbversion 0x0d)
+ * @podcastrss:                 Podcast RSS URL in UTF-8 or ASCII.
+ *                              (Added in dbversion 0x0d)
+ * @chapterdata:                This is an m4a-style entry that is used to
+ *                              display subsongs within a mhit.  (Added in
+ *                              dbversion 0x0d)
+ * @subtitle:                   Subtitle (usually the same as Description).
+ *                              (Added in dbversion 0x0d)
+ * @tvshow:                     Name of the TV show (only used for TV Shows).
+ *                              (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+ * @tvepisode:                  The episode number (only used for TV Shows).
+ *                              (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+ * @tvnetwork:                  The TV network (only used for TV Shows).
+ *                              (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+ * @albumartist:                The album artist (Added in dbversion 0x13?)
+ *                              (Since libgpod-0.4.2)
+ * @keywords:                   List of keywords pertaining to the track.
+ *                              (Added in dbversion 0x13?) (Since libgpod-0.4.2)
+ * @sort_artist:                The artist name used for sorting.  Artists with
+ *                              names like "The Artist" would have "Artist,
+ *                              The" here.  If you do not set this field,
+ *                              libgpod will pre-sort the lists displayed by
+ *                              the iPod according to "Artist, The", without
+ *                              setting this field.
+ *                              (Added in dbversion 0x13?) (Since libgpod-0.5.0)
+ * @sort_title:                 The track title used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_album:                 The album name used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_albumartist:           The album artist used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_composer:              The composer used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_tvshow:                The name of the TV show used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @id:                         Unique ID of track
+ * @size:                       The size of the file in bytes
+ * @tracklen:                   The length of the track in ms
+ * @cd_nr:                      The CD number the track comes from.
+ * @cds:                        The total number of CDs.
+ * @track_nr:                   The track number.
+ * @tracks:                     The total number of tracks.
+ * @bitrate:                    The bitrate at which the file is encoded.
+ * @samplerate:                 The samplerate of the track (e.g. CD = 44100)
+ * @samplerate_low:             In the iTunesDB the samplerate is
+ *                              multiplied by 0x10000 -- these are the
+ *                              lower 16 bit, which are usually 0
+ * @year:                       The year the track was released
+ * @volume:                     Volume adjustment field.  This is a value from
+ *                              -255 to 255 that will be applied to the track
+ *                              on playback.
+ * @soundcheck:                 The SoundCheck value to apply to the song, when
+ *                              SoundCheck is switched on in the iPod settings.
+ *                              The value for this field can be determined by
+ *                              the equation: X = 1000 * 10 ^ (-.1 * Y) where Y
+ *                              is the adjustment value in dB and X is the
+ *                              value that goes into the SoundCheck field. The
+ *                              value 0 is special, the equation is not used
+ *                              and it is treated as "no Soundcheck" (basically
+ *                              the same as the value 1000). This equation
+ *                              works perfectly well with ReplayGain derived
+ *                              data instead of the iTunes SoundCheck derived
+ *                              information.
+ * @time_added:                 The time the track was added.
+ * @time_modified:              The time the track was last modified
+ * @time_played:                The time the track was last played
+ * @bookmark_time:              The time, in milliseconds, that the track will
+ *                              start playing at. This is used for AudioBook
+ *                              filetypes (.aa and .m4b).  Note that there is
+ *                              also a bookmark value in the play counts file
+ *                              that will be set by the iPod and can be used
+ *                              instead of this value.
+ * @rating:                     The track rating (stars * #ITDB_RATING_STEP)
+ * @playcount:                  The number of times the track has been played
+ * @playcount2:                 This also stores the play count of the
+ *                              track.  It is unclear if this ever differs
+ *                              from the above value. During sync, this is set
+ *                              to the same value as @playcount.
+ * @recent_playcount:           The number of times the track was played since
+ *                              the last sync.
+ * @transferred:                Whether the file been transferred to iPod.
+ * @BPM:                        BPM (beats per minute) of the track
+ * @app_rating:                 The last rating set by an application (e.g.
+ *                              iTunes).  If the rating on the iPod and the
+ *                              @rating field above differ, the original
+ *                              rating is copied here and the new rating is
+ *                              stored in @rating.
+ * @type1:                      CBR MP3s and AAC are 0x00, VBR MP3s are 0x01
+ * @type2:                      MP3s are 0x01, AAC are 0x00
+ * @compilation:                Flag to mark the track as a compilation.  True
+ *                              if set to 0x1, false if set to 0x0.
+ * @starttime:                  The time, in milliseconds, at which the song
+ *                              will start playing.
+ * @stoptime:                   The time, in milliseconds, at which the song
+ *                              will stop playing.
+ * @checked:                    Flag for whether the track is checked.  True if
+ *                              set to 0x0, false if set to 0x1
+ * @dbid:                       Unique database ID that identifies this song
+ *                              across the databases on the iPod. For example,
+ *                              this id joins an iTunesDB mhit with an
+ *                              ArtworkDB mhii.
+ * @drm_userid:                 Apple Store/Audible User ID (for DRM'ed files
+ *                              only, set to 0 otherwise).
+ * @visible:                    If this value is 1, the song is visible on the
+ *                              iPod. All other values cause the file to be
+ *                              hidden.
+ * @filetype_marker:            This appears to always be 0 on hard drive based
+ *                              iPods, but for the iTunesDB that is written to
+ *                              an iPod Shuffle, iTunes 4.7.1 writes out the
+ *                              file's type as an ANSI string(!). For example,
+ *                              a MP3 file has a filetype of 0x4d503320 ->
+ *                              0x4d = 'M', 0x50 = 'P', 0x33 = '3', 0x20 =
+ *                              &lt;space&gt;.  This is set to the filename
+ *                              extension by libgpod when copying the track to
+ *                              the iPod.
+ * @artwork_count:              The number of album artwork items associated
+ *                              with this song.  libgpod updates this value
+ *                              when syncing.
+ * @artwork_size:               The total size of artwork (in bytes) attached
+ *                              to this song, when it is converted to JPEG
+ *                              format. Observed in dbversion 0x0b and with
+ *                              an iPod Photo. libgpod updates this value when
+ *                              syncing.
+ * @samplerate2:                The sample rate of the song expressed as an
+ *                              IEEE 32 bit floating point number.  It is
+ *                              uncertain why this is here.  libgpod will set
+ *                              this when adding a track.
+ * @unk126:                     Unknown, but always seems to be 0xffff for
+ *                              MP3/AAC songs, 0x0 for uncompressed songs
+ *                              (like WAVE format), 0x1 for Audible.  libgpod
+ *                              will try to set this when adding a new track.
+ * @unk132:                     Unknown
+ * @time_released:              The date/time the track was added to the iTunes
+ *                              music store?  For podcasts this is the release
+ *                              date that is displayed next to the title in the
+ *                              Podcast playlist.
+ * @unk144:                     Unknown, but MP3 songs appear to be always
+ *                              0x000c, AAC songs are always 0x0033, Audible
+ *                              files are 0x0029, WAV files are 0x0.  libgpod
+ *                              will attempt to set this value when adding a
+ *                              track.
+ * @explicit_flag:              Flag to mark a track as "explicit" in iTunes.
+ *                              True if to 0x1, false if set to 0x0.
+ * @unk148:                     Unknown - used for Apple Store DRM songs
+ *                              (always 0x01010100?), zero otherwise
+ * @unk152:                     Unknown
+ * @skipcount:                  The number of times the track has been skipped.
+ *                              (Added in dbversion 0x0c)
+ * @recent_skipcount:           The number of times the track was skipped since
+ *                              the last sync.
+ * @last_skipped:               The time the track was last skipped.  (Added in
+ *                              dbversion 0x0c)
+ * @has_artwork:                Whether the track has artwork.
+ *                              True if set to 0x01, false if set to 0x02.
+ * @skip_when_shuffling:        Flag to skip the track when shuffling.  True if
+ *                              set to 0x01, false if set to 0x00. Audiobooks
+ *                              (.aa and .m4b) always seem to be skipped when
+ *                              shuffling, regardless of this flag.
+ * @remember_playback_position: Flag to remember playback position.
+ *                              True when set to 0x01, false when set to 0x00.
+ *                              Audiobooks (.aa and .m4b) always seem to
+ *                              remember the playback position, regardless of
+ *                              this flag.
+ * @flag4:                      Used for podcasts, 0x00 otherwise.  If set to
+ *                              0x01 the "Now Playing" page will show
+ *                              Title/Album, when set to 0x00 it will also show
+ *                              the Artist.  When set to 0x02 a sub-page
+ *                              (middle button) with further information about
+ *                              the track will be shown.
+ * @dbid2:                      The purpose of the field is unclear.  If not
+ *                              set, libgpod will set this to the same value as
+ *                              @dbid when adding a track.  (With iTunes, since
+ *                              dbversion 0x12, this field value differs from
+ *                              @dbid.)
+ * @lyrics_flag:                Whether the track has lyrics (e.g. it has a
+ *                              USLT ID3 tag in an MP3 or a @lyr atom in an
+ *                              MP4).  True if set to 0x01, false if set to
+ *                              0x00.
+ * @movie_flag:                 Whether the track is a movie.  True if set to
+ *                              0x01, false if set to 0x00.
+ * @mark_unplayed:              A value of 0x02 marks a podcast as unplayed on
+ *                              the iPod, with a bullet.  Once played it is set
+ *                              to 0x01. Non-podcasts have this set to 0x01.
+ *                              (Added in dbversion 0x0c)
+ * @unk179:                     Unknown, always 0x00 so far.  (Added in
+ *                              dbversion 0x0c)
+ * @unk180:                     Unknown.  (Added in dbversion 0x0c)
+ * @pregap:                     The number of samples of silence before the
+ *                              track starts (for gapless playback).
+ * @samplecount:                The number of samples in the track (for gapless
+ *                              playback).
+ * @unk196:                     Unknown.  (Added in dbversion 0x0c)
+ * @postgap:                    The number of samples of silence at the end of
+ *                              the track (for gapless playback).
+ * @unk204:                     Unknown.  Appears to be 0x1 for files encoded
+ *                              using the MP3 encoder, 0x0 otherwise.  (Added
+ *                              in dbversion 0x0c, first values observed in
+ *                              0x0d.)
+ * @mediatype:                  The type of file.  It must be set to 0x00000001
+ *                              for audio files, and set to 0x00000002 for
+ *                              video files.  If set to 0x00, the files show up
+ *                              in both, the audio menus ("Songs", "Artists",
+ *                              etc.) and the video menus ("Movies", "Music
+ *                              Videos", etc.).  It appears to be set to 0x20
+ *                              for music videos, and if set to 0x60 the file
+ *                              shows up in "TV Shows" rather than "Movies".
+ *                              <para>
+ *                              The following list summarizes all observed types:
+ *                              </para>
+ *                              <itemizedlist>
+ *                              <listitem>0x00 00 00 00 - Audio/Video</listitem>
+ *                              <listitem>0x00 00 00 01 - Audio</listitem>
+ *                              <listitem>0x00 00 00 02 - Video</listitem>
+ *                              <listitem>0x00 00 00 04 - Podcast</listitem>
+ *                              <listitem>0x00 00 00 06 - Video Podcast</listitem>
+ *                              <listitem>0x00 00 00 08 - Audiobook</listitem>
+ *                              <listitem>0x00 00 00 20 - Music Video</listitem>
+ *                              <listitem>0x00 00 00 40 - TV Show (shows up ONLY
+ *                              in TV Shows)</listitem>
+ *                              <listitem>0x00 00 00 60 - TV Show (shows up in
+ *                              the Music lists as well)</listitem>
+ *                              </itemizedlist>
+ * @season_nr:                  The season number of the track (only used for
+ *                              TV Shows).
+ * @episode_nr:                 The episode number of the track (only used for
+ *                              TV Shows).  Although this is not displayed on
+ *                              the iPod, the episodes are sorted by episode
+ *                              number.
+ * @unk220:                     Unknown.  This has something to do with
+ *                              protected files.  It is set to 0x0 for
+ *                              non-protected files.
+ * @unk224:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk228:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk232:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk236:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk240:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk244:                     Unknown.  (Added in dbversion 0x13)
+ * @gapless_data:               The size in bytes from first Synch Frame
+ *                              (which is usually the XING frame that
+ *                              includes the LAME tag) until the 8th before
+ *                              the last frame. The gapless playback does not
+ *                              work for MP3 files if this is set to zero. For
+ *                              AAC tracks, this may be zero.  (Added in
+ *                              dbversion 0x13)
+ * @unk252:                     Unknown.  (Added in dbversion 0x0c)
+ * @gapless_track_flag:         If set to 1, this track has gapless playback
+ *                              data.  (Added in dbversion 0x13)
+ * @gapless_album_flag:         If set to 1, this track does not use
+ *                              crossfading in iTunes.  (Added in dbversion
+ *                              0x13)
+ * @album_id:                   The Album ID from the album list (currently
+ *                              unused by libgpod)
+ * @artwork:                    An #Itdb_Artwork for cover art
+ * @mhii_link:                  This is set to the id of the corresponding
+ *                              ArtworkDB mhii, used for sparse artwork
+ *                              support.  (Since libgpod-0.7.0)
+ * @reserved_int1:              Reserved for future use
+ * @reserved_int2:              Reserved for future use
+ * @reserved_int3:              Reserved for future use
+ * @reserved_int4:              Reserved for future use
+ * @reserved_int5:              Reserved for future use
+ * @reserved_int6:              Reserved for future use
+ * @reserved1:                  Reserved for future use
+ * @reserved2:                  Reserved for future use
+ * @reserved3:                  Reserved for future use
+ * @reserved4:                  Reserved for future use
+ * @reserved5:                  Reserved for future use
+ * @reserved6:                  Reserved for future use
+ * @usertype:                   For use by application
+ * @userdata:                   For use by application
+ * @userdata_duplicate:         A function to duplicate #userdata
+ * @userdata_destroy:           A function to free #userdata
+ *
+ * Structure representing a track in an iTunesDB
+ *
+ * <note><para>When adding string fields don't forget to add them in
+ * itdb_track_duplicate() as well.</para></note>
+ *
+ * Many of the parameter descriptions are copied verbatim from
+ * http://ipodlinux.org/ITunesDB, which is the best source for information about
+ * the iTunesDB and related files.
+ */
 struct _Itdb_Track
 {
-  Itdb_iTunesDB *itdb;       /* pointer to iTunesDB (for convenience)   */
-  gchar   *title;            /* title (utf8)                            */
-  gchar   *ipod_path;        /* name of file on iPod: uses ":" instead
-				of "/" and is relative to mountpoint    */
-  gchar   *album;            /* album (utf8)                            */
-  gchar   *artist;           /* artist (utf8)                           */
-  gchar   *genre;            /* genre (utf8)                            */
-  gchar   *filetype;         /* eg. "MP3-File"...(utf8)                 */
-  gchar   *comment;          /* comment (utf8)                          */
-  gchar   *category;         /* Category for podcast                    */
-  gchar   *composer;         /* Composer (utf8)                         */
-  gchar   *grouping;         /* ? (utf8)                                */
-  gchar   *description;      /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *podcasturl;       /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *podcastrss;       /* see note for MHOD_ID in itdb_itunesdb.c */
-  gpointer chapterdata;      /* not yet supported. Help welcome.        */
-  gchar   *subtitle;         /* see note for MHOD_ID in itdb_itunesdb.c */
-/* the following 6 are new in libgpod 0.4.2... */
-  gchar   *tvshow;           /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *tvepisode;        /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *tvnetwork;        /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *albumartist;      /* see note for MHOD_ID in itdb_itunesdb.c */
-  gchar   *keywords;         /* see note for MHOD_ID in itdb_itunesdb.c */
+  Itdb_iTunesDB *itdb;
+  gchar   *title;
+  gchar   *ipod_path;
+  gchar   *album;
+  gchar   *artist;
+  gchar   *genre;
+  gchar   *filetype;
+  gchar   *comment;
+  gchar   *category;
+  gchar   *composer;
+  gchar   *grouping;
+  gchar   *description;
+  gchar   *podcasturl;
+  gchar   *podcastrss;
+  Itdb_Chapterdata *chapterdata;
+  gchar   *subtitle;
+/* the following 5 are new in libgpod 0.4.2... */
+  gchar   *tvshow;
+  gchar   *tvepisode;
+  gchar   *tvnetwork;
+  gchar   *albumartist;
+  gchar   *keywords;
 /* the following 6 are new in libgpod 0.5.0... */
   /* You can set these strings to override the standard
      sortorder. When set they take precedence over the default
@@ -763,205 +1531,93 @@
      the lists displayed by the iPod according to "Artist, The",
      without setting the field.
   */
-  gchar   *sort_artist;      /* artist (for sorting)                    */
-  gchar   *sort_title;       /* title (for sorting)                     */
-  gchar   *sort_album;       /* album (for sorting)                     */
-  gchar   *sort_albumartist; /* album artist (for sorting)              */
-  gchar   *sort_composer;    /* composer (for sorting)                  */
-  gchar   *sort_tvshow;      /* tv show (for sorting)                   */
-/* new fields in libgpod 0.5.0 up to here */
-  guint32 id;                /* unique ID of track                      */
-  gint32  size;              /* size of file in bytes                   */
-  gint32  tracklen;          /* Length of track in ms                   */
-  gint32  cd_nr;             /* CD number                               */
-  gint32  cds;               /* number of CDs                           */
-  gint32  track_nr;          /* track number                            */
-  gint32  tracks;            /* number of tracks                        */
-  gint32  bitrate;           /* bitrate                                 */
-  guint16 samplerate;        /* samplerate (CD: 44100)                  */
-  guint16 samplerate_low;    /* in the iTunesDB the samplerate is
-                                multiplied by 0x10000 -- these are the
-				lower 16 bit, which are usually 0       */
-  gint32  year;              /* year                                    */
-  gint32  volume;            /* volume adjustment                       */
-  guint32 soundcheck;        /* volume adjustment "soundcheck"          */
-  time_t  time_added;        /* time when added                         */
-  time_t  time_modified;     /* time of last modification               */
-  time_t  time_played;       /* time of last play                       */
-  guint32 bookmark_time;     /* bookmark set for (AudioBook) in ms      */
-  guint32 rating;            /* star rating (stars * RATING_STEP (20))  */
-  guint32 playcount;         /* number of times track was played        */
-  guint32 playcount2;        /* Also stores the play count of the
-				song.  Don't know if it ever differs
-				from the above value. During sync itdb
-				sets playcount2 to the same value as
-				playcount.                              */
-  guint32 recent_playcount;  /* times track was played since last sync  */
-  gboolean transferred;      /* has file been transferred to iPod?      */
-  gint16  BPM;               /* BPM (beats per minute) of this track    */
-  guint8  app_rating;        /* star rating set by appl. (not
-			      * iPod). If the rating set on the iPod
-			        and the rating field above differ, the
-				original rating is copied here and the
-				new rating is stored above. */
-  guint8  type1;             /* CBR MP3s and AAC are 0x00, VBR MP3s are
-			        0x01                                    */
-  guint8  type2;             /* MP3s are 0x01, AAC are 0x00             */
+  gchar   *sort_artist;
+  gchar   *sort_title;
+  gchar   *sort_album;
+  gchar   *sort_albumartist;
+  gchar   *sort_composer;
+  gchar   *sort_tvshow;
+/* end of new fields in libgpod 0.5.0 */
+  guint32 id;
+  gint32  size;
+  gint32  tracklen;
+  gint32  cd_nr;
+  gint32  cds;
+  gint32  track_nr;
+  gint32  tracks;
+  gint32  bitrate;
+  guint16 samplerate;
+  guint16 samplerate_low;
+  gint32  year;
+  gint32  volume;
+  guint32 soundcheck;
+  time_t  time_added;
+  time_t  time_modified;
+  time_t  time_played;
+  guint32 bookmark_time;
+  guint32 rating;
+  guint32 playcount;
+  guint32 playcount2;
+  guint32 recent_playcount;
+  gboolean transferred;
+  gint16  BPM;
+  guint8  app_rating;
+  guint8  type1;
+  guint8  type2;
   guint8  compilation;
   guint32 starttime;
   guint32 stoptime;
-  guint8  checked;           /* 0x0: checkmark on track is set 0x1: not set */
-  guint64 dbid;              /* unique database ID                      */
-  guint32 drm_userid;        /* Apple Store/Audible User ID (for DRM'ed
-				files only, set to 0 otherwise).        */
-  guint32 visible;           /*  If this value is 1, the song is visible
-				 on the iPod. All other values cause
-				 the file to be hidden.                 */
-  guint32 filetype_marker;   /* This appears to always be 0 on hard
-                                drive based iPods, but for the
-                                iTunesDB that is written to an iPod
-                                Shuffle, iTunes 4.7.1 writes out the
-                                file's type as an ANSI string(!). For
-                                example, a MP3 file has a filetype of
-                                0x4d503320 -> 0x4d = 'M', 0x50 = 'P',
-                                0x33 = '3', 0x20 = <space>. (set to
-				the filename extension by itdb when
-				copying track to iPod)                  */
-  guint16 artwork_count;     /* The number of album artwork items
-				associated with this song. libgpod
-				updates this value when syncing */
-  guint32 artwork_size;      /* The total size of artwork (in bytes)
-				attached to this song, when it is
-				converted to JPEG format. Observed in
-				iPodDB version 0x0b and with an iPod
-				Photo. libgpod updates this value when
-				syncing                                 */
-  float samplerate2;         /* The sample rate of the song expressed
-				as an IEEE 32 bit floating point
-				number.  It's uncertain why this is
-				here.  itdb will set this when adding
-				a track                                 */
-
-  guint16 unk126;     /* unknown, but always seems to be 0xffff for
-			 MP3/AAC songs, 0x0 for uncompressed songs
-			 (like WAVE format), 0x1 for Audible. itdb
-			 will try to set this when adding a new track */
-  guint32 unk132;     /* unknown */
-  time_t  time_released;/* date/time added to music store? 
-			   For podcasts: release date as displayed next to the 
-			   title in the Podcast playlist */
-  guint16 unk144;     /* unknown, but MP3 songs appear to be always
-			 0x000c, AAC songs are always 0x0033, Audible
-			 files are 0x0029, WAV files are 0x0. itdb
-			 will attempt to set this value when adding a
-			 track. */ 
-  guint16 unk146;     /* unknown, but appears to be 1 if played at
-			 least once in iTunes and 0 otherwise. */
-  guint32 unk148;     /* unknown - used for Apple Store DRM songs
-			 (always 0x01010100?), zero otherwise */
-  guint32 unk152;     /* unknown */
-  guint32 skipcount;  /* Number of times the track has been skipped.
-			 Formerly unk156 (added in dbversion 0x0c) */
-  guint32 recent_skipcount; /* number of times track was skipped since
-			       last sync */
-  guint32 last_skipped;/* Date/time last skipped. Formerly unk160
-			 (added in dbversion 0x0c) */
-  guint8 has_artwork; /* 0x01: artwork is present. 0x02: no artwork is
-			 present for this track (used by the iPod to
-			 decide whether to display Artwork or not) */
-  guint8 skip_when_shuffling;/* "Skip when shuffling" when set to
-			 0x01, set to 0x00 otherwise. .m4b and .aa
-			 files always seem to be skipped when
-			 shuffling, however */
-  guint8 remember_playback_position;/* "Remember playback position"
-			 when set to 0x01, set to 0x00 otherwise. .m4b
-			 and .aa files always seem to remember the
-			 playback position, however. */
-  guint8 flag4;       /* Used for podcasts, 0x00 otherwise.  If set to
-			 0x01 the "Now Playing" page will show
-			 Title/Album, when set to 0x00 it will also
-			 show the Artist. When set to 0x02 a sub-page
-			 (middle button) with further information
-			 about the track will be shown. */
-  guint64 dbid2;      /* not clear. if not set, itdb will set this to
-			 the same value as dbid when adding a
-			 track. (With iTunes, since V0x12, this field
-			 value differs from the dbid one.) */
-  guint8 lyrics_flag; /* set to 0x01 if lyrics are present in MP3 tag
-			 ("ULST"), 0x00 otherwise */
-  guint8 movie_flag;  /* set to 0x01 if it's a movie file, 0x00
-		         otherwise */
-  guint8 mark_unplayed; /* A value of 0x02 marks a podcast as unplayed
-			   on the iPod (bullet) once played it is set to
-			   0x01. Non-podcasts have this set to 0x01. */
-  guint8 unk179;      /* unknown (always 0x00 so far) */
+  guint8  checked;
+  guint64 dbid;
+  guint32 drm_userid;
+  guint32 visible;
+  guint32 filetype_marker;
+  guint16 artwork_count;
+  guint32 artwork_size;
+  float samplerate2;
+  guint16 unk126;
+  guint32 unk132;
+  time_t  time_released;
+  guint16 unk144;
+  guint16 explicit_flag;
+  guint32 unk148;
+  guint32 unk152;
+  guint32 skipcount;
+  guint32 recent_skipcount;
+  guint32 last_skipped;
+  guint8 has_artwork;
+  guint8 skip_when_shuffling;
+  guint8 remember_playback_position;
+  guint8 flag4;
+  guint64 dbid2;
+  guint8 lyrics_flag;
+  guint8 movie_flag;
+  guint8 mark_unplayed;
+  guint8 unk179;
   guint32 unk180;
-  guint32 pregap;     /* Number of samples of silence before the songs
-			 starts (for gapless playback). */
-  guint64 samplecount;/* Number of samples in the song. First observed
-			 in dbversion 0x0d, and only for AAC and WAV
-			 files (for gapless playback). */
+  guint32 pregap;
+  guint64 samplecount;
   guint32 unk196;
-  guint32 postgap;    /* Number of samples of silence at the end of
-			 the song (for gapless playback). */
-  guint32 unk204;     /* unknown - added in dbversion 0x0c, first
-			 values observed in 0x0d. Observed to be 0x0
-			 or 0x1. */
-  guint32 mediatype;  /* It seems that this field denotes the type of
-		         the file on (e.g.) the 5g video iPod. It must
-			 be set to 0x00000001 for audio files, and set
-			 to 0x00000002 for video files. If set to
-			 0x00, the files show up in both, the audio
-			 menus ("Songs", "Artists", etc.) and the
-			 video menus ("Movies", "Music Videos",
-			 etc.). It appears to be set to 0x20 for music
-			 videos, and if set to 0x60 the file shows up
-			 in "TV Shows" rather than "Movies". 
-
-			 The following list summarizes all observed types:
-
-			 * 0x00 00 00 00 - Audio/Video
-			 * 0x00 00 00 01 - Audio
-			 * 0x00 00 00 02 - Video
-			 * 0x00 00 00 04 - Podcast
-			 * 0x00 00 00 06 - Video Podcast
-			 * 0x00 00 00 08 - Audiobook
-			 * 0x00 00 00 20 - Music Video
-			 * 0x00 00 00 40 - TV Show (shows up ONLY in TV Shows
-			 * 0x00 00 00 60 - TV Show (shows up in the
-			                            Music lists as well) */
-  guint32 season_nr;  /* the season number of the track, for TV shows only. */
-  guint32 episode_nr; /* the episode number of the track, for TV shows
-			 only - although not displayed on the iPod,
-			 the episodes are sorted by episode number. */
-  guint32 unk220;     /* Has something to do with protected files -
-			 set to 0x0 for non-protected files. */
+  guint32 postgap;
+  guint32 unk204;
+  guint32 mediatype;
+  guint32 season_nr;
+  guint32 episode_nr;
+  guint32 unk220;
   guint32 unk224;
   guint32 unk228, unk232, unk236, unk240, unk244;
-  guint32 gapless_data;/* some magic number needed for gapless playback
-			  (added in dbversion 0x13) It has been observed
-			  that gapless playback does not work if this is
-			  set to zero. This number is related to the the
-			  filesize in bytes, but it is a couple of bytes
-			  less than the filesize. Maybe ID3 tags
-			  etc... taken off? */
+  guint32 gapless_data;
   guint32 unk252;
-  guint16 gapless_track_flag; /* if 1, this track has gapless playback data
-			         (added in dbversion 0x13) */
-  guint16 gapless_album_flag; /* if 1, this track does not use crossfading
-			         in iTunes (added in dbversion 0x13) */
+  guint16 gapless_track_flag;
+  guint16 gapless_album_flag;
+  guint16 album_id;
 
-    /* Chapter data: defines where the chapter stops are in the track,
-       as well as what info should be displayed for each section of
-       the track. Until it can be parsed and interpreted, the
-       chapterdata will just be read as a block and written back on
-       sync. This will be changed at a later time */
-  void *chapterdata_raw;
-  guint32 chapterdata_raw_length;
-
   /* This is for Cover Art support */
   struct _Itdb_Artwork *artwork;
 
+  /* This is for sparse artwork support, new in libgpod-0.7.0 */
+  guint32 mhii_link;
+
   /* reserved for future use */
   gint32 reserved_int1;
   gint32 reserved_int2;
@@ -997,13 +1653,24 @@
  * Error codes
  *
 \* ------------------------------------------------------------ */
+
+/**
+ * ItdbFileError:
+ * @ITDB_FILE_ERROR_SEEK:         file corrupt: illegal seek occured
+ * @ITDB_FILE_ERROR_CORRUPT:      file corrupt
+ * @ITDB_FILE_ERROR_NOTFOUND:     file not found
+ * @ITDB_FILE_ERROR_RENAME:       file could not be renamed
+ * @ITDB_FILE_ERROR_ITDB_CORRUPT: iTunesDB in memory corrupt
+ *
+ * Error codes for iTunesDB file
+ */
 typedef enum
 {
-    ITDB_FILE_ERROR_SEEK,        /* file corrupt: illegal seek occured */
-    ITDB_FILE_ERROR_CORRUPT,     /* file corrupt                       */
-    ITDB_FILE_ERROR_NOTFOUND,    /* file not found                     */
-    ITDB_FILE_ERROR_RENAME,      /* file could not be renamed          */
-    ITDB_FILE_ERROR_ITDB_CORRUPT /* iTunesDB in memory corrupt         */
+    ITDB_FILE_ERROR_SEEK,
+    ITDB_FILE_ERROR_CORRUPT,
+    ITDB_FILE_ERROR_NOTFOUND,
+    ITDB_FILE_ERROR_RENAME,
+    ITDB_FILE_ERROR_ITDB_CORRUPT
 } ItdbFileError;
 
 
@@ -1075,13 +1742,14 @@
 void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp);
 gboolean itdb_device_read_sysinfo (Itdb_Device *device);
 gboolean itdb_device_write_sysinfo (Itdb_Device *device, GError **error);
-gchar *itdb_device_get_sysinfo (Itdb_Device *device, const gchar *field);
+gchar *itdb_device_get_sysinfo (const Itdb_Device *device, const gchar *field);
 void itdb_device_set_sysinfo (Itdb_Device *device,
 			      const gchar *field, const gchar *value);
-const Itdb_IpodInfo *itdb_device_get_ipod_info (Itdb_Device *device);
+const Itdb_IpodInfo *itdb_device_get_ipod_info (const Itdb_Device *device);
 const Itdb_IpodInfo *itdb_info_get_ipod_info_table (void);
-gboolean itdb_device_supports_artwork (Itdb_Device *device);
-gboolean itdb_device_supports_photo (Itdb_Device *device);
+gboolean itdb_device_supports_artwork (const Itdb_Device *device);
+gboolean itdb_device_supports_video (const Itdb_Device *device);
+gboolean itdb_device_supports_photo (const Itdb_Device *device);
 const gchar *itdb_info_get_ipod_model_name_string (Itdb_IpodModel model);
 const gchar *itdb_info_get_ipod_generation_string (Itdb_IpodGeneration generation);
 
@@ -1150,8 +1818,9 @@
 					      gsize image_data_len);
 gboolean itdb_track_set_thumbnails_from_pixbuf (Itdb_Track *track,
                                                 gpointer pixbuf);
-
+gboolean itdb_track_has_thumbnails (Itdb_Track *track);
 void itdb_track_remove_thumbnails (Itdb_Track *track);
+gpointer itdb_track_get_thumbnail (Itdb_Track *track, gint width, gint height);
 
 /* photoalbum functions -- see itdb_photoalbum.c for instructions on
  * how to use. */
@@ -1189,43 +1858,50 @@
 Itdb_PhotoAlbum *itdb_photodb_photoalbum_by_name(Itdb_PhotoDB *db,
 						 const gchar *albumname );
 
-/* itdb_artwork_... -- you probably won't need many of these (probably
- * with the exception of itdb_artwork_get_thumb_by_type() and
- * itdb_thumb_get_gdk_pixbuf() probably). Use the itdb_photodb_...()
- * functions when adding photos, and the itdb_track_...() functions
- * when adding coverart to audio. */
+/* itdb_artwork_... -- you probably won't need many of these (with
+ * the exception of itdb_artwork_get_pixbuf() probably). Use the
+ * itdb_photodb_...() functions when adding photos, and the
+ * itdb_track_...() functions when adding coverart to audio. */
 Itdb_Artwork *itdb_artwork_new (void);
 Itdb_Artwork *itdb_artwork_duplicate (Itdb_Artwork *artwork);
 void itdb_artwork_free (Itdb_Artwork *artwork);
-Itdb_Thumb *itdb_artwork_get_thumb_by_type (Itdb_Artwork *artwork,
-					    ItdbThumbType type);
-gboolean itdb_artwork_add_thumbnail (Itdb_Artwork *artwork,
-				     ItdbThumbType type,
+gboolean itdb_artwork_set_thumbnail (Itdb_Artwork *artwork,
 				     const gchar *filename,
 				     gint rotation, GError **error);
-gboolean itdb_artwork_add_thumbnail_from_data (Itdb_Artwork *artwork,
-					       ItdbThumbType type,
+gboolean itdb_artwork_set_thumbnail_from_data (Itdb_Artwork *artwork,
 					       const guchar *image_data,
 					       gsize image_data_len,
 					       gint rotation, GError **error);
-gboolean itdb_artwork_add_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
-                                                 ItdbThumbType type,
+gboolean itdb_artwork_set_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
                                                  gpointer pixbuf,
                                                  gint rotation,
                                                  GError **error);
-void itdb_artwork_remove_thumbnail (Itdb_Artwork *artwork,
-				    Itdb_Thumb *thumb);
 void itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork);
-/* itdb_thumb_... */
 /* the following function returns a pointer to a GdkPixbuf if
    gdk-pixbuf is installed -- a NULL pointer otherwise. */
-gpointer itdb_thumb_get_gdk_pixbuf (Itdb_Device *device,
-				    Itdb_Thumb *thumb);
+gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
+                                  gint width, gint height);
+
+/* itdb_thumb_... */
 Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb);
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+                                       gint width, gint height);
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb);
 void itdb_thumb_free (Itdb_Thumb *thumb);
-Itdb_Thumb *itdb_thumb_new (void);
-gchar *itdb_thumb_get_filename (Itdb_Device *device, Itdb_Thumb *thumb);
 
+/* itdb_chapterdata_... */
+Itdb_Chapterdata *itdb_chapterdata_new (void);
+void itdb_chapterdata_free (Itdb_Chapterdata *chapterdata);
+Itdb_Chapterdata *itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata);
+void itdb_chapterdata_remove_chapter (Itdb_Chapterdata *chapterdata, Itdb_Chapter *chapter);
+void itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata);
+Itdb_Chapter *itdb_chapter_new (void);
+void itdb_chapter_free (Itdb_Chapter *chapter);
+Itdb_Chapter *itdb_chapter_duplicate (Itdb_Chapter *chapter);
+gboolean itdb_chapterdata_add_chapter (Itdb_Chapterdata *chapterdata,
+				       gint32 startpos,
+				       gchar *chaptertitle);
+
 #ifndef LIBGPOD_DISABLE_DEPRECATED
 /* time functions */
 time_t itdb_time_get_mac_time (void);

Modified: libgpod/trunk/src/itdb_artwork.c
===================================================================
--- libgpod/trunk/src/itdb_artwork.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_artwork.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -23,13 +23,14 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_artwork.c 1753 2007-11-04 00:48:12Z jcsjcs $
+|  $Id: itdb_artwork.c 2159 2008-12-08 01:16:58Z tmzullinger $
 */
 
 #include <config.h>
 
 #include "itdb_device.h"
 #include "itdb_private.h"
+#include "itdb_thumb.h"
 #include "db-image-parser.h"
 #include "itdb_endianness.h"
 #include <errno.h>
@@ -44,12 +45,14 @@
 
 /**
  * itdb_artwork_new:
- * 
- * Creates a new #Itdb_Artwork 
  *
- * Return value: a new #Itdb_Artwork to be freed with itdb_artwork_free() when
+ * Creates a new #Itdb_Artwork
+ *
+ * Returns: a new #Itdb_Artwork to be freed with itdb_artwork_free() when
  * no longer needed
- **/
+ *
+ * Since: 0.3.0
+ */
 Itdb_Artwork *itdb_artwork_new (void)
 {
     Itdb_Artwork *artwork = g_new0 (Itdb_Artwork, 1);
@@ -61,7 +64,9 @@
  * @artwork: an #Itdb_Artwork
  *
  * Frees memory used by @artwork
- **/
+ *
+ * Since: 0.3.0
+ */
 void itdb_artwork_free (Itdb_Artwork *artwork)
 {
     g_return_if_fail (artwork);
@@ -71,37 +76,16 @@
     g_free (artwork);
 }
 
-
-static GList *dup_thumbnails (GList *thumbnails)
-{
-    GList *it;
-    GList *result;
-    
-    result = NULL;
-    for (it = thumbnails; it != NULL; it = it->next)
-    {
-	Itdb_Thumb *new_thumb;
-	Itdb_Thumb *thumb;
-
-	thumb = (Itdb_Thumb *)it->data;
-	g_return_val_if_fail (thumb, NULL);
-
-	new_thumb = itdb_thumb_duplicate (thumb);
-	
-	result = g_list_prepend (result, new_thumb);
-    }
-
-    return g_list_reverse (result);
-}
-
 /**
  * itdb_artwork_duplicate:
  * @artwork: an #Itdb_Artwork
  *
  * Duplicates @artwork
  *
- * Return value: a new copy of @artwork
- **/
+ * Returns: a new copy of @artwork
+ *
+ * Since: 0.3.0
+ */
 Itdb_Artwork *itdb_artwork_duplicate (Itdb_Artwork *artwork)
 {
     Itdb_Artwork *dup;
@@ -111,77 +95,57 @@
 
     memcpy (dup, artwork, sizeof (Itdb_Artwork));
 
-    dup->thumbnails = dup_thumbnails (artwork->thumbnails);
+    if (artwork->thumbnail != NULL) {
+        dup->thumbnail = itdb_thumb_duplicate (artwork->thumbnail);
+    }
 
     return dup;
 }
 
-
 /**
- * itdb_artwork_remove_thumbnail:
- * @artwork: an #Itdb_Artwork
- * @thumb: an #Itdb_Thumb
- *
- * Removes @thumb from @artwork. The memory used by @thumb is freed.
- **/
-void
-itdb_artwork_remove_thumbnail (Itdb_Artwork *artwork, Itdb_Thumb *thumb)
-{
-    g_return_if_fail (artwork);
-    g_return_if_fail (thumb);
-
-    artwork->thumbnails = g_list_remove (artwork->thumbnails, thumb);
-    itdb_thumb_free (thumb);
-}
-
-
-/**
  * itdb_artwork_remove_thumbnails:
  * @artwork: an #Itdb_Artwork
  *
- * Removes all thumbnails from @artwork 
- **/
+ * Removes all thumbnails from @artwork
+ *
+ * Since: 0.3.0
+ */
 void
 itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork)
 {
     g_return_if_fail (artwork);
 
-    while (artwork->thumbnails)
-    {
-	Itdb_Thumb *thumb = artwork->thumbnails->data;
-	g_return_if_fail (thumb);
-	itdb_artwork_remove_thumbnail (artwork, thumb);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
     }
+    artwork->thumbnail = NULL;
     artwork->artwork_size = 0;
     artwork->id = 0;
 }
 
-
-
-
 /**
- * itdb_artwork_add_thumbnail
- * @artwork: an #Itdb_Thumbnail
- * @type: thumbnail size
- * @filename: image file to use to create the thumbnail
- * @rotation: angle by which the image should be rotated
- * counterclockwise. Valid values are 0, 90, 180 and 270.
- * @error: return location for a #GError or NULL
+ * itdb_artwork_set_thumbnail
+ * @artwork:    an #Itdb_Artwork
+ * @filename:   image file to use to create the thumbnail
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
  *
- * Appends a thumbnail of type @type to existing thumbnails in @artwork. No 
+ * Appends a thumbnail of type @type to existing thumbnails in @artwork. No
  * data is read from @filename yet, the file will be when @artwork is saved to
  * disk. @filename must still exist when that happens.
  *
  * For the rotation angle you can also use the gdk constants
- * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
- * ..._CLOCKWISE.
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
  *
- * Return value: TRUE if the thumbnail could be successfully added, FALSE
+ * Returns: TRUE if the thumbnail could be successfully added, FALSE
  * otherwise. @error is set appropriately.
- **/
+ *
+ * Since: 0.7.0
+ */
 gboolean
-itdb_artwork_add_thumbnail (Itdb_Artwork *artwork,
-			    ItdbThumbType type,
+itdb_artwork_set_thumbnail (Itdb_Artwork *artwork,
 			    const gchar *filename,
 			    gint rotation,
 			    GError **error)
@@ -204,11 +168,12 @@
     artwork->artwork_size  = statbuf.st_size;
     artwork->creation_date = statbuf.st_mtime;
 
-    thumb = itdb_thumb_new ();
-    thumb->filename = g_strdup (filename);
-    thumb->type = type;
-    thumb->rotation = rotation;
-    artwork->thumbnails = g_list_append (artwork->thumbnails, thumb);
+    thumb = itdb_thumb_new_from_file (filename);
+    itdb_thumb_set_rotation (thumb, rotation);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = thumb;
 
     return TRUE;
 #else
@@ -219,29 +184,28 @@
 }
 
 /**
- * itdb_artwork_add_thumbnail_from_pixbuf
- * @artwork: an #Itdb_Thumbnail
- * @type: thumbnail size
- * @pixbuf: #GdkPixbuf to use to create the thumbnail
- * @rotation: angle by which the image should be rotated
- * counterclockwise. Valid values are 0, 90, 180 and 270.
- * @error: return location for a #GError or NULL
+ * itdb_artwork_set_thumbnail_from_pixbuf
+ * @artwork:    an #Itdb_Artwork
+ * @pixbuf:     #GdkPixbuf to use to create the thumbnail
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
  *
- * Appends a thumbnail of type @type to existing thumbnails in @artwork. No 
- * data is generated from @pixbuf yet, it will be done when @artwork is saved 
- * to disk. @pixbuf is ref'ed by this function, but is not copied, so it should
- * not be modified before the database is saved.
+ * Set a thumbnail in @artwork. No data is generated from @pixbuf yet, it will
+ * be done when @artwork is saved to disk. @pixbuf is ref'ed by this function,
+ * but is not copied, so it should not be modified before the database is saved.
  *
  * For the rotation angle you can also use the gdk constants
- * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
- * ..._CLOCKWISE.
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
  *
- * Return value: TRUE if the thumbnail could be successfully added, FALSE
+ * Returns: TRUE if the thumbnail could be successfully added, FALSE
  * otherwise. @error is set appropriately.
- **/
+ *
+ * Since: 0.7.0
+ */
 gboolean
-itdb_artwork_add_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
-                                        ItdbThumbType type,
+itdb_artwork_set_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
                                         gpointer pixbuf,
                                         gint rotation,
                                         GError **error)
@@ -264,12 +228,12 @@
     artwork->artwork_size  = rowstride * height;
     artwork->creation_date = time.tv_sec;
 
-    thumb = itdb_thumb_new ();
-    g_object_ref (G_OBJECT (pixbuf));
-    thumb->pixbuf = pixbuf;
-    thumb->type = type;
-    thumb->rotation = rotation;
-    artwork->thumbnails = g_list_append (artwork->thumbnails, thumb);
+    thumb = itdb_thumb_new_from_pixbuf (pixbuf);
+    itdb_thumb_set_rotation (thumb, rotation);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = thumb;
 
     return TRUE;
 #else
@@ -280,30 +244,29 @@
 }
 
 /**
- * itdb_artwork_add_thumbnail_from_data
- * @artwork: an #Itdb_Thumbnail
- * @type: thumbnail size
- * @image_data: data used to create the thumbnail (the raw contents of
- *              an image file)
+ * itdb_artwork_set_thumbnail_from_data
+ * @artwork:        an #Itdb_Artwork
+ * @image_data:     data used to create the thumbnail (the raw contents of
+ *                  an image file)
  * @image_data_len: length of above data block
- * @rotation: angle by which the image should be rotated
- * counterclockwise. Valid values are 0, 90, 180 and 270.
- * @error: return location for a #GError or NULL
+ * @rotation:       angle by which the image should be rotated
+ *                  counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:          return location for a #GError or NULL
  *
- * Appends a thumbnail of type @type to existing thumbnails in
- * @artwork. No data is processed yet. This will be done when @artwork
- * is saved to disk.
+ * Set a thumbnail in @artwork. No data is processed yet. This will be done when
+ * @artwork is saved to disk.
  *
  * For the rotation angle you can also use the gdk constants
- * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
- * ..._CLOCKWISE.
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
  *
- * Return value: TRUE if the thumbnail could be successfully added, FALSE
+ * Returns: TRUE if the thumbnail could be successfully added, FALSE
  * otherwise. @error is set appropriately.
- **/
+ *
+ * Since: 0.7.0
+ */
 gboolean
-itdb_artwork_add_thumbnail_from_data (Itdb_Artwork *artwork,
-				      ItdbThumbType type,
+itdb_artwork_set_thumbnail_from_data (Itdb_Artwork *artwork,
 				      const guchar *image_data,
 				      gsize image_data_len,
 				      gint rotation,
@@ -322,15 +285,13 @@
     artwork->artwork_size  = image_data_len;
     artwork->creation_date = time.tv_sec;
 
-    thumb = itdb_thumb_new ();
-    thumb->image_data = g_malloc (image_data_len);
-    thumb->image_data_len = image_data_len;
-    memcpy (thumb->image_data,  image_data, image_data_len);
+    thumb = itdb_thumb_new_from_data (image_data, image_data_len);
+    itdb_thumb_set_rotation (thumb, rotation);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = thumb;
 
-    thumb->type = type;
-    thumb->rotation = rotation;
-    artwork->thumbnails = g_list_append (artwork->thumbnails, thumb);
-
     return TRUE;
 #else
     g_set_error (error, 0, -1,
@@ -339,93 +300,6 @@
 #endif
 }
 
-
-/**
- * itdb_artwork_get_thumb_by_type:
- * @artwork: an #Itdb_Artwork
- * @type: type of the #Itdb_Thumb to retrieve
- *
- * Searches @artwork for an #Itdb_Thumb of type @type.
- * 
- * Returns: an #Itdb_Thumb of type @type, or NULL if such a thumbnail couldn't
- * be found
- **/
-Itdb_Thumb *itdb_artwork_get_thumb_by_type (Itdb_Artwork *artwork,
-					    ItdbThumbType type)
-{
-    GList *gl;
-
-    g_return_val_if_fail (artwork, NULL);
-
-    for (gl=artwork->thumbnails; gl; gl=gl->next)
-    {
-	Itdb_Thumb *thumb = gl->data;
-	g_return_val_if_fail (thumb, NULL);
-	if (thumb->type == type)  return thumb;
-    }
-    return NULL;
-}
-
-
-/**
- * itdb_thumb_get_filename:
- * @device: an #Itdb_Device
- * @thumb: an #Itdb_Thumb
- *
- * Get filename of thumbnail. If it's a thumbnail on the iPod, return
- * the full path to the ithmb file. Otherwise return the full path to
- * the original file.
- *
- * Return value: newly allocated string containing the absolute path to the 
- * thumbnail file. 
- **/
-gchar *itdb_thumb_get_filename (Itdb_Device *device, Itdb_Thumb *thumb)
-{
-    gchar *artwork_dir, *filename=NULL;
-
-    g_return_val_if_fail (device, NULL);
-    g_return_val_if_fail (thumb, NULL);
-
-    /* thumbnail not transferred to the iPod */
-    if (thumb->size == 0)
-	return g_strdup (thumb->filename);
-
-    if (strlen (thumb->filename) < 2)
-    {
-	g_print (_("Illegal filename: '%s'.\n"), thumb->filename);
-	return NULL;
-    }
-
-    if (!device->mountpoint)
-    {
-	g_print (_("Mountpoint not set.\n"));
-	return NULL;
-    }
-    artwork_dir = itdb_get_artwork_dir (device->mountpoint);
-    if (artwork_dir)
-    {
-	filename = itdb_get_path (artwork_dir, thumb->filename+1);
-	g_free (artwork_dir);
-    }
-    /* FIXME: Hack */
-    if( !filename ) {
-	artwork_dir = itdb_get_photos_thumb_dir (device->mountpoint);
-
-	if (artwork_dir)
-	{
-	    const gchar *name_on_disk = strchr( thumb->filename+1, ':');
-	    if (name_on_disk)
-	    {
-		filename = itdb_get_path (artwork_dir, name_on_disk + 1);
-	    }
-	    g_free (artwork_dir);
-	}
-
-    }
-    return filename;
-}
-
-
 #if HAVE_GDKPIXBUF
 static guchar *
 unpack_RGB_565 (guint16 *pixels, guint bytes_len, guint byte_order)
@@ -445,7 +319,7 @@
 		result[3*i] = (cur_pixel & RED_MASK_565) >> RED_SHIFT_565;
 		result[3*i+1] = (cur_pixel & GREEN_MASK_565) >> GREEN_SHIFT_565;
 		result[3*i+2] = (cur_pixel & BLUE_MASK_565) >> BLUE_SHIFT_565;
-		
+
 		/* Normalize color values so that they use a [0..255] range */
 		result[3*i] <<= (8 - RED_BITS_565);
 		result[3*i+1] <<= (8 - GREEN_BITS_565);
@@ -473,7 +347,7 @@
 		result[3*i] = (cur_pixel & RED_MASK_555) >> RED_SHIFT_555;
 		result[3*i+1] = (cur_pixel & GREEN_MASK_555) >> GREEN_SHIFT_555;
 		result[3*i+2] = (cur_pixel & BLUE_MASK_555) >> BLUE_SHIFT_555;
-		
+
 		/* Normalize color values so that they use a [0..255] range */
 		result[3*i] <<= (8 - RED_BITS_555);
 		result[3*i+1] <<= (8 - GREEN_BITS_555);
@@ -502,7 +376,7 @@
 		result[3*i] = (cur_pixel & RED_MASK_888) >> RED_SHIFT_888;
 		result[3*i+1] = (cur_pixel & GREEN_MASK_888) >> GREEN_SHIFT_888;
 		result[3*i+2] = (cur_pixel & BLUE_MASK_888) >> BLUE_SHIFT_888;
-		
+
 		/* Normalize color values so that they use a [0..255] range */
 		/* (not necessary for 888 encoding) */
 /* 		result[3*i] <<= (8 - RED_BITS_888); */
@@ -547,7 +421,7 @@
 			  width/2, height/2,
 			  row_stride);
     }
-    
+
     return pixels_d;
 }
 
@@ -596,7 +470,7 @@
 		result[3*i] = (cur_pixel & RED_MASK_555) >> RED_SHIFT_555;
 		result[3*i+1] = (cur_pixel & GREEN_MASK_555) >> GREEN_SHIFT_555;
 		result[3*i+2] = (cur_pixel & BLUE_MASK_555) >> BLUE_SHIFT_555;
-		
+
 		/* Normalize color values so that they use a [0..255] range */
 		result[3*i] <<= (8 - RED_BITS_555);
 		result[3*i+1] <<= (8 - GREEN_BITS_555);
@@ -637,7 +511,7 @@
 		result[3*i] = (cur_pixel & RED_MASK_888) >> RED_SHIFT_888;
 		result[3*i+1] = (cur_pixel & GREEN_MASK_888) >> GREEN_SHIFT_888;
 		result[3*i+2] = (cur_pixel & BLUE_MASK_888) >> BLUE_SHIFT_888;
-		
+
 		/* Normalize color values so that they use a [0..255] range */
 		/* (not really necessary for 888 encoding) */
 /* 		result[3*i] <<= (8 - RED_BITS_888); */
@@ -695,9 +569,9 @@
 		u = yuvdata[ustart + (row/2)*(width/2) + col/2];
 		v = yuvdata[vstart + (row/2)*(width/2) + col/2];
 
-		rgbdata[z] = limit8bit((y-16)*1.164 + (v-128)*1.596); 
-		rgbdata[z+1] = limit8bit((y-16)*1.164 - (v-128)*0.813 - (u-128)*0.391); 
-		rgbdata[z+2] = limit8bit((y-16)*1.164 + (u-128)*2.018); 
+		rgbdata[z] = limit8bit((y-16)*1.164 + (v-128)*1.596);
+		rgbdata[z+1] = limit8bit((y-16)*1.164 - (v-128)*0.813 - (u-128)*0.391);
+		rgbdata[z+2] = limit8bit((y-16)*1.164 + (u-128)*2.018);
 
 		z+=3;
 		h++;
@@ -772,7 +646,7 @@
 }
 
 static guchar *
-get_pixel_data (Itdb_Device *device, Itdb_Thumb *thumb)
+get_pixel_data (Itdb_Device *device, Itdb_Thumb_Ipod_Item *thumb)
 {
 	gchar *filename = NULL;
 	guchar *result = NULL;
@@ -787,7 +661,7 @@
 	 */
 	result = g_malloc (thumb->size);
 
-	filename = itdb_thumb_get_filename (device, thumb);
+	filename = itdb_thumb_ipod_get_filename (device, thumb);
 
 	if (!filename)
 	{
@@ -798,7 +672,7 @@
 
 	f = fopen (filename, "r");
 	if (f == NULL) {
-		g_print ("Failed to open %s: %s\n", 
+		g_print ("Failed to open %s: %s\n",
 			 filename, strerror (errno));
 		goto error;
 	}
@@ -812,7 +686,7 @@
 
 	res = fread (result, thumb->size, 1, f);
 	if (res != 1) {
-		g_print ("Failed to read %u bytes from %s: %s\n", 
+		g_print ("Failed to read %u bytes from %s: %s\n",
 			 thumb->size, thumb->filename, strerror (errno));
 		goto error;
 	}
@@ -832,7 +706,7 @@
 }
 
 static guchar *
-itdb_thumb_get_rgb_data (Itdb_Device *device, Itdb_Thumb *thumb)
+itdb_thumb_get_rgb_data (Itdb_Device *device, Itdb_Thumb_Ipod_Item *item)
 {
 #if 0
     #include <unistd.h>
@@ -843,16 +717,17 @@
 #endif
 	void *pixels_raw;
 	guchar *pixels=NULL;
-	const Itdb_ArtworkFormat *img_info;
 
 	g_return_val_if_fail (device, NULL);
-	g_return_val_if_fail (thumb, NULL);
-	g_return_val_if_fail (thumb->size != 0, NULL);
-	img_info = itdb_get_artwork_info_from_type (device, thumb->type);
-	g_return_val_if_fail (img_info, NULL);
-	
-	pixels_raw = get_pixel_data (device, thumb);
+	g_return_val_if_fail (item, NULL);
+	g_return_val_if_fail (item->size != 0, NULL);
 
+        if (item->format == NULL) {
+            return NULL;
+        }
+
+	pixels_raw = get_pixel_data (device, item);
+
 #if 0
     name = g_strdup_printf ("thumb_%03d.raw", i++);
     fd = creat (name, S_IRWXU|S_IRWXG|S_IRWXO);
@@ -864,7 +739,7 @@
 		return NULL;
 	}
 
-	switch (img_info->format)
+	switch (item->format->format)
 	{
 	case THUMB_FORMAT_RGB565_LE_90:
 	case THUMB_FORMAT_RGB565_BE_90:
@@ -873,8 +748,8 @@
 	       screen photo thumbnail) */
 	case THUMB_FORMAT_RGB565_LE:
 	case THUMB_FORMAT_RGB565_BE:
-	    pixels = unpack_RGB_565 (pixels_raw, thumb->size,
-				     itdb_thumb_get_byteorder (img_info->format));
+	    pixels = unpack_RGB_565 (pixels_raw, item->size,
+				     itdb_thumb_get_byteorder (item->format->format));
 	    break;
 	case THUMB_FORMAT_RGB555_LE_90:
 	case THUMB_FORMAT_RGB555_BE_90:
@@ -883,8 +758,8 @@
 	       screen photo thumbnail) */
 	case THUMB_FORMAT_RGB555_LE:
 	case THUMB_FORMAT_RGB555_BE:
-	    pixels = unpack_RGB_555 (pixels_raw, thumb->size,
-				     itdb_thumb_get_byteorder (img_info->format));
+	    pixels = unpack_RGB_555 (pixels_raw, item->size,
+				     itdb_thumb_get_byteorder (item->format->format));
 	    break;
 	case THUMB_FORMAT_RGB888_LE_90:
 	case THUMB_FORMAT_RGB888_BE_90:
@@ -892,8 +767,8 @@
 	       different treatment */
 	case THUMB_FORMAT_RGB888_LE:
 	case THUMB_FORMAT_RGB888_BE:
-	    pixels = unpack_RGB_888 (pixels_raw, thumb->size,
-				     itdb_thumb_get_byteorder (img_info->format));
+	    pixels = unpack_RGB_888 (pixels_raw, item->size,
+				     itdb_thumb_get_byteorder (item->format->format));
 	    break;
 	case THUMB_FORMAT_REC_RGB555_LE_90:
 	case THUMB_FORMAT_REC_RGB555_BE_90:
@@ -902,29 +777,29 @@
 	       screen photo thumbnail) */
 	case THUMB_FORMAT_REC_RGB555_LE:
 	case THUMB_FORMAT_REC_RGB555_BE:
-	    pixels = unpack_rec_RGB_555 (pixels_raw, thumb->size,
-					 itdb_thumb_get_byteorder (img_info->format),
-					 img_info->width, img_info->height);
+	    pixels = unpack_rec_RGB_555 (pixels_raw, item->size,
+					 itdb_thumb_get_byteorder (item->format->format),
+					 item->format->width, item->format->height);
 	    break;
 	case THUMB_FORMAT_EXPERIMENTAL_LE:
 	case THUMB_FORMAT_EXPERIMENTAL_BE:
 #if DEBUG_ARTWORK
-	    pixels = unpack_experimental (pixels_raw, thumb->size,
-					  itdb_thumb_get_byteorder (img_info->format),
-					  img_info->width, img_info->height);
+	    pixels = unpack_experimental (pixels_raw, item->size,
+					  itdb_thumb_get_byteorder (item->format->format),
+					  item->format->width, item->format->height);
 	    break;
 #endif
 	case THUMB_FORMAT_UYVY_LE:
 	case THUMB_FORMAT_UYVY_BE:
-	    pixels = unpack_UYVY (pixels_raw, thumb->size,
-				  itdb_thumb_get_byteorder (img_info->format),
-				  img_info->width, img_info->height);
+	    pixels = unpack_UYVY (pixels_raw, item->size,
+				  itdb_thumb_get_byteorder (item->format->format),
+				  item->format->width, item->format->height);
 	    break;
 	case THUMB_FORMAT_I420_LE:
 	case THUMB_FORMAT_I420_BE:
-	    pixels = unpack_I420 (pixels_raw, thumb->size,
-				  itdb_thumb_get_byteorder (img_info->format),
-				  img_info->width, img_info->height);
+	    pixels = unpack_I420 (pixels_raw, item->size,
+				  itdb_thumb_get_byteorder (item->format->format),
+				  item->format->width, item->format->height);
 	    break;
 	}
 	g_free (pixels_raw);
@@ -932,154 +807,29 @@
 	return pixels;
 
 }
-#endif
 
-
-
-/**
- * itdb_thumb_get_gdk_pixbuf:
- * @device: an #Itdb_Device
- * @thumb: an #Itdb_Thumb
- * 
- * Converts @thumb to a #GdkPixbuf.
- * Since we want to have gdk-pixbuf dependency optional, a generic
- * gpointer is returned which you have to cast to a #GdkPixbuf using 
- * GDK_PIXBUF() yourself. 
- *
- * Return value: a #GdkPixbuf that must be unreffed with gdk_pixbuf_unref()
- * after use, or NULL if the creation of the gdk-pixbuf failed or if 
- * libgpod was compiled without gdk-pixbuf support.
- **/
-gpointer
-itdb_thumb_get_gdk_pixbuf (Itdb_Device *device, Itdb_Thumb *thumb)
+gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                         Itdb_Thumb_Ipod_Item *item)
 {
-#if HAVE_GDKPIXBUF
-    GdkPixbuf *pixbuf=NULL;
-    guchar *pixels;
-    const Itdb_ArtworkFormat *img_info=NULL;
-
-    g_return_val_if_fail (thumb, NULL);
-
-    /* If we are dealing with an iPod (device != NULL), use default
-       image dimensions as used on the iPod in question.
-
-       If we are not dealing with an iPod, we can only return a pixmap
-       for thumbnails "not transferred to the iPod" (thumb->size ==
-       0).
-    */
-    if (device != NULL)
-    {
-	img_info = itdb_get_artwork_info_from_type (device, thumb->type);
-    }
-
-    if (thumb->size == 0)
-    {   /* thumbnail has not yet been transferred to the iPod */
-	gint width=0, height=0;
-
-	if (img_info != NULL)
-	{   /* use image dimensions from iPod */
-	    width = img_info->width;
-	    height = img_info->height;
-	}
-	else
-	{   /* use default dimensions */
-	    /* FIXME: better way to use the ipod_color dimensions? */
-	    switch (thumb->type)
-	    {
-	    case ITDB_THUMB_COVER_SMALL:
-		width =  56;  height =  56;  break;
-	    case ITDB_THUMB_COVER_LARGE:
-		width = 140;  height = 140;  break;
-	    case ITDB_THUMB_PHOTO_SMALL:
-		width =  42;  height =  30;  break;
-	    case ITDB_THUMB_PHOTO_LARGE:
-		width = 130;  height =  88;  break;
-	    case ITDB_THUMB_PHOTO_FULL_SCREEN:
-		width = 220;  height = 176;  break;
-	    case ITDB_THUMB_PHOTO_TV_SCREEN:
-		width = 720;  height = 480;  break;
-	    case ITDB_THUMB_COVER_XLARGE:
-		width = 320;  height = 320;  break;
-	    case ITDB_THUMB_COVER_MEDIUM:
-		width = 128;  height = 128;  break;
-	    case ITDB_THUMB_COVER_SMEDIUM:
-		width = 88;  height = 88;  break;
-	    case ITDB_THUMB_COVER_XSMALL:
-		width = 56;  height = 56;  break;
-	    }
-	    if (width == 0)
-	    {
-		width = 140;
-		height = 140;
-	    }
-	}
-
-	if (thumb->filename)
-	{   /* read data from filename */
-	    pixbuf = gdk_pixbuf_new_from_file_at_size (thumb->filename, 
-						       width, height,
-						       NULL);
-	}
-	else if (thumb->image_data)
-	{   /* use data stored in image_data */
-	    	GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
-		g_return_val_if_fail (loader, FALSE);
-		gdk_pixbuf_loader_set_size (loader,
-					    width, height);
-		gdk_pixbuf_loader_write (loader,
-					 thumb->image_data,
-					 thumb->image_data_len,
-					 NULL);
-		gdk_pixbuf_loader_close (loader, NULL);
-		pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
-		if (pixbuf)
-		    g_object_ref (pixbuf);
-		g_object_unref (loader);
-	}
-	else if (thumb->pixbuf)
-	{   /* use pixbuf data */
-	    pixbuf = gdk_pixbuf_scale_simple (thumb->pixbuf,
-					      width, height,
-					      GDK_INTERP_BILINEAR);
-	}
-
-	if (!pixbuf)
-	{
-	    return NULL;
-	}
-
-	/* !! cannot write directly to &thumb->width/height because
-	   g_object_get() returns a gint, but thumb->width/height are
-	   gint16 !! */
-	g_object_get (G_OBJECT (pixbuf), 
-		      "width", &width,
-		      "height", &height,
-		      NULL);
-
-	thumb->width = width;
-	thumb->height = height;
-    }
-    else
-    {
 	/* pixbuf is already on the iPod -> read from there */
 	GdkPixbuf *pixbuf_full;
 	GdkPixbuf *pixbuf_sub;
-	gint pad_x = thumb->horizontal_padding;
-	gint pad_y = thumb->vertical_padding;
-	gint width = thumb->width;
-	gint height = thumb->height;
+        GdkPixbuf *pixbuf;
+	gint pad_x = item->horizontal_padding;
+	gint pad_y = item->vertical_padding;
+	gint width = item->width;
+	gint height = item->height;
+        const Itdb_ArtworkFormat *img_info = item->format;
+        guchar *pixels;
 
 /*	printf ("hp%d vp%d w%d h%d\n",
 	       pad_x, pad_y, width, height);*/
-
-	if (img_info == NULL)
-	{
-	    g_print (_("Unable to retrieve thumbnail (appears to be on iPod, but no image info available): type: %d, filename: '%s'\n"),
-		     thumb->type, thumb->filename);
-	    return NULL;
-	}
-
-	pixels = itdb_thumb_get_rgb_data (device, thumb);
+        if (item->format == NULL) {
+	    g_warning (_("Unable to retrieve thumbnail (appears to be on iPod, but no image info available): filename: '%s'\n"),
+		       item->filename);
+            return NULL;
+        }
+	pixels = itdb_thumb_get_rgb_data (device, item);
 	if (pixels == NULL)
 	{
 	    return NULL;
@@ -1093,6 +843,7 @@
 				      img_info->width*3,
 				      (GdkPixbufDestroyNotify)g_free,
 				      NULL);
+
 	/* !! do not g_free(pixels) here: it will be freed when doing a
 	 * gdk_pixbuf_unref() on the GdkPixbuf !! */
 
@@ -1129,113 +880,44 @@
 	pixbuf = gdk_pixbuf_copy (pixbuf_sub);
 	gdk_pixbuf_unref (pixbuf_full);
 	gdk_pixbuf_unref (pixbuf_sub);
-    }
 
-    return pixbuf;
+        return pixbuf;
+}
 #else
+gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                         Itdb_Thumb_Ipod_Item *item)
+{
     return NULL;
-#endif
 }
+#endif
 
 /**
- * itdb_thumb_new:
- * 
- * Creates a new #Itdb_Thumb
+ * itdb_artwork_get_pixbuf:
+ * @artwork:    an #Itdb_Artwork
+ * @device:     an #Itdb_Device
+ * @width:      width of the pixbuf to retrieve, -1 for the biggest
+ *              possible size and 0 for the smallest possible size (with no
+ *              scaling)
+ * @height:     height of the pixbuf to retrieve, -1 for the biggest possible
+ *              size and 0 for the smallest possible size (with no scaling)
  *
- * Return Value: newly allocated #Itdb_Thumb to be freed with itdb_thumb_free()
- * after use
- **/
-Itdb_Thumb *itdb_thumb_new (void)
-{
-    Itdb_Thumb *thumb = g_new0 (Itdb_Thumb, 1);
-    return thumb;
-}
-
-/** 
- * itdb_thumb_free:
- * @thumb: an #Itdb_Thumb
+ * Returns a #GdkPixbuf representing the thumbnail stored in @artwork
+ * scaling it if appropriate. If either height or width is -1, then the
+ * biggest unscaled thumbnail available will be returned
  *
- * Frees the memory used by @thumb
- **/
-void itdb_thumb_free (Itdb_Thumb *thumb)
-{
-    g_return_if_fail (thumb);
-
-    g_free (thumb->image_data);
-#ifdef HAVE_GDKPIXBUF
-    if (thumb->pixbuf) {
-        g_object_unref (G_OBJECT (thumb->pixbuf));
-    }
-#endif
-    g_free (thumb->filename);
-    g_free (thumb);
-}
-
-
-/** 
- * itdb_thumb_duplicate:
- * @thumb: an #Itdb_Thumb
+ * Returns: a #GdkPixbuf that must be unreffed when no longer used, NULL
+ * if no artwork could be found or if libgpod is compiled without GdkPixbuf
+ * support
  *
- * Duplicates the data contained in @thumb
- *
- * Return value: a newly allocated copy of @thumb to be freed with 
- * itdb_thumb_free() after use
- **/
-Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb)
+ * Since: 0.7.0
+ */
+gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
+                                  gint width, gint height)
 {
-    Itdb_Thumb *new_thumb;
-
-    g_return_val_if_fail (thumb, NULL);
-
-    new_thumb = itdb_thumb_new ();
-    memcpy (new_thumb, thumb, sizeof (Itdb_Thumb));
-    new_thumb->filename = g_strdup (thumb->filename);
- 
-    if (thumb->image_data)
-    {
-	/* image_data_len already copied with the memcpy above */
-	new_thumb->image_data = g_malloc (thumb->image_data_len);
-	memcpy (new_thumb->image_data, thumb->image_data,
-		new_thumb->image_data_len);
+    g_return_val_if_fail (artwork != NULL, NULL);
+    if (artwork->thumbnail == NULL) {
+        return NULL;
     }
-#ifdef HAVE_GDKPIXBUF
-    if (thumb->pixbuf) {
-        g_object_ref (G_OBJECT (thumb->pixbuf));
-    }
-#endif
-    return new_thumb;
+    return itdb_thumb_to_pixbuf_at_size (device, artwork->thumbnail,
+                                         width, height);
 }
-
-
-G_GNUC_INTERNAL gint
-itdb_thumb_get_byteorder (const ItdbThumbFormat format)
-{
-    switch (format)
-    {
-    case THUMB_FORMAT_UYVY_LE:
-    case THUMB_FORMAT_I420_LE:
-    case THUMB_FORMAT_RGB565_LE:
-    case THUMB_FORMAT_RGB565_LE_90:
-    case THUMB_FORMAT_RGB555_LE:
-    case THUMB_FORMAT_RGB555_LE_90:
-    case THUMB_FORMAT_RGB888_LE:
-    case THUMB_FORMAT_RGB888_LE_90:
-    case THUMB_FORMAT_REC_RGB555_LE:
-    case THUMB_FORMAT_REC_RGB555_LE_90:
-    case THUMB_FORMAT_EXPERIMENTAL_LE:
-	return G_LITTLE_ENDIAN;
-    case THUMB_FORMAT_UYVY_BE:
-    case THUMB_FORMAT_I420_BE:
-    case THUMB_FORMAT_RGB565_BE:
-    case THUMB_FORMAT_RGB565_BE_90:
-    case THUMB_FORMAT_RGB555_BE:
-    case THUMB_FORMAT_RGB555_BE_90:
-    case THUMB_FORMAT_RGB888_BE:
-    case THUMB_FORMAT_RGB888_BE_90:
-    case THUMB_FORMAT_REC_RGB555_BE:
-    case THUMB_FORMAT_REC_RGB555_BE_90:
-    case THUMB_FORMAT_EXPERIMENTAL_BE:
-	return G_BIG_ENDIAN;
-    }
-    g_return_val_if_reached (-1);
-}

Copied: libgpod/trunk/src/itdb_chapterdata.c (from rev 340, libgpod/branches/upstream/current/src/itdb_chapterdata.c)
===================================================================
--- libgpod/trunk/src/itdb_chapterdata.c	                        (rev 0)
+++ libgpod/trunk/src/itdb_chapterdata.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,250 @@
+/* Time-stamp: <2007-03-21 17:30:57 jcs>
+|
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_chapterdata.c 1612 2007-06-29 16:02:00Z jcsjcs $
+*/
+
+#include <config.h>
+
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "itdb_endianness.h"
+#include <stdio.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+
+/**
+ * itdb_chapterdata_new:
+ *
+ * Creates a new #Itdb_Chapterdata
+ *
+ * Returns: a new #Itdb_Chapterdata to be freed with
+ *               itdb_chapterdata_free() when no longer needed
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapterdata *itdb_chapterdata_new (void)
+{
+    Itdb_Chapterdata *chapterdata = g_new0 (Itdb_Chapterdata, 1);
+    return chapterdata;
+}
+
+/**
+ * itdb_chapterdata_free:
+ * @chapterdata: an #Itdb_Chapterdata
+ *
+ * Frees memory used by @chapterdata
+ *
+ * Since: 0.7.0
+ */
+void itdb_chapterdata_free (Itdb_Chapterdata *chapterdata)
+{
+    g_return_if_fail (chapterdata);
+    itdb_chapterdata_remove_chapters (chapterdata);
+    g_free (chapterdata);
+}
+
+static GList *dup_chapters (GList *chapters)
+{
+    GList *it;
+    GList *result;
+
+    g_return_val_if_fail (chapters, NULL);
+    result = NULL;
+    for (it = chapters; it != NULL; it = it->next)
+    {
+	Itdb_Chapter *new_chapter;
+	Itdb_Chapter *chapter;
+
+	chapter = (Itdb_Chapter *)(it->data);
+	g_return_val_if_fail (chapter, NULL);
+
+	new_chapter = itdb_chapter_duplicate (chapter);
+
+	result = g_list_prepend (result, new_chapter);
+    }
+
+    return g_list_reverse (result);
+}
+
+/**
+ * itdb_chapterdata_duplicate:
+ * @chapterdata: an #Itdb_Chapterdata
+ *
+ * Duplicates @chapterdata
+ *
+ * Returns: a new copy of @chapterdata
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapterdata *itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata)
+{
+    Itdb_Chapterdata *dup;
+    int numchapters;
+    g_return_val_if_fail (chapterdata, NULL);
+
+    dup = g_new0 (Itdb_Chapterdata, 1);
+
+    memcpy (dup, chapterdata, sizeof (Itdb_Chapterdata));
+
+    numchapters = g_list_length (chapterdata->chapters);
+    if (chapterdata->chapters)
+	dup->chapters = dup_chapters (chapterdata->chapters);
+    else
+	dup->chapters = NULL;
+
+    return dup;
+}
+
+/**
+ * itdb_chapterdata_remove_chapter:
+ * @chapterdata: an #Itdb_Chapterdata
+ * @chapter:     an #Itdb_Chapter
+ *
+ * Removes @chapter from @chapterdata. The memory used by @chapter is freed.
+ *
+ * Since: 0.7.0
+ */
+void
+itdb_chapterdata_remove_chapter (Itdb_Chapterdata *chapterdata, Itdb_Chapter *chapter)
+{
+    g_return_if_fail (chapterdata);
+    g_return_if_fail (chapter);
+
+    chapterdata->chapters = g_list_remove (chapterdata->chapters, chapter);
+    itdb_chapter_free (chapter);
+}
+
+/**
+ * itdb_chapterdata_remove_chapters:
+ * @chapterdata: an #Itdb_Chapterdata
+ *
+ * Removes all chapters from @chapterdata
+ *
+ * Since: 0.7.0
+ */
+void
+itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata)
+{
+    g_return_if_fail (chapterdata);
+
+    while (chapterdata->chapters)
+    {
+	Itdb_Chapter *chapter = chapterdata->chapters->data;
+	g_return_if_fail (chapter);
+	itdb_chapterdata_remove_chapter (chapterdata, chapter);
+    }
+}
+
+/**
+ * itdb_chapter_new:
+ *
+ * Creates a new #Itdb_Chapter
+ *
+ * Returns: newly allocated #Itdb_Chapter to be freed with itdb_chapter_free()
+ * after use
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapter *itdb_chapter_new (void)
+{
+    Itdb_Chapter *chapter = g_new0 (Itdb_Chapter, 1);
+    return chapter;
+}
+
+/**
+ * itdb_chapter_free:
+ * @chapter: an #Itdb_Chapter
+ *
+ * Frees the memory used by @chapter
+ *
+ * Since: 0.7.0
+ */
+void itdb_chapter_free (Itdb_Chapter *chapter)
+{
+    g_return_if_fail (chapter);
+
+    g_free (chapter->chaptertitle);
+    g_free (chapter);
+}
+
+/**
+ * itdb_chapter_duplicate:
+ * @chapter: an #Itdb_Chapter
+ *
+ * Duplicates the data contained in @chapter
+ *
+ * Returns: a newly allocated copy of @chapter to be freed with
+ * itdb_chapter_free() after use
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapter *itdb_chapter_duplicate (Itdb_Chapter *chapter)
+{
+    Itdb_Chapter *new_chapter;
+
+    g_return_val_if_fail (chapter, NULL);
+
+    new_chapter = itdb_chapter_new ();
+    memcpy (new_chapter, chapter, sizeof (Itdb_Chapter));
+    new_chapter->chaptertitle = g_strdup (chapter->chaptertitle);
+
+    return new_chapter;
+}
+
+/**
+ * itdb_chapterdata_add_chapter
+ * @chapterdata:  an #Itdb_Chapterdata
+ * @startpos:     chapter start time in milliseconds
+ * @chaptertitle: chapter title
+ *
+ * Appends a chapter to existing chapters in @chapterdata.
+ *
+ * Returns: TRUE if the chapter could be successfully added, FALSE
+ * otherwise.
+ *
+ * Since: 0.7.0
+ */
+gboolean
+itdb_chapterdata_add_chapter (Itdb_Chapterdata *chapterdata,
+			      gint32 startpos,
+			      gchar *chaptertitle)
+{
+    Itdb_Chapter *chapter;
+
+    g_return_val_if_fail (chapterdata, FALSE);
+    g_return_val_if_fail (chaptertitle, FALSE);
+
+    chapter = itdb_chapter_new ();
+    if (startpos == 0)
+	chapter->startpos = 1; /* first chapter should have startpos of 1 */
+    else
+	chapter->startpos = startpos;
+    chapter->chaptertitle = g_strdup (chaptertitle);
+    chapterdata->chapters = g_list_append (chapterdata->chapters, chapter);
+
+    return TRUE;
+}

Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_device.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -27,7 +27,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_device.c 1772 2007-11-10 11:14:57Z jcsjcs $
+|  $Id: itdb_device.c 2219 2009-01-17 12:07:49Z teuf $
 */
 
 #include "itdb_device.h"
@@ -38,8 +38,15 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <time.h>
+#ifdef __CYGWIN__
+    extern __IMPORT long _timezone;
+#endif
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
 
 static const Itdb_IpodInfo ipod_info_table [] = {
     /* Handle idiots who hose their iPod file system, or lucky people
@@ -113,7 +120,7 @@
     {"9725", 1,  ITDB_IPOD_MODEL_SHUFFLE,     ITDB_IPOD_GENERATION_SHUFFLE_1, 3},
     /* Shuffle / Sixth Generation */
     /* Square, connected to computer via cable */
-    {"A564", 1,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
+    {"A546", 1,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
     {"A947", 1,  ITDB_IPOD_MODEL_SHUFFLE_PINK,   ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
     {"A949", 1,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
     {"A951", 1,  ITDB_IPOD_MODEL_SHUFFLE_GREEN,  ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
@@ -123,8 +130,15 @@
      * Sixth Generation*/
     {"B225", 1,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
     {"B233", 1,  ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B231", 1,  ITDB_IPOD_MODEL_SHUFFLE_RED,    ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
     {"B227", 1,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B228", 1,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
     {"B229", 1,  ITDB_IPOD_MODEL_SHUFFLE_GREEN,  ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B518", 2,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B520", 2,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B522", 2,  ITDB_IPOD_MODEL_SHUFFLE_GREEN,  ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B524", 2,  ITDB_IPOD_MODEL_SHUFFLE_RED,    ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B526", 2,  ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
 
     /* Nano / Fifth Generation (first nano generation) */
     /* Buttons are integrated into the "touch wheel". */
@@ -159,6 +173,8 @@
     {"A428",  4, ITDB_IPOD_MODEL_NANO_BLUE,   ITDB_IPOD_GENERATION_NANO_2,   6},
     {"A487",  4, ITDB_IPOD_MODEL_NANO_GREEN,  ITDB_IPOD_GENERATION_NANO_2,   6},
     {"A489",  4, ITDB_IPOD_MODEL_NANO_PINK,   ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A725",  4, ITDB_IPOD_MODEL_NANO_RED,    ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A726",  8, ITDB_IPOD_MODEL_NANO_RED,    ITDB_IPOD_GENERATION_NANO_2,   6},
     {"A497",  8, ITDB_IPOD_MODEL_NANO_BLACK,  ITDB_IPOD_GENERATION_NANO_2,  14},
 
     /* HP iPods, need contributions for this table */
@@ -173,6 +189,10 @@
     {"B145", 160, ITDB_IPOD_MODEL_CLASSIC_SILVER, ITDB_IPOD_GENERATION_CLASSIC_1, 50},
     {"B150", 160, ITDB_IPOD_MODEL_CLASSIC_BLACK,  ITDB_IPOD_GENERATION_CLASSIC_1, 50},
 
+    /* iPod Classic G2 */
+    {"B562", 120, ITDB_IPOD_MODEL_CLASSIC_SILVER, ITDB_IPOD_GENERATION_CLASSIC_2, 50},
+    {"B565", 120, ITDB_IPOD_MODEL_CLASSIC_BLACK,  ITDB_IPOD_GENERATION_CLASSIC_2, 50},
+
     /* iPod nano video G1 (Third Nano Generation) */
     /* First generation of video support for nano */
     {"A978",   4, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_3,  6},
@@ -182,18 +202,54 @@
     {"B253",   8, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_3, 14},
     {"B257",   8, ITDB_IPOD_MODEL_NANO_RED,       ITDB_IPOD_GENERATION_NANO_3, 14},
 
+    /* iPod nano video G2 (Fourth Nano Generation) */
+    {"B480",   4, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B651",   4, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B654",   4, ITDB_IPOD_MODEL_NANO_PINK,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B657",   4, ITDB_IPOD_MODEL_NANO_PURPLE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B660",   4, ITDB_IPOD_MODEL_NANO_ORANGE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B663",   4, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B666",   4, ITDB_IPOD_MODEL_NANO_YELLOW,    ITDB_IPOD_GENERATION_NANO_4, 14},
+
+    {"B598",   8, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B732",   8, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B735",   8, ITDB_IPOD_MODEL_NANO_PINK,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B739",   8, ITDB_IPOD_MODEL_NANO_PURPLE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B742",   8, ITDB_IPOD_MODEL_NANO_ORANGE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B745",   8, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B748",   8, ITDB_IPOD_MODEL_NANO_YELLOW,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B751",   8, ITDB_IPOD_MODEL_NANO_RED,       ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B754",   8, ITDB_IPOD_MODEL_NANO_BLACK,     ITDB_IPOD_GENERATION_NANO_4, 14},
+
+    {"B903",  16, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B905",  16, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B907",  16, ITDB_IPOD_MODEL_NANO_PINK,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B909",  16, ITDB_IPOD_MODEL_NANO_PURPLE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B911",  16, ITDB_IPOD_MODEL_NANO_ORANGE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B913",  16, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B915",  16, ITDB_IPOD_MODEL_NANO_YELLOW,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B917",  16, ITDB_IPOD_MODEL_NANO_RED,       ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B918",  16, ITDB_IPOD_MODEL_NANO_BLACK,     ITDB_IPOD_GENERATION_NANO_4, 14},
+
     /* iPod touch G1 */
     /* With touch screen */
     {"A623",   8, ITDB_IPOD_MODEL_TOUCH_BLACK,    ITDB_IPOD_GENERATION_TOUCH_1, 14},
-    {"A627",  16, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_TOUCH_1, 28},
+    {"A627",  16, ITDB_IPOD_MODEL_TOUCH_BLACK,    ITDB_IPOD_GENERATION_TOUCH_1, 28},
 
+    /* iPhone G1 */
+    /* We used to not have a model number for the iPhone so we had that
+     * dummy "iPhone1" model number, we now keep it here for backward
+     * compatibility reasons
+     */
+    {"A501",  4, ITDB_IPOD_MODEL_IPHONE_1,       ITDB_IPOD_GENERATION_IPHONE_1, 14},
+    {"A712",  8, ITDB_IPOD_MODEL_IPHONE_1,       ITDB_IPOD_GENERATION_IPHONE_1, 14},
+    {"iPhone1", -1, ITDB_IPOD_MODEL_IPHONE_1, ITDB_IPOD_GENERATION_IPHONE_1, 14},
 
     /* No known model number -- create a Device/SysInfo file with
      * one entry, e.g.:
        ModelNumStr: Mmobile1
     */
     {"mobile1", -1, ITDB_IPOD_MODEL_MOBILE_1, ITDB_IPOD_GENERATION_MOBILE,  6},
-    {"iPhone1", -1, ITDB_IPOD_MODEL_IPHONE_1, ITDB_IPOD_GENERATION_MOBILE, 14},
 
     {NULL, 0, 0, 0, 0}
 };
@@ -224,6 +280,9 @@
 	N_("Nano (Green)"),
 	N_("Nano (Pink)"),
 	N_("Nano (Red)"),
+	N_("Nano (Yellow)"),
+	N_("Nano (Purple)"),
+	N_("Nano (Orange)"),
 	N_("iPhone (1)"),
 	N_("Shuffle (Silver)"),
 	N_("Shuffle (Pink)"),
@@ -231,6 +290,7 @@
 	N_("Shuffle (Green)"),
 	N_("Shuffle (Orange)"),
 	N_("Shuffle (Purple)"),
+	N_("Shuffle (Red)"),
 	N_("Classic (Silver)"),
 	N_("Classic (Black)"),
 	N_("Touch (Black)"),
@@ -254,83 +314,361 @@
 	N_("Nano (1st Gen.)"),
 	N_("Nano (2nd Gen.)"),
 	N_("Nano Video (3rd Gen.)"),
+	N_("Nano Video (4th Gen.)"),
 	N_("Video (1st Gen.)"),
 	N_("Video (2nd Gen.)"),
 	N_("Classic"),
-	N_("Touch (Read-Only)"),
+	N_("Classic"),
+	N_("Touch"),
+        N_("iPhone"),
 	N_("Unused"),
 	N_("Unused"),
 	NULL
 };
 
-static const Itdb_ArtworkFormat ipod_photo_artwork_info[] = {
-    {ITDB_THUMB_COVER_SMALL,       56,  56, 1017, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_COVER_LARGE,      140, 140, 1016, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_SMALL,       42,  30, 1009, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_LARGE,      130,  88, 1015, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_FULL_SCREEN,220, 176, 1013, THUMB_FORMAT_RGB565_BE_90},
-    {ITDB_THUMB_PHOTO_TV_SCREEN,  720, 480, 1019, THUMB_FORMAT_UYVY_BE},
-    {-1,                           -1,  -1,   -1, -1}
+
+static const Itdb_ArtworkFormat ipod_photo_cover_art_info[] = {
+    {1017,  56,  56, THUMB_FORMAT_RGB565_LE},
+    {1016, 140, 140, THUMB_FORMAT_RGB565_LE},
+    { -1,   -1,  -1, -1}
 };
 
-static const Itdb_ArtworkFormat ipod_nano_artwork_info[] = {
-    {ITDB_THUMB_COVER_SMALL,       42,  42, 1031, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_COVER_LARGE,      100, 100, 1027, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_LARGE,       42,  37, 1032, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_FULL_SCREEN,176, 132, 1023, THUMB_FORMAT_RGB565_BE},
-    {-1,                           -1,  -1,   -1, -1}
+static const Itdb_ArtworkFormat ipod_photo_photo_info[] = {
+    {1009,  42,  30, THUMB_FORMAT_RGB565_LE},
+    {1015, 130,  88, THUMB_FORMAT_RGB565_LE},
+    {1013, 220, 176, THUMB_FORMAT_RGB565_BE_90},
+    {1019, 720, 480, THUMB_FORMAT_UYVY_BE},
+    {  -1,  -1,  -1, -1}
 };
 
-static const Itdb_ArtworkFormat ipod_video_artwork_info[] = {
-    {ITDB_THUMB_COVER_SMALL,      100, 100, 1028, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_COVER_LARGE,      200, 200, 1029, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_SMALL,       50,  41, 1036, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_LARGE,      130,  88, 1015, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_FULL_SCREEN,320, 240, 1024, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_TV_SCREEN,  720, 480, 1019, THUMB_FORMAT_UYVY_BE},
-    {-1,                           -1,  -1,   -1, -1}
+static const Itdb_ArtworkFormat ipod_nano_cover_art_info[] = {
+    {1031,  42,  42, THUMB_FORMAT_RGB565_LE},
+    {1027, 100, 100, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
 };
 
-static const Itdb_ArtworkFormat ipod_mobile_1_artwork_info[] = {
-    {ITDB_THUMB_COVER_SMALL,       50,  50, 2002, THUMB_FORMAT_RGB565_BE},
-    {ITDB_THUMB_COVER_LARGE,      150, 150, 2003, THUMB_FORMAT_RGB565_BE},
-    {-1,                           -1,  -1,   -1, -1}
+static const Itdb_ArtworkFormat ipod_nano_photo_info[] = {
+    {1032,  42,  37, THUMB_FORMAT_RGB565_LE},
+    {1023, 176, 132, THUMB_FORMAT_RGB565_BE},
+    {  -1,  -1,  -1, -1}
 };
 
-static const Itdb_ArtworkFormat ipod_touch_1_artwork_info[] = {
-    {ITDB_THUMB_COVER_LARGE,      256, 256, 3001, THUMB_FORMAT_REC_RGB555_LE},
-    {ITDB_THUMB_COVER_MEDIUM,     128, 128, 3002, THUMB_FORMAT_REC_RGB555_LE},
-    {ITDB_THUMB_COVER_SMALL,       64,  64, 3003, THUMB_FORMAT_REC_RGB555_LE},
-    {ITDB_THUMB_COVER_XLARGE,     320, 320, 3005, THUMB_FORMAT_RGB555_LE},
-    {ITDB_THUMB_COVER_XSMALL,      56,  56, 3006, THUMB_FORMAT_RGB555_LE,  8192}, /*pad data to  8192 bytes */
-    {ITDB_THUMB_COVER_SMEDIUM,     88,  88, 3007, THUMB_FORMAT_RGB555_LE, 16364}, /*pad data to 16384 bytes */
-    {ITDB_THUMB_PHOTO_SMALL,       56,  55, 3004, THUMB_FORMAT_RGB555_LE, 8192},
-    {ITDB_THUMB_PHOTO_LARGE,       80,  79, 3011, THUMB_FORMAT_RGB555_LE},
-    {ITDB_THUMB_PHOTO_FULL_SCREEN,160, 120, 3009, THUMB_FORMAT_RGB555_LE},
-    {ITDB_THUMB_PHOTO_TV_SCREEN,  640, 480, 3008, THUMB_FORMAT_RGB555_LE},
-    {-1,                           -1,  -1,   -1, -1}
+static const Itdb_ArtworkFormat ipod_nano4g_cover_art_info[] = {
+    {1055, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1068, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1071, 240, 240, THUMB_FORMAT_RGB565_LE},
+    {1074,  50,  50, THUMB_FORMAT_RGB565_LE},
+    {1078,  80,  80, THUMB_FORMAT_RGB565_LE},
+    {1084, 240, 240, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
 };
 
-static const Itdb_ArtworkFormat ipod_classic_1_artwork_info[] = {
+static const Itdb_ArtworkFormat ipod_nano4g_photo_info[] = {
+    {1024, 320, 240, THUMB_FORMAT_RGB565_LE},
+    {1066,  64,  64, THUMB_FORMAT_RGB565_LE},
+    {1079,  80,  80, THUMB_FORMAT_RGB565_LE},
+    /*
+     * To be implemented, THUMB_FORMAT_JPEG 
+    {1081, 640, 480, THUMB_FORMAT_JPEG},
+    */
+    {1083, 240, 320, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_nano4g_chapter_image_info[] = {
+    {1071, 240, 240, THUMB_FORMAT_RGB565_LE},
+};
+
+static const Itdb_ArtworkFormat ipod_video_cover_art_info[] = {
+    {1028, 100, 100, THUMB_FORMAT_RGB565_LE},
+    {1029, 200, 200, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_video_photo_info[] = {
+    {1036,  50,  41, THUMB_FORMAT_RGB565_LE},
+    {1015, 130,  88, THUMB_FORMAT_RGB565_LE},
+    {1024, 320, 240, THUMB_FORMAT_RGB565_LE},
+    {1019, 720, 480, THUMB_FORMAT_UYVY_BE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_mobile_1_cover_art_info[] = {
+    {2002,  50,  50, THUMB_FORMAT_RGB565_BE},
+    {2003, 150, 150, THUMB_FORMAT_RGB565_BE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_touch_1_cover_art_info[] = {
+    {3001, 256, 256, THUMB_FORMAT_REC_RGB555_LE},
+    {3002, 128, 128, THUMB_FORMAT_REC_RGB555_LE},
+    {3003,  64,  64, THUMB_FORMAT_REC_RGB555_LE},
+    {3005, 320, 320, THUMB_FORMAT_RGB555_LE},
+    {3006,  56,  56, THUMB_FORMAT_RGB555_LE,  8192}, /*pad data to  8192 bytes */
+    {3007,  88,  88, THUMB_FORMAT_RGB555_LE, 16364}, /*pad data to 16384 bytes */
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_touch_1_photo_info[] = {
+    /* In the album list, if a photo is being used to represent a whole album,
+       PHOTO_SMALL is used.  We specify TRUE for the crop option so we fill
+       the square completely. */
+    {3004,  56,  55, THUMB_FORMAT_RGB555_LE, 8192, TRUE},
+    /* In thumbnail view, PHOTO_LARGE is used.  It's actually 79x79, with a 4px
+       white border on the right and bottom.  We specify TRUE for the crop option
+       so we fill the square completely. */
+    {3011,  80,  79, THUMB_FORMAT_RGB555_LE, 0, TRUE},
+    {3009, 160, 120, THUMB_FORMAT_RGB555_LE},
+    /* When viewing an individual photo, PHOTO_TV_SCREEN is used.  Note that it
+       is acceptable to write a thumbnail less than the specified width or
+       height, the iPhone / iTouch will scale it to fit the screen.  This is
+       important for images that are taller than they wide. */
+    {3008, 640, 480, THUMB_FORMAT_RGB555_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+/* also used for 3G Nano */
+static const Itdb_ArtworkFormat ipod_classic_1_cover_art_info[] = {
     /* officially 55x55 -- verify! */
-    {ITDB_THUMB_COVER_XSMALL,      56,  56, 1061, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_COVER_MEDIUM,     128, 128, 1055, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_COVER_XLARGE,     320, 320, 1060, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_PHOTO_TV_SCREEN,  720, 480, 1067, THUMB_FORMAT_I420_LE},
-    {ITDB_THUMB_PHOTO_FULL_SCREEN,320, 240, 1064, THUMB_FORMAT_RGB888_LE},
-    {ITDB_THUMB_PHOTO_SMALL,       64,  64, 1066, THUMB_FORMAT_RGB565_LE},
-/*  These are the same as for the iPod video... -- labeled by the iPod as
-    "chapter images" */
-    {ITDB_THUMB_COVER_SMALL,      100, 100, 1028, THUMB_FORMAT_RGB565_LE},
-    {ITDB_THUMB_COVER_LARGE,      200, 200, 1029, THUMB_FORMAT_RGB565_LE},
-    {-1,                           -1,  -1,   -1, -1}
+    {1061,  56,  56, THUMB_FORMAT_RGB565_LE},
+    {1055, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1060, 320, 320, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
 };
 
-/* these are identical... */
-#define ipod_nano3_artwork_info ipod_classic_1_artwork_info
-/* these might be identical... Please report if not*/
-#define ipod_iphone_1_artwork_info ipod_touch_1_artwork_info
+/* also used for 3G Nano */
+static const Itdb_ArtworkFormat ipod_classic_1_photo_info[] = {
+    {1067, 720, 480, THUMB_FORMAT_I420_LE},
+    {1024, 320, 240, THUMB_FORMAT_RGB565_LE},
+    {1066,  64,  64, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
 
+/* also used for 3G Nano */
+static const Itdb_ArtworkFormat ipod_classic_1_chapter_image_info[] = {
+    /*  These are the same as for the iPod video... -- labeled by the iPod as
+        "chapter images" */
+    {1028, 100, 100, THUMB_FORMAT_RGB565_LE},
+    {1029, 200, 200, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+enum ArtworkType {
+    ARTWORK_TYPE_COVER_ART,
+    ARTWORK_TYPE_PHOTO,
+    ARTWORK_TYPE_CHAPTER_IMAGE
+};
+
+struct _ArtworkCapabilities {
+    Itdb_IpodGeneration generation;
+    const Itdb_ArtworkFormat *cover_art_formats;
+    const Itdb_ArtworkFormat *photo_formats;
+    const Itdb_ArtworkFormat *chapter_image_formats;
+};
+typedef struct _ArtworkCapabilities ArtworkCapabilities;
+
+static const ArtworkCapabilities ipod_artwork_capabilities[] = {
+    { ITDB_IPOD_GENERATION_PHOTO, ipod_photo_cover_art_info, ipod_photo_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_VIDEO_1, ipod_video_cover_art_info, ipod_video_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_VIDEO_2, ipod_video_cover_art_info, ipod_video_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_NANO_1, ipod_nano_cover_art_info, ipod_nano_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_NANO_2, ipod_nano_cover_art_info, ipod_nano_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_NANO_3, ipod_classic_1_cover_art_info, ipod_classic_1_photo_info, ipod_classic_1_chapter_image_info },
+    { ITDB_IPOD_GENERATION_NANO_4, ipod_nano4g_cover_art_info, ipod_nano4g_photo_info, ipod_nano4g_chapter_image_info },
+    { ITDB_IPOD_GENERATION_CLASSIC_1, ipod_classic_1_cover_art_info, ipod_classic_1_photo_info, ipod_classic_1_chapter_image_info },
+    { ITDB_IPOD_GENERATION_CLASSIC_2, ipod_classic_1_cover_art_info, ipod_classic_1_photo_info, ipod_classic_1_chapter_image_info },
+    { ITDB_IPOD_GENERATION_TOUCH_1, ipod_touch_1_cover_art_info, ipod_touch_1_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_IPHONE_1, ipod_touch_1_cover_art_info, ipod_touch_1_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_MOBILE, ipod_mobile_1_cover_art_info, NULL, NULL },
+    { ITDB_IPOD_GENERATION_UNKNOWN, NULL, NULL, NULL }
+};
+
+struct _ItdbSerialToModel {
+    const char *serial;
+    const char *model_number;
+};
+typedef struct _ItdbSerialToModel ItdbSerialToModel;
+
+/* This table was extracted from ipod-model-table from podsleuth svn trunk
+ * on 2008-06-14 (which seems to match podsleuth 0.6.2)
+*/
+static const ItdbSerialToModel serial_to_model_mapping[] = {
+    { "LG6", "8541" },
+    { "NAM", "8541" },
+    { "MJ2", "8541" },
+    { "ML1", "8709" },
+    { "MME", "8709" },
+    { "MMB", "8737" },
+    { "MMC", "8738" },
+    { "NGE", "8740" },
+    { "NGH", "8740" },
+    { "MMF", "8741" },
+    { "NLW", "8946" },
+    { "NRH", "8976" },
+    { "QQF", "9460" },
+    { "PQ5", "9244" },
+    { "PNT", "9244" },
+    { "NLY", "8948" },
+    { "NM7", "8948" },
+    { "PNU", "9245" },
+    { "PS9", "9282" },
+    { "Q8U", "9282" },
+    { "V9V", "9787" },
+    { "S2X", "9787" },
+    { "PQ7", "9268" },
+    { "TDU", "A079" },
+    { "TDS", "A079" },
+    { "TM2", "A127" },
+    { "SAZ", "9830" },
+    { "SB1", "9830" },
+    { "SAY", "9829" },
+    { "R5Q", "9585" },
+    { "R5R", "9586" },
+    { "R5T", "9586" },
+    { "PFW", "9160" },
+    { "PRC", "9160" },
+    { "QKL", "9436" },
+    { "QKQ", "9436" },
+    { "QKK", "9435" },
+    { "QKP", "9435" },
+    { "QKJ", "9434" },
+    { "QKN", "9434" },
+    { "QKM", "9437" },
+    { "QKR", "9437" },
+    { "S41", "9800" },
+    { "S4C", "9800" },
+    { "S43", "9802" },
+    { "S45", "9804" },
+    { "S47", "9806" },
+    { "S4J", "9806" },
+    { "S42", "9801" },
+    { "S44", "9803" },
+    { "S48", "9807" },
+    { "RS9", "9724" },
+    { "QGV", "9724" },
+    { "TSX", "9724" },
+    { "PFV", "9724" },
+    { "R80", "9724" },
+    { "RSA", "9725" },
+    { "TSY", "9725" },
+    { "C60", "9725" },
+    { "VTE", "A546" },
+    { "VTF", "A546" },
+    { "XQ5", "A947" },
+    { "XQS", "A947" },
+    { "XQV", "A949" },
+    { "XQX", "A949" },
+    { "YX7", "A949" },
+    { "XQY", "A951" },
+    { "YX8", "A951" },
+    { "XR1", "A953" },
+    { "YXA", "B233" },
+    { "YX6", "B225" },
+    { "YX7", "B228" },
+    { "YX9", "B225" },
+    { "UNA", "A350" },
+    { "UNB", "A350" },
+    { "UPR", "A352" },
+    { "UPS", "A352" },
+    { "SZB", "A004" },
+    { "SZV", "A004" },
+    { "SZW", "A004" },
+    { "SZC", "A005" },
+    { "SZT", "A005" },
+    { "TJT", "A099" },
+    { "TJU", "A099" },
+    { "TK2", "A107" },
+    { "TK3", "A107" },
+    { "VQ5", "A477" },
+    { "VQ6", "A477" },
+    { "V8T", "A426" },
+    { "V8U", "A426" },
+    { "V8W", "A428" },
+    { "V8X", "A428" },
+    { "VQH", "A487" },
+    { "VQJ", "A487" },
+    { "VQK", "A489" },
+    { "VKL", "A489" },
+    { "WL2", "A725" },
+    { "WL3", "A725" },
+    { "X9A", "A726" },
+    { "X9B", "A726" },
+    { "VQT", "A497" },
+    { "VQU", "A497" },
+    { "Y0P", "A978" },
+    { "Y0R", "A980" },
+    { "YXR", "B249" },
+    { "YXV", "B257" },
+    { "YXT", "B253" },
+    { "YXX", "B261" },
+    { "SZ9", "A002" },
+    { "WEC", "A002" },
+    { "WED", "A002" },
+    { "WEG", "A002" },
+    { "WEH", "A002" },
+    { "WEL", "A002" },
+    { "TXK", "A146" },
+    { "TXM", "A146" },
+    { "WEE", "A146" },
+    { "WEF", "A146" },
+    { "WEJ", "A146" },
+    { "WEK", "A146" },
+    { "SZA", "A003" },
+    { "SZU", "A003" },
+    { "TXL", "A147" },
+    { "TXN", "A147" },
+    { "V9K", "A444" },
+    { "V9L", "A444" },
+    { "WU9", "A444" },
+    { "VQM", "A446" },
+    { "V9M", "A446" },
+    { "V9N", "A446" },
+    { "WEE", "A446" },
+    { "V9P", "A448" },
+    { "V9Q", "A448" },
+    { "V9R", "A450" },
+    { "V9S", "A450" },
+    { "V95", "A450" },
+    { "V96", "A450" },
+    { "WUC", "A450" },
+    { "W9G", "A664" }, /* 30GB iPod Video U2 5.5g */
+    { "Y5N", "B029" }, /* Silver Classic 80GB */
+    { "YMV", "B147" }, /* Black Classic 80GB */
+    { "YMU", "B145" }, /* Silver Classic 160GB */
+    { "YMX", "B150" }, /* Black Classic 160GB */
+    { "VR0", "A501" },
+    { "WH8", "A712" },
+    { "2C5", "B562" }, /* Silver Classic 120GB */
+    { "2C7", "B565" }, /* Black Classic 120GB */
+    { "37P", "B663" }, /* 4GB Green Nano 4g */
+    { "37Q", "B666" }, /* 4GB Yellow Nano 4g */
+    { "37H", "B654" }, /* 4GB Pink Nano 4g */
+    { "1P1", "B480" }, /* 4GB Silver Nano 4g */
+    { "37K", "B657" }, /* 4GB Purple Nano 4g */
+    { "37L", "B660" }, /* 4GB Orange Nano 4g */
+    { "2ME", "B598" }, /* 8GB Silver Nano 4g */
+    { "3QS", "B732" }, /* 8GB Blue Nano 4g */
+    { "3QT", "B735" }, /* 8GB Pink Nano 4g */
+    { "3QU", "B739" }, /* 8GB Purple Nano 4g */
+    { "3QW", "B742" }, /* 8GB Orange Nano 4g */
+    { "3QX", "B745" }, /* 8GB Green Nano 4g */
+    { "3QY", "B748" }, /* 8GB Yellow Nano 4g */
+    { "3RO", "B754" }, /* 8GB Black Nano 4g */
+    { "3QZ", "B751" }, /* 8GB Red Nano 4g */
+    { "5B7", "B903" }, /* 16GB Silver Nano 4g */
+    { "5B8", "B905" }, /* 16GB Blue Nano 4g */
+    { "5B9", "B907" }, /* 16GB Pink Nano 4g */
+    { "5BA", "B909" }, /* 16GB Purple Nano 4g */
+    { "5BB", "B911" }, /* 16GB Orange Nano 4g */
+    { "5BC", "B913" }, /* 16GB Green Nano 4g */
+    { "5BD", "B915" }, /* 16GB Yellow Nano 4g */
+    { "5BE", "B917" }, /* 16GB Red Nano 4g */
+    { "5BF", "B918" }, /* 16GB Black Nano 4g */
+    { NULL ,  NULL  }
+};
+
+static const Itdb_IpodInfo *get_ipod_info_from_model_number (const char *model_number);
+static const Itdb_IpodInfo *get_ipod_info_from_serial (const char *serial);
 static void itdb_device_set_timezone_info (Itdb_Device *device);
 
 /* Reset or create the SysInfo hash table */
@@ -349,9 +687,11 @@
  * 
  * Creates a new #Itdb_Device structure
  *
- * Return value: a newly allocated #Itdb_Device which must be freed with
+ * Returns: a newly allocated #Itdb_Device which must be freed with
  * itdb_device_free() when no longer needed
- **/
+ *
+ * Since: 0.4.0
+ */
 Itdb_Device *itdb_device_new ()
 {
     Itdb_Device *dev;
@@ -366,7 +706,9 @@
  * @device: an #Itdb_Device
  *
  * Frees memory used by @device
- **/
+ *
+ * Since: 0.4.0
+ */
 void itdb_device_free (Itdb_Device *device)
 {
     if (device)
@@ -374,6 +716,8 @@
 	g_free (device->mountpoint);
 	if (device->sysinfo)
 	    g_hash_table_destroy (device->sysinfo);
+        if (device->sysinfo_extended)
+            itdb_sysinfo_properties_free (device->sysinfo_extended);
 	g_free (device);
     }
 }
@@ -382,11 +726,13 @@
 /**
  * itdb_device_set_mountpoint:
  * @device: an #Itdb_Device
- * @mp: the new mount point
+ * @mp:     the new mount point
  *
  * Sets the mountpoint of @device to @mp and update the cached device 
  * information (in particular, re-read the SysInfo file)
- **/
+ *
+ * Since: 0.4.0
+ */
 void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp)
 {
     g_return_if_fail (device);
@@ -415,7 +761,35 @@
     else return 0;
 }
 
+static void itdb_device_read_sysinfo_extended (Itdb_Device *device)
+{
+    const gchar *p_sysinfo_ex[] = {"SysInfoExtended", NULL};
+    gchar *dev_path, *sysinfo_ex_path;
 
+    if (device->sysinfo_extended != NULL) {
+        itdb_sysinfo_properties_free (device->sysinfo_extended);
+        device->sysinfo_extended = NULL;
+    }
+
+    dev_path = itdb_get_device_dir (device->mountpoint);
+    if (!dev_path) return;
+
+    sysinfo_ex_path = itdb_resolve_path (dev_path, p_sysinfo_ex);
+    g_free (dev_path);
+    if (!sysinfo_ex_path) return;
+    device->sysinfo_extended = itdb_sysinfo_extended_parse (sysinfo_ex_path, NULL);
+    g_free (sysinfo_ex_path);
+
+    if ((device->sysinfo != NULL) && (device->sysinfo_extended != NULL)) {
+        const char *fwid;
+        fwid = itdb_sysinfo_properties_get_firewire_id (device->sysinfo_extended);
+        if (fwid != NULL) {
+            g_hash_table_insert (device->sysinfo, g_strdup ("FirewireGuid"),
+                                 g_strdup (fwid));
+        }
+    }
+}
+
 /** 
  * itdb_device_read_sysinfo:
  * @device: an #Itdb_Device
@@ -423,8 +797,10 @@
  * Reads the SysInfo file and stores information in device->sysinfo for
  * later use.
  *
- * Return value: TRUE if file could be read, FALSE otherwise 
- **/
+ * Returns: TRUE if file could be read, FALSE otherwise 
+ *
+ * Since: 0.4.0
+ */
 gboolean itdb_device_read_sysinfo (Itdb_Device *device)
 {
     const gchar *p_sysinfo[] = {"SysInfo", NULL};
@@ -477,7 +853,7 @@
     }
     g_free (dev_path);
 
-    itdb_device_read_sysinfo_xml (device, NULL);
+    itdb_device_read_sysinfo_extended (device);
 
     /* indicate that sysinfo is identical to what is on the iPod */
     device->sysinfo_changed = FALSE;
@@ -497,13 +873,15 @@
 /** 
  * itdb_device_write_sysinfo:
  * @device: an #Itdb_Device
- * @error: return location for a #GError or NULL
+ * @error:  return location for a #GError or NULL
  *
  * Fills the SysInfo file with information in device->sysinfo. Note:
  * no directories are created if not already existent.
  *
- * Return value: TRUE if file could be read, FALSE otherwise 
- **/
+ * Returns: TRUE if file could be read, FALSE otherwise 
+ *
+ * Since: 0.4.0
+ */
 gboolean itdb_device_write_sysinfo (Itdb_Device *device, GError **error)
 {
     gchar *devicedir;
@@ -553,14 +931,16 @@
 /**
  * itdb_device_get_sysinfo:
  * @device: an #Itdb_Device
- * @field: field to retrive information from
+ * @field:  field to retrive information from
  *
  * Retrieve specified field from the SysInfo file.
  *
- * Return value: the information associated with @field, or NULL if @field
+ * Returns: the information associated with @field, or NULL if @field
  * couldn't be found. g_free() after use
- **/
-gchar *itdb_device_get_sysinfo (Itdb_Device *device, const gchar *field)
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_device_get_sysinfo (const Itdb_Device *device, const gchar *field)
 {
     g_return_val_if_fail (device, NULL);
     g_return_val_if_fail (device->sysinfo, NULL);
@@ -572,13 +952,14 @@
 /**
  * itdb_device_set_sysinfo:
  * @device: an #Itdb_Device
- * @field: field to set
- * @value: value to set (or NULL to remove the field).
+ * @field:  field to set
+ * @value:  value to set (or NULL to remove the field).
  *
  * Set specified field. It can later be written to the iPod using
  * itdb_device_write_sysinfo()
  *
- **/
+ * Since: 0.4.0
+ */
 void itdb_device_set_sysinfo (Itdb_Device *device,
 			      const gchar *field, const gchar *value)
 {
@@ -605,98 +986,181 @@
  *
  * Retrieve the #Itdb_IpodInfo entry for this iPod
  *
- * Return value: the #Itdb_IpodInfo entry for this iPod
- **/
+ * Returns: the #Itdb_IpodInfo entry for this iPod
+ *
+ * Since: 0.4.0
+ */
 const Itdb_IpodInfo *
-itdb_device_get_ipod_info (Itdb_Device *device)
+itdb_device_get_ipod_info (const Itdb_Device *device)
 {
-    gint i;
-    gchar *model_num, *p;
+    gchar *model_num;
+    const Itdb_IpodInfo *info;
 
+    if (device->sysinfo_extended != NULL) {
+        const char *serial;
+
+        serial = itdb_sysinfo_properties_get_serial_number (device->sysinfo_extended);
+        info = get_ipod_info_from_serial (serial);
+        if (info != NULL) {
+            return info;
+        }
+    }
+
     model_num = itdb_device_get_sysinfo (device, "ModelNumStr");
 
     if (!model_num)
 	return &ipod_info_table[0];
 
-    p = model_num;
-
-    if(isalpha(model_num[0])) 
-	p++;
-	
-    for(i=2; ipod_info_table[i].model_number != NULL; i++)
-    {
-	if(g_strncasecmp(p, ipod_info_table[i].model_number, 
-			 strlen (ipod_info_table[i].model_number)) == 0)
-	{
-	    g_free(model_num);
-	    return &ipod_info_table[i];
-	}
-    }	
+    info = get_ipod_info_from_model_number (model_num);
     g_free(model_num);
-    return &ipod_info_table[1];
+    if (info != NULL) {
+        return info;
+    } else {
+        return &ipod_info_table[1];
+    }
 }
 
 
-
 /* Return supported artwork formats supported by this iPod */
-G_GNUC_INTERNAL const Itdb_ArtworkFormat *
-itdb_device_get_artwork_formats (Itdb_Device *device)
+static const Itdb_ArtworkFormat *
+itdb_device_get_artwork_formats (const Itdb_Device *device, 
+                                 enum ArtworkType type)
 {
     const Itdb_IpodInfo *info;
+    const ArtworkCapabilities *caps;
 
     g_return_val_if_fail (device, NULL);
 
     info = itdb_device_get_ipod_info (device);
 
     g_return_val_if_fail (info, NULL);
+    caps = ipod_artwork_capabilities;
+    while (caps->generation != ITDB_IPOD_GENERATION_UNKNOWN) {
+        if (caps->generation == info->ipod_generation) {
+            break;
+        }
+        caps++;
+    }
+    switch (type) {
+        case ARTWORK_TYPE_COVER_ART:
+            return caps->cover_art_formats;
+        case ARTWORK_TYPE_PHOTO:
+            return caps->photo_formats;
+        case ARTWORK_TYPE_CHAPTER_IMAGE:
+            return caps->chapter_image_formats;
+    }
 
-    switch (info->ipod_generation)
-    {
-    case ITDB_IPOD_GENERATION_UNKNOWN:
-    case ITDB_IPOD_GENERATION_FIRST:
-    case ITDB_IPOD_GENERATION_SECOND:
-    case ITDB_IPOD_GENERATION_THIRD:
-    case ITDB_IPOD_GENERATION_FOURTH:
-	return NULL;
-    case ITDB_IPOD_GENERATION_PHOTO:
-	return ipod_photo_artwork_info;
-    case ITDB_IPOD_GENERATION_MOBILE:
-	switch (info->ipod_model)
-	{
-	case ITDB_IPOD_MODEL_MOBILE_1:
-	    return ipod_mobile_1_artwork_info;
-	case ITDB_IPOD_MODEL_IPHONE_1:
-	    return ipod_iphone_1_artwork_info;
-	default:
-	    g_return_val_if_reached (NULL);
-	}
-    case ITDB_IPOD_GENERATION_MINI_1:
-    case ITDB_IPOD_GENERATION_MINI_2:
-    case ITDB_IPOD_GENERATION_SHUFFLE_1:
-    case ITDB_IPOD_GENERATION_SHUFFLE_2:
-    case ITDB_IPOD_GENERATION_SHUFFLE_3:
-	return NULL;
-    case ITDB_IPOD_GENERATION_NANO_1:
-    case ITDB_IPOD_GENERATION_NANO_2:
-	return ipod_nano_artwork_info;
-    case ITDB_IPOD_GENERATION_NANO_3:
-	return ipod_nano3_artwork_info;
-    case ITDB_IPOD_GENERATION_VIDEO_1:
-    case ITDB_IPOD_GENERATION_VIDEO_2:
-	return ipod_video_artwork_info;
-    case ITDB_IPOD_GENERATION_CLASSIC_1:
-	return ipod_classic_1_artwork_info;
-    case ITDB_IPOD_GENERATION_TOUCH_1:
-	return ipod_touch_1_artwork_info;
-    case ITDB_IPOD_GENERATION_FIFTH:
-    case ITDB_IPOD_GENERATION_SIXTH:
-	return NULL;
+    g_return_val_if_reached (NULL);
+}
+
+static GList *
+itdb_device_get_photo_formats_fallback (const Itdb_Device *device)
+{
+    const Itdb_ArtworkFormat *formats;
+    const Itdb_ArtworkFormat *it;
+    GList *photo_formats = NULL;
+
+    formats = itdb_device_get_artwork_formats (device, ARTWORK_TYPE_PHOTO);
+    if (formats == NULL) {
+        return NULL;
     }
+
+    for (it = formats; it->format_id != -1; it++) {
+        photo_formats = g_list_prepend (photo_formats, (gpointer)it);
+    }
+
+    return photo_formats;
+}
+
+GList *itdb_device_get_photo_formats (const Itdb_Device *device)
+{
+    g_return_val_if_fail (device != NULL, NULL);
+
+    if (device->sysinfo_extended == NULL) {
+        return itdb_device_get_photo_formats_fallback (device);
+    } else {
+        return g_list_copy ((GList *)itdb_sysinfo_properties_get_photo_formats (device->sysinfo_extended));
+    }
     g_return_val_if_reached (NULL);
 }
 
+static GList *
+itdb_device_get_cover_art_formats_fallback (const Itdb_Device *device)
+{
+    const Itdb_ArtworkFormat *formats;
+    const Itdb_ArtworkFormat *it;
+    GList *cover_art_formats = NULL;
 
+    formats = itdb_device_get_artwork_formats (device, ARTWORK_TYPE_COVER_ART);
+    if (formats == NULL) {
+        return NULL;
+    }
 
+    for (it = formats; it->format_id != -1; it++) {
+        cover_art_formats = g_list_prepend (cover_art_formats, (gpointer)it);
+    }
+
+    return cover_art_formats;
+}
+
+GList *itdb_device_get_cover_art_formats (const Itdb_Device *device)
+{
+    g_return_val_if_fail (device != NULL, NULL);
+
+    if (device->sysinfo_extended == NULL) {
+        return itdb_device_get_cover_art_formats_fallback (device);
+    } else {
+        return g_list_copy ((GList *)itdb_sysinfo_properties_get_cover_art_formats (device->sysinfo_extended));
+    }
+    g_return_val_if_reached (NULL);
+}
+
+G_GNUC_INTERNAL gboolean 
+itdb_device_supports_sparse_artwork (const Itdb_Device *device)
+{
+    gboolean supports_sparse_artwork = FALSE;
+
+    g_return_val_if_fail (device != NULL, FALSE);
+
+    if (device->sysinfo_extended != NULL) {
+        supports_sparse_artwork = itdb_sysinfo_properties_supports_sparse_artwork (device->sysinfo_extended);
+    }
+
+    if (supports_sparse_artwork == FALSE) {
+        const Itdb_IpodInfo *info;
+        info = itdb_device_get_ipod_info (device);
+        switch (info->ipod_generation) {
+            case ITDB_IPOD_GENERATION_UNKNOWN:
+            case ITDB_IPOD_GENERATION_FIRST:
+            case ITDB_IPOD_GENERATION_SECOND:
+            case ITDB_IPOD_GENERATION_THIRD:
+            case ITDB_IPOD_GENERATION_FOURTH:
+            case ITDB_IPOD_GENERATION_PHOTO:
+            case ITDB_IPOD_GENERATION_MOBILE:
+            case ITDB_IPOD_GENERATION_MINI_1:
+            case ITDB_IPOD_GENERATION_MINI_2:
+            case ITDB_IPOD_GENERATION_SHUFFLE_1:
+            case ITDB_IPOD_GENERATION_SHUFFLE_2:
+            case ITDB_IPOD_GENERATION_SHUFFLE_3:
+            case ITDB_IPOD_GENERATION_NANO_1:
+            case ITDB_IPOD_GENERATION_NANO_2:
+            case ITDB_IPOD_GENERATION_VIDEO_1:
+            case ITDB_IPOD_GENERATION_VIDEO_2:
+                supports_sparse_artwork = FALSE;
+                break;
+            case ITDB_IPOD_GENERATION_NANO_3:
+            case ITDB_IPOD_GENERATION_NANO_4:
+            case ITDB_IPOD_GENERATION_CLASSIC_1:
+            case ITDB_IPOD_GENERATION_CLASSIC_2:
+            case ITDB_IPOD_GENERATION_TOUCH_1:
+            case ITDB_IPOD_GENERATION_IPHONE_1:
+                supports_sparse_artwork = TRUE;
+                break;
+        }
+    }
+    return supports_sparse_artwork;
+}
+
 /* Determine the number of F.. directories in iPod_Control/Music.*/
 G_GNUC_INTERNAL gint
 itdb_musicdirs_number_by_mountpoint (const gchar *mountpoint)
@@ -743,16 +1207,14 @@
     return device->musicdirs;
 }
 
-/**
+/*
  * endianess_check_path:
+ * @path:   the file to look at.
+ * @hdr:    the header string (4 bytes) in case of LITTLE_ENDIAN
  *
  * Check if endianess can be determined by looking at header of @path.
  *
- * @path:   the file to look at.
- * @hdr: the header string (4 bytes) in case of LITTLE_ENDIAN
- *
- * Return value:
- * G_LITTLE_ENDIAN, G_BIG_ENDIAN or 0 if endianess could not be
+ * Returns: G_LITTLE_ENDIAN, G_BIG_ENDIAN or 0 if endianess could not be
  * determined.
  */
 static guint endianess_check_path (const gchar *path, const gchar *hdr)
@@ -793,7 +1255,6 @@
  * It will overwrite the previous setting.
  *
  */
-
 G_GNUC_INTERNAL void
 itdb_device_autodetect_endianess (Itdb_Device *device)
 {
@@ -863,8 +1324,10 @@
  * Return a pointer to the start of valid iPod model descriptions,
  * which is an array of #Itdb_IpodInfo entries.
  *
- * Return value: a pointer to the array of #Itdb_IpodInfo entries.
- **/
+ * Returns: a pointer to the array of #Itdb_IpodInfo entries.
+ *
+ * Since: 0.4.0
+ */
 const Itdb_IpodInfo *itdb_info_get_ipod_info_table (void)
 {
     return &ipod_info_table[2];
@@ -877,9 +1340,11 @@
  *
  * Return the iPod's generic model name, like "Color", "Nano"...
  *
- * Return value: a pointer to the model name. This is a static string
+ * Returns: a pointer to the model name. This is a static string
  * and must not be g_free()d.
- **/
+ *
+ * Since: 0.4.0
+ */
 const gchar *itdb_info_get_ipod_model_name_string (Itdb_IpodModel model)
 {
     gint i=0;
@@ -902,9 +1367,11 @@
  * Return the iPod's generic generation name, like "First Generation",
  * "Mobile Phone"...
  *
- * Return value: a pointer to the generation name. This is a static
+ * Returns: a pointer to the generation name. This is a static
  * string and must not be g_free()d.
- **/
+ *
+ * Since: 0.4.0
+ */
 const gchar *itdb_info_get_ipod_generation_string (Itdb_IpodGeneration generation)
 {
     gint i=0;
@@ -926,121 +1393,269 @@
  * @device: an #Itdb_Device
  *
  * Indicates whether @device can display artwork or not. When dealing
- * with a non-art capable ipod, no artwork data will be written to the
+ * with a non-art capable iPod, no artwork data will be written to the
  * iPod so you can spare calls to the artwork handling methods.
  *
- * Return value: true if @device can display artwork.
+ * Returns: true if @device can display artwork.
+ *
+ * Since: 0.5.0
  */
-gboolean itdb_device_supports_artwork (Itdb_Device *device)
+gboolean itdb_device_supports_artwork (const Itdb_Device *device)
 {
+    GList *formats;
     if (device == NULL) {
         return FALSE;
     }
-
-    return (itdb_device_get_artwork_formats (device) != NULL);
+    formats = itdb_device_get_cover_art_formats (device);
+    g_list_free (formats);
+    return (formats != NULL);
 }
 
 
 /**
- * itdb_device_supports_photo:
+ * itdb_device_supports_video:
  * @device: an #Itdb_Device
  *
- * Indicates whether @device can display photos or not.
+ * Indicates whether @device can play videos or not.
  *
- * Return value: true if @device can display photos.
+ * Returns: true if @device can play videos.
+ *
+ * Since: 0.7.0
  */
-
-gboolean itdb_device_supports_photo (Itdb_Device *device)
+gboolean itdb_device_supports_video (const Itdb_Device *device)
 {
-    const Itdb_ArtworkFormat *formats;
-    const Itdb_ArtworkFormat *it;
-
+    const Itdb_IpodInfo *info;
     if (device == NULL) {
         return FALSE;
     }
 
-    formats = itdb_device_get_artwork_formats (device);
-    if (formats == NULL) {
-	return FALSE;
+    info = itdb_device_get_ipod_info (device);
+    switch (info->ipod_generation) {
+        case ITDB_IPOD_GENERATION_UNKNOWN:
+        case ITDB_IPOD_GENERATION_FIRST:
+        case ITDB_IPOD_GENERATION_SECOND:
+        case ITDB_IPOD_GENERATION_THIRD:
+        case ITDB_IPOD_GENERATION_FOURTH:
+        case ITDB_IPOD_GENERATION_PHOTO:
+        case ITDB_IPOD_GENERATION_MOBILE:
+        case ITDB_IPOD_GENERATION_MINI_1:
+        case ITDB_IPOD_GENERATION_MINI_2:
+        case ITDB_IPOD_GENERATION_SHUFFLE_1:
+        case ITDB_IPOD_GENERATION_SHUFFLE_2:
+        case ITDB_IPOD_GENERATION_SHUFFLE_3:
+        case ITDB_IPOD_GENERATION_NANO_1:
+        case ITDB_IPOD_GENERATION_NANO_2:
+            return FALSE;
+        case ITDB_IPOD_GENERATION_NANO_3:
+        case ITDB_IPOD_GENERATION_NANO_4:
+        case ITDB_IPOD_GENERATION_VIDEO_1:
+        case ITDB_IPOD_GENERATION_VIDEO_2:
+        case ITDB_IPOD_GENERATION_CLASSIC_1:
+	case ITDB_IPOD_GENERATION_CLASSIC_2:
+        case ITDB_IPOD_GENERATION_TOUCH_1:
+        case ITDB_IPOD_GENERATION_IPHONE_1:
+            return TRUE;
     }
+    g_return_val_if_reached (FALSE);
+}
 
-    it = formats;
-    while ((it->type != -1) && (it->type != ITDB_THUMB_PHOTO_FULL_SCREEN)) {
-	it++;
+
+/**
+ * itdb_device_supports_photo:
+ * @device: an #Itdb_Device
+ *
+ * Indicates whether @device can display photos or not.
+ *
+ * Returns: true if @device can display photos.
+ *
+ * Since: 0.5.0
+ */
+gboolean itdb_device_supports_photo (const Itdb_Device *device)
+{
+    GList *formats;
+    if (device == NULL) {
+        return FALSE;
     }
-    
-    return (it->type != -1);
+    formats = itdb_device_get_photo_formats (device);
+    g_list_free (formats);
+    return (formats != NULL);
 }
 
+static char *
+get_preferences_path (const Itdb_Device *device)
+{
 
-/* This function reads the timezone information from the iPod and sets it in
- * the Itdb_Device structure. If an error occurs, the function returns silently
- * and the timezone shift is set to 0
- */
-static void itdb_device_set_timezone_info (Itdb_Device *device)
-{
     const gchar *p_preferences[] = {"Preferences", NULL};
     char *dev_path;
     char *prefs_filename;
-    FILE *f;
-    gint32 timezone;
-    const int GMT_OFFSET = 0x19;
-    int result;
 
-    device->timezone_shift = 0;
-
     if (device->mountpoint == NULL) {
-        /* Assumes the iPod is in the UTC timezone for those cases */
-        return;
+        return NULL;
     }
 
     dev_path = itdb_get_device_dir (device->mountpoint);
 
     if (dev_path == NULL) {
-        return ;
+        return NULL;
     }
 
     prefs_filename = itdb_resolve_path (dev_path, p_preferences);
     g_free (dev_path);
 
-    f = fopen (prefs_filename, "r");
+    return prefs_filename;
+}
+
+static gboolean itdb_device_read_raw_timezone (const char *prefs_path,
+                                               glong offset,
+                                               gint16 *timezone)
+{
+    FILE *f;
+    int result;
+
+    if (timezone == NULL) {
+        return FALSE;
+    }
+
+    f = fopen (prefs_path, "r");
     if (f == NULL) {
-        g_free (prefs_filename);
-        return;
+        return FALSE;
     }
 
-    result = fseek (f, 0xB10, SEEK_SET);
+    result = fseek (f, offset, SEEK_SET);
     if (result != 0) {
         fclose (f);
-        g_free (prefs_filename);
-        return;
+        return FALSE;
     }
 
-    result = fread (&timezone, sizeof (timezone), 1, f);
+    result = fread (timezone, sizeof (*timezone), 1, f);
     if (result != 1) {
         fclose (f);
-        g_free (prefs_filename);
-        return;
+        return FALSE;
     }
 
     fclose (f);
-    g_free (prefs_filename);
 
-    timezone = GINT32_FROM_LE (timezone);
-    if ((timezone < 0) || (timezone > (2*12) << 1)) {
+    *timezone = GINT16_FROM_LE (*timezone);
+
+    return TRUE;
+}
+
+static gboolean raw_timezone_to_utc_shift_4g (gint16 raw_timezone,
+                                              gint *utc_shift)
+{
+    const int GMT_OFFSET = 0x19;
+
+    if (utc_shift == NULL) {
+        return FALSE;
+    }
+
+    if ((raw_timezone < 0) || (raw_timezone > (2*12) << 1)) {
         /* invalid timezone */
-        return;
+        return FALSE;
     }
 
-    timezone -= GMT_OFFSET;
+    raw_timezone -= GMT_OFFSET;
 
-    device->timezone_shift = (timezone >> 1) * 3600;
-    if (timezone & 1) {
+    *utc_shift = (raw_timezone >> 1) * 3600;
+    if (raw_timezone & 1) {
         /* Adjust for DST */
-        device->timezone_shift += 3600;
+        *utc_shift += 3600;
     }
+
+    return TRUE;
 }
 
+static gboolean raw_timezone_to_utc_shift_5g (gint16 raw_timezone,
+                                              gint *utc_shift)
+{
+    const int TZ_SHIFT = 8;
+
+    if (utc_shift == NULL) {
+        return FALSE;
+    }
+    /* The iPod stores the timezone information as a number of minutes
+     * from Tokyo timezone which increases when going eastward (ie
+     * going from Tokyo to LA and then to Europe).
+     * The calculation below shifts the origin so that 0 corresponds
+     * to UTC-12 and the max is 24*60 and corresponds to UTC+12
+     * Finally, we substract 12*60 to that value to get a signed number
+     * giving the timezone relative to UTC.
+     */
+    *utc_shift = raw_timezone*60 - TZ_SHIFT*3600;
+
+    return TRUE;
+}
+
+static gint get_local_timezone (void)
+{
+#ifdef __CYGWIN__
+    return (gint) _timezone; /* global variable defined by time.h, see man tzset */
+#else
+    return timezone; /* global variable defined by time.h, see man tzset */
+#endif
+}
+
+/* This function reads the timezone information from the iPod and sets it in
+ * the Itdb_Device structure. If an error occurs, the function returns silently
+ * and the timezone shift is set to 0
+ */
+static void itdb_device_set_timezone_info (Itdb_Device *device)
+{
+    gint16 raw_timezone;
+    gint timezone = 0;
+    gboolean result;
+    struct stat stat_buf;
+    int status;
+    char *prefs_path;
+
+    device->timezone_shift = get_local_timezone ();
+
+    prefs_path = get_preferences_path (device);
+
+    if (!prefs_path) {
+	return;
+    }
+
+    status = g_stat (prefs_path, &stat_buf);
+    if (status != 0) {
+	g_free (prefs_path);
+	return;
+    }
+    switch (stat_buf.st_size) {
+	case 2892:
+  	    result = itdb_device_read_raw_timezone (prefs_path, 0xb10, 
+			    			    &raw_timezone);
+	    g_free (prefs_path);
+	    if (!result) {
+                return;
+	    }
+	    result = raw_timezone_to_utc_shift_4g (raw_timezone, &timezone);
+	    break;
+	case 2924:
+            result = itdb_device_read_raw_timezone (prefs_path, 0xb22, 
+			                            &raw_timezone);
+	    g_free (prefs_path);
+	    if (!result) {
+                return;
+	    }
+	    result = raw_timezone_to_utc_shift_5g (raw_timezone, &timezone);
+	    break;
+	case 2952:
+	    /* ipod classic, not implemented yet */
+	default:
+	    /* We don't know how to get the timezone of this ipod model,
+	     * assume the computer timezone and the ipod timezone match
+	     */
+	    return; 
+    }
+
+    if ((timezone < -12*3600) || (timezone > 12 * 3600)) {
+        return;
+    }
+
+    device->timezone_shift = timezone;
+}
+
 /**
  * itdb_device_get_firewire_id
  * @device: an #Itdb_Device
@@ -1049,9 +1664,11 @@
  * iTunesDB checksum which is expected by newer iPod models
  * (iPod classic/fat nanos)
  *
- * Return value: the guint64 firewire id, or 0 if we don't know it
- **/
-guint64 itdb_device_get_firewire_id (Itdb_Device *device)
+ * Returns: the guint64 firewire id, or 0 if we don't know it
+ *
+ * Since: 0.6.0
+ */
+guint64 itdb_device_get_firewire_id (const Itdb_Device *device)
 {
     gchar *fwid;
 
@@ -1078,8 +1695,11 @@
     }
     switch (info->ipod_generation) {
     case ITDB_IPOD_GENERATION_CLASSIC_1: 
+    case ITDB_IPOD_GENERATION_CLASSIC_2:
     case ITDB_IPOD_GENERATION_NANO_3:
+    case ITDB_IPOD_GENERATION_NANO_4:
     case ITDB_IPOD_GENERATION_TOUCH_1:
+    case ITDB_IPOD_GENERATION_IPHONE_1:
       return TRUE;
 
     case ITDB_IPOD_GENERATION_UNKNOWN:
@@ -1098,10 +1718,152 @@
     case ITDB_IPOD_GENERATION_NANO_2:
     case ITDB_IPOD_GENERATION_VIDEO_1:
     case ITDB_IPOD_GENERATION_VIDEO_2:
-    case ITDB_IPOD_GENERATION_FIFTH:
-    case ITDB_IPOD_GENERATION_SIXTH:
             return FALSE;
     }
 
     return FALSE;
 }
+
+#ifdef WIN32
+#include <windows.h>
+#else
+#include <sys/statvfs.h>
+#endif
+
+/**
+ * itdb_device_get_storage_info:
+ *
+ * @device:   an #Itdb_Device
+ * @capacity: returned capacity in bytes
+ * @free:     returned free space in bytes
+ *
+ * Return the storage info for this iPod
+ *
+ * Returns: TRUE if storage info could be obtained, FALSE otherwise
+ */
+gboolean itdb_device_get_storage_info (Itdb_Device *device, guint64 *capacity, guint64 *free)
+{
+#ifdef WIN32
+    ULARGE_INTEGER u_free, u_capacity;
+#else
+    struct statvfs info;
+    guint64 block_size;
+#endif
+
+    g_return_val_if_fail (device, FALSE);
+    g_return_val_if_fail (capacity, FALSE);
+    g_return_val_if_fail (free, FALSE);
+
+#ifdef WIN32
+    if (GetDiskFreeSpaceEx(device->mountpoint, &u_free, &u_capacity, NULL) == 0) {
+    	return FALSE;
+    }
+    *free = u_free.QuadPart;
+    *capacity = u_capacity.QuadPart;
+    return TRUE;
+#else
+    if (statvfs(device->mountpoint, &info))
+	return FALSE;
+
+    if (info.f_frsize > 0)
+	block_size = info.f_frsize;
+    else
+	block_size = info.f_bsize;
+
+    *capacity = info.f_blocks * block_size;
+    *free = info.f_bfree * block_size;
+
+    return TRUE;
+#endif
+}
+
+struct IpodModelTable {
+    GHashTable *serial_hash;
+    GHashTable *model_number_hash;
+};
+
+static struct IpodModelTable *init_ipod_model_table (void)
+{
+    const Itdb_IpodInfo *it;
+    struct IpodModelTable *model_table;
+    const ItdbSerialToModel *serial_it;
+
+    model_table = g_new0 (struct IpodModelTable, 1);
+    model_table->serial_hash = g_hash_table_new (g_str_hash, g_str_equal);
+    model_table->model_number_hash = g_hash_table_new (g_str_hash, g_str_equal);
+
+    for (it = itdb_info_get_ipod_info_table (); 
+         it->model_number != NULL; 
+         it++) {
+        g_hash_table_insert (model_table->model_number_hash, 
+                             (gpointer)it->model_number, (gpointer)it);
+    }
+
+    for (serial_it = serial_to_model_mapping; 
+         serial_it->serial != NULL; 
+         serial_it++) {
+        gpointer model_info;
+        model_info = g_hash_table_lookup (model_table->model_number_hash,
+                                          serial_it->model_number);
+        if (model_info != NULL) {
+            g_hash_table_insert (model_table->serial_hash, 
+                                 (gpointer)serial_it->serial, model_info);
+        } else {
+            g_warning ("Inconsistent ipod model tables, model info is missing for %s (serial %s)", 
+                       serial_it->model_number, serial_it->serial);
+        }
+    }
+
+    return model_table;
+}
+
+static struct IpodModelTable *get_model_table (void)
+{
+    static GOnce my_once = G_ONCE_INIT;
+
+    g_once (&my_once, (GThreadFunc)init_ipod_model_table, NULL);
+
+    return my_once.retval;
+}
+
+static const Itdb_IpodInfo *
+get_ipod_info_from_model_number (const char *model_number)
+{
+    struct IpodModelTable *model_table;
+
+    g_return_val_if_fail (model_number != NULL, NULL);
+
+    model_table = get_model_table ();
+    if(isalpha(model_number[0])) {
+	model_number++;
+    }
+    return g_hash_table_lookup (model_table->model_number_hash, model_number);
+}
+
+static const Itdb_IpodInfo *
+get_ipod_info_from_serial (const char *serial)
+{
+    struct IpodModelTable *model_table;
+    glong len;
+
+    g_return_val_if_fail (serial != NULL, NULL);
+
+    len = strlen (serial);
+    if (len < 3) {
+        return NULL;
+    }
+    model_table = get_model_table ();
+    /* The 3 last letters of the ipod serial number can be used to identify 
+     * the model
+     */
+    return g_hash_table_lookup (model_table->serial_hash, serial+len-3);
+}
+
+GQuark itdb_device_error_quark (void)
+{
+    static GQuark quark = 0;
+    if (!quark) {
+        quark = g_quark_from_static_string ("itdb-device-error-quark");
+    }
+    return quark;
+}

Modified: libgpod/trunk/src/itdb_device.h
===================================================================
--- libgpod/trunk/src/itdb_device.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_device.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -29,7 +29,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_device.h 1746 2007-10-29 21:52:44Z teuf $
+|  $Id: itdb_device.h 2159 2008-12-08 01:16:58Z tmzullinger $
 */
 
 #ifndef __ITDB_DEVICE_H__
@@ -40,20 +40,20 @@
 #endif
 
 #include "itdb.h"
+#include "itdb_sysinfo_extended_parser.h"
 
 #include <glib.h>
 
 G_BEGIN_DECLS
 
-typedef struct _Itdb_ArtworkFormat Itdb_ArtworkFormat;
 typedef enum _ItdbThumbFormat ItdbThumbFormat;
 
 enum _ItdbThumbFormat
 {
     THUMB_FORMAT_UYVY_LE,
     THUMB_FORMAT_UYVY_BE,
-	THUMB_FORMAT_I420_LE,
-	THUMB_FORMAT_I420_BE,
+    THUMB_FORMAT_I420_LE,
+    THUMB_FORMAT_I420_BE,
     THUMB_FORMAT_RGB565_LE,
     THUMB_FORMAT_RGB565_LE_90,
     THUMB_FORMAT_RGB565_BE,
@@ -74,42 +74,91 @@
     THUMB_FORMAT_EXPERIMENTAL_BE,
 };
 
-
+/**
+ * Itdb_Device:
+ * @mountpoint:         The mountpoint of the iPod
+ * @musicdirs:          The number of /iPod_Control/Music/F.. dirs
+ * @byte_order:         G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN
+ *                      "reversed" endianness (e.g. mobile phone iTunesDBs)
+ * @sysinfo:            A hash with key/value pairs of all entries in
+ *                      Device/SysInfo
+ * @sysinfo_extended:   The parsed content of SysInfoExtended, which can be NULL
+ * @sysinfo_changed:    True if the sysinfo hash been changed by the user, false
+ *                      otherwise.  (see itdb_set_sysinfo())
+ * @timezone_shift:     The difference in seconds between the current timezone
+ *                      and UTC
+ *
+ * Structure representing an iPod device
+ *
+ * Since: 0.4.0
+ */
 struct _Itdb_Device
 {
-    gchar *mountpoint;    /* mountpoint of the iPod */
-    gint   musicdirs;     /* number of /iPod_Control/Music/F.. dirs */
-    guint  byte_order;    /* G_LITTLE_ENDIAN "regular" endianness 
-			   * G_BIG_ENDIAN "reversed" endianness (e.g. mobile
-			   * phone iTunesDBs)
-			   */
-    GHashTable *sysinfo;  /* hash with value/key pairs of all entries
-			   * in Device/SysInfo */
-    gboolean sysinfo_changed; /* Has the sysinfo hash been changed by
-				 the user (itdb_set_sysinfo) */
-    gint timezone_shift;  /* difference in seconds between the current
-                           * timezone and UTC
-                           */
-
+    gchar *mountpoint;
+    gint   musicdirs;
+    guint  byte_order;
+    GHashTable *sysinfo;
+    SysInfoIpodProperties *sysinfo_extended;
+    gboolean sysinfo_changed;
+    gint timezone_shift;
 };
 
-struct _Itdb_ArtworkFormat
-{
-	ItdbThumbType type;
-	gint16 width;
-	gint16 height;
-	gint16 correlation_id;
+/**
+ * Itdb_ArtworkFormat:
+ * @format_id:          Unique ID for the format (generally a 4 digit int)
+ * @width:              Width of the thumbnail
+ * @height:             Height of the thumbnail
+ * @format:             Pixel format of the thumbnail (RGB, YUV, ...)
+ * @padding:            Number of bytes of padding to add after the thumbnail
+ *                      (not found in SysInfoExtended -- added for
+ *                      compatibility with hardcoded artwork formats)
+ * @crop:               Indicates if the thumbnail is to be cropped
+ * @rotation:           Degrees to rotate the thumbnail
+ * @back_color:         Background color for the thumbnail
+ * @display_width:      Width at which the thumbnail will be displayed
+ *                      (not currently used)
+ * @interlaced:         If TRUE, the thumbnails are interlaced
+ *                      (not currently used)
+ * @align_row_bytes:    If TRUE, each pixel row must be aligned a 2-byte boundary
+ * @color_adjustment:   Color adjustment for the thumbnails
+ *                      (not currently used)
+ * @gamma:              Gamma value for the thumbails
+ *                      (not currently used)
+ * @associated_format:  Unknown (not currently used)
+ *
+ * Structure representing the characteristics of the thumbnails to
+ * write to a given .ithmb file. The format of the structure is based
+ * on the way artwork formats are written to SysInfoExtended.
+ */
+struct _Itdb_ArtworkFormat {
+        gint format_id;
+        gint width;
+        gint height;
         ItdbThumbFormat format;
         gint32 padding;
+        gboolean crop;
+        gint rotation;
+        guchar back_color[4];
+
+        gint display_width;
+        gboolean interlaced;
+        gboolean align_row_bytes;
+        gint color_adjustment;
+        gdouble gamma;
+        gint associated_format;
 };
 
-G_GNUC_INTERNAL const Itdb_ArtworkFormat *itdb_device_get_artwork_formats (Itdb_Device *device);
+/* Error domain */
+#define ITDB_DEVICE_ERROR itdb_device_error_quark ()
+GQuark     itdb_device_error_quark      (void);
+
+G_GNUC_INTERNAL GList *itdb_device_get_photo_formats (const Itdb_Device *device);
+G_GNUC_INTERNAL GList *itdb_device_get_cover_art_formats (const Itdb_Device *device);
 G_GNUC_INTERNAL gint itdb_device_musicdirs_number (Itdb_Device *device);
 G_GNUC_INTERNAL void itdb_device_autodetect_endianess (Itdb_Device *device);
-G_GNUC_INTERNAL gboolean itdb_device_read_sysinfo_xml (Itdb_Device *device, 
-						       GError **error);
-G_GNUC_INTERNAL guint64 itdb_device_get_firewire_id (Itdb_Device *device);
-
+G_GNUC_INTERNAL guint64 itdb_device_get_firewire_id (const Itdb_Device *device);
+G_GNUC_INTERNAL gboolean itdb_device_supports_sparse_artwork (const Itdb_Device *device);
+G_GNUC_INTERNAL gboolean itdb_device_get_storage_info (Itdb_Device *device, guint64 *capacity, guint64 *free);
 G_END_DECLS
 
 #endif

Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_itunesdb.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -30,7 +30,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_itunesdb.c 1759 2007-11-06 13:23:21Z jcsjcs $
+|  $Id: itdb_itunesdb.c 2205 2009-01-11 10:52:25Z jcsjcs $
 */
 
 /* Some notes on how to use the functions in this file:
@@ -119,10 +119,11 @@
 #include <glib/gstdio.h>
 #include <stdio.h>
 #include <string.h>
-#include <sys/statvfs.h>
 #include <sys/types.h>
 #include <time.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #define ITUNESDB_DEBUG 0
 #define ITUNESDB_MHIT_DEBUG 0
@@ -217,6 +218,7 @@
   MHOD_ID_SPLPREF = 50,  /* settings for smart playlist */
   MHOD_ID_SPLRULES = 51, /* rules for smart playlist     */
   MHOD_ID_LIBPLAYLISTINDEX = 52,  /* Library Playlist Index */
+  MHOD_ID_LIBPLAYLISTJUMPTABLE=53,
   MHOD_ID_PLAYLIST = 100
 };
 
@@ -248,8 +250,20 @@
     gint cd_nr;
     gint index;
     gint numtracks;
+    gunichar2 letter_album;
+    gunichar2 letter_title;
+    gunichar2 letter_artist;
+    gunichar2 letter_genre;
+    gunichar2 letter_composer;
 };
 
+struct mhod53_entry
+{
+    gunichar2 letter;
+    gint32 start;
+    gint32 count;
+};
+
 struct _MHODData
 {
     gboolean valid;
@@ -258,16 +272,13 @@
     {
 	gint32 track_pos;
 	gchar *string;
-	gchar *chapterdata_raw;
-	Itdb_Track *chapterdata_track; /* for writing chapterdata */
+	Itdb_Chapterdata *chapterdata;
 	Itdb_SPLPref *splpref;
 	Itdb_SPLRules *splrules;
 	GList *mhod52coltracks;
     } data;
-    union
-    {
-	enum MHOD52_SORTTYPE mhod52sorttype;
-    } data2;
+    enum MHOD52_SORTTYPE mhod52sorttype;
+    GList *mhod53_list;
 };
 
 typedef struct _MHODData MHODData;
@@ -342,14 +353,14 @@
  *
  * Resolve the path to a track on the iPod
  *
- * We start by assuming that the ipod mount point exists.  Then, for
- * each component c of track-&gt;ipod_path, we try to find an entry d in
+ * We start by assuming that the iPod mount point exists.  Then, for
+ * each component c of @track->ipod_path, we try to find an entry d in
  * good_path that is case-insensitively equal to c.  If we find d, we
  * append d to good_path and make the result the new good_path.
  * Otherwise, we quit and return NULL.
  *
- * Return value: path to track on the iPod or NULL.
- **/
+ * Returns: path to track on the iPod or NULL.
+ */
 gchar * itdb_resolve_path (const gchar *root,
 			   const gchar * const * components)
 {
@@ -385,10 +396,17 @@
     cur_dir = g_dir_open(good_path,0,NULL);
     if (cur_dir) while ((dir_file = g_dir_read_name(cur_dir)))
     {
-	gchar *file_utf8 = g_filename_to_utf8(dir_file,-1,NULL,NULL,NULL);
-	gchar *file_stdcase = g_utf8_casefold(file_utf8,-1);
-	gboolean found = !g_utf8_collate(file_stdcase,component_stdcase);
+	gchar *file_utf8;
+	gchar *file_stdcase;
+	gboolean found;
 	gchar *new_good_path;
+      
+	file_utf8 = g_filename_to_utf8(dir_file,-1,NULL,NULL,NULL);
+	if (file_utf8 == NULL) {
+	    continue;
+	}
+	file_stdcase = g_utf8_casefold(file_utf8,-1);
+	found = !g_utf8_collate(file_stdcase,component_stdcase);
 	g_free(file_stdcase);
 	if(!found)
 	{
@@ -759,7 +777,6 @@
    Reversed Endian Sensitive (big endian)
    ------------------------------------------------------------ */
 
-#if 0
 static guint16 get16bint (FContents *cts, glong seek)
 {
     g_return_val_if_fail (cts, 0);
@@ -768,7 +785,7 @@
     else
 	return raw_get16lint (cts, seek);
 }
-#endif
+
 static guint32 get32bint (FContents *cts, glong seek)
 {
     g_return_val_if_fail (cts, 0);
@@ -820,7 +837,7 @@
 }
 
 /* Fix big endian UTF16 String to correct byteorder if necessary (only
- * strings in smart playlists are big endian) */
+ * strings in smart playlists and chapter data are big endian) */
 static gunichar2 *fixup_big_utf16 (gunichar2 *utf16_string)
 {
 #   if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
@@ -1130,7 +1147,7 @@
  * @itdb: an #Itdb_iTunesDB
  *
  * Free the memory taken by @itdb. 
- **/
+ */
 void itdb_free (Itdb_iTunesDB *itdb)
 {
     if (itdb)
@@ -1156,8 +1173,8 @@
  * Duplicate @itdb 
  * FIXME: not implemented yet 
  *
- * Return value: always return NULL since it's unimplemented
- **/
+ * Returns: always return NULL since it's unimplemented
+ */
 Itdb_iTunesDB *itdb_duplicate (Itdb_iTunesDB *itdb)
 {
     g_return_val_if_fail (itdb, NULL);
@@ -1171,9 +1188,9 @@
  *
  * Counts the number of playlists stored in @itdb
  *
- * Return value: the number of playlists in @itdb (including the master 
+ * Returns: the number of playlists in @itdb (including the master 
  * playlist)
- **/
+ */
 guint32 itdb_playlists_number (Itdb_iTunesDB *itdb)
 {
     g_return_val_if_fail (itdb, 0);
@@ -1181,15 +1198,14 @@
     return g_list_length (itdb->playlists);
 }
 
-
 /**
  * itdb_tracks_number:
  * @itdb: an #Itdb_iTunesDB
  *
  * Counts the number of tracks stored in @itdb
  *
- * Return value: the number of tracks in @itdb
- **/
+ * Returns: the number of tracks in @itdb
+ */
 guint32 itdb_tracks_number (Itdb_iTunesDB *itdb)
 {
     g_return_val_if_fail (itdb, 0);
@@ -1203,10 +1219,10 @@
  *
  * Counts the number of non-transferred tracks in @itdb
  *
- * Return value: the number of tracks in @itdb that haven't been transferred
+ * Returns: the number of tracks in @itdb that haven't been transferred
  * to the iPod yet (ie the number of #Itdb_Track in which the transferred field
  * is false)
- **/
+ */
 guint32 itdb_tracks_number_nontransferred (Itdb_iTunesDB *itdb)
 {
     guint n = 0;
@@ -1222,17 +1238,15 @@
     return n;
 }
 
-
-
 /**
  * itdb_new:
  *
  * Creates a new Itdb_iTunesDB with the unknowns filled in to reasonable
  * values.
  *
- * Return value: a newly created Itdb_iTunesDB to be freed with itdb_free()
+ * Returns: a newly created Itdb_iTunesDB to be freed with itdb_free()
  * when it's no longer needed
- **/
+ */
 Itdb_iTunesDB *itdb_new (void)
 {
     static GOnce g_type_init_once = G_ONCE_INIT;
@@ -1412,14 +1426,52 @@
 	  return result;  /* *ml==-1, result.valid==FALSE */
       }
       break;
-  case MHOD_ID_CHAPTERDATA: 
-      /* we'll just copy the entire data section */
-      xl = mhod_len - header_length;
-      result.data.chapterdata_raw = g_new0 (gchar, xl);
-      if (!seek_get_n_bytes (cts, result.data.chapterdata_raw, seek, xl))
+  case MHOD_ID_CHAPTERDATA:
+      result.data.chapterdata = itdb_chapterdata_new();
+      result.data.chapterdata->unk024 = get32lint (cts, seek);
+      result.data.chapterdata->unk028 = get32lint (cts, seek+4);
+      result.data.chapterdata->unk032 = get32lint (cts, seek+8);
+      seek += 12; /* get past unks */
+      if (check_header_seek (cts, "sean", seek+4))
       {
-	  g_free (result.data.chapterdata_raw);
-	  return result;  /* *ml==-1, result.valid==FALSE */
+	  gint i;
+	  guint32 numchapters;
+	  numchapters = get32bint (cts, seek+12) - 1; /* minus 1 for hedr atom */
+	  seek += 20; /* move to atom data */
+	  for (i=0; i<numchapters; ++i)
+	  {
+	      if (check_header_seek (cts, "chap", seek+4))
+	      {
+		  guint32 length;
+		  guint32 startpos;
+		  gunichar2 *string_utf16;
+		  startpos = get32bint (cts, seek+8);
+		  seek += 20;
+		  if (check_header_seek (cts, "name", seek+4))
+		  {
+		      length = get16bint (cts, seek+20);
+		      string_utf16 = g_new0 (gunichar2, (length+1));
+		      if (!seek_get_n_bytes (cts, (gchar *)string_utf16,
+				  seek+22, length*2))
+		      {
+			  g_free (string_utf16);
+			  itdb_chapterdata_free (result.data.chapterdata);
+			  return result;  /* *ml==-1, result.valid==FALSE */
+		      }
+		      fixup_big_utf16 (string_utf16);
+		      itdb_chapterdata_add_chapter(result.data.chapterdata,startpos,g_utf16_to_utf8 (
+				  string_utf16, -1, NULL, NULL, NULL));
+		      g_free (string_utf16);
+		      seek += length * 2 + 22;
+		  }
+	      }
+	  }
+	  if (check_header_seek (cts, "hedr", seek+4))
+	  {
+	      guint32 hedrlength = get32bint(cts, seek);
+	      seek += hedrlength;
+	  }
+
       }
       break;
   case MHOD_ID_SPLPREF:  /* Settings for smart playlist */
@@ -1618,6 +1670,7 @@
     case MHOD_ID_LIBPLAYLISTINDEX:
     case MHOD_ID_PLAYLIST:
     case MHOD_ID_CHAPTERDATA:
+    case MHOD_ID_LIBPLAYLISTJUMPTABLE:
 	/* these do not have a string entry */
 	return NULL;
     }
@@ -1803,8 +1856,8 @@
 
 
 
-gint pos_comp (gpointer a, gpointer b);
-gint pos_comp (gpointer a, gpointer b)
+static gint pos_comp (gpointer a, gpointer b);
+static gint pos_comp (gpointer a, gpointer b)
 {
     return (GPOINTER_TO_UINT(a) - GPOINTER_TO_UINT(b));
 }
@@ -2079,6 +2132,7 @@
 	  case MHOD_ID_SORT_ALBUMARTIST:
 	  case MHOD_ID_SORT_COMPOSER:
 	  case MHOD_ID_SORT_TVSHOW:
+	  case MHOD_ID_LIBPLAYLISTJUMPTABLE:
 	      /* these are not expected here */
 	      break;
 	  case MHOD_ID_LIBPLAYLISTINDEX:
@@ -2252,7 +2306,7 @@
       track->time_released = device_time_mac_to_time_t (fimp->itdb->device,
 						      track->time_released);
       track->unk144 = get16lint (cts, seek+144);
-      track->unk146 = get16lint (cts, seek+146);
+      track->explicit_flag = get16lint (cts, seek+146);
       track->unk148 = get32lint (cts, seek+148);
       track->unk152 = get32lint (cts, seek+152);
   }
@@ -2295,6 +2349,11 @@
       track->gapless_track_flag = get16lint (cts, seek+256);
       track->gapless_album_flag = get16lint (cts, seek+258);
   }
+  /* 200805 */
+  if (header_len >= 0x184)
+  {
+      track->mhii_link = get32lint (cts, seek+352);
+  }
 
   track->transferred = TRUE;                   /* track is on iPod! */
 
@@ -2387,6 +2446,7 @@
 	  case MHOD_ID_SPLPREF:
 	  case MHOD_ID_SPLRULES:
 	  case MHOD_ID_LIBPLAYLISTINDEX:
+	  case MHOD_ID_LIBPLAYLISTJUMPTABLE:
 	  case MHOD_ID_PLAYLIST:
 	  case MHOD_ID_CHAPTERDATA:
 	      g_free (entry_utf8);
@@ -2399,14 +2459,10 @@
 	  switch (type)
 	  {
 	  case MHOD_ID_CHAPTERDATA:
-	      /* we just read the entire chapterdata info until we
-		 have a better way to parse and represent it */
 	      mhod = get_mhod (fimp, seek, &zip);
-	      if (mhod.valid && mhod.data.chapterdata_raw)
+	      if (mhod.valid && mhod.data.chapterdata)
 	      {
-		  track->chapterdata_raw = mhod.data.chapterdata_raw;
-		  track->chapterdata_raw_length =
-		      zip - get32lint (cts, seek+4);
+		  track->chapterdata = mhod.data.chapterdata;
 		  mhod.valid = FALSE;
 	      }
 	      break;
@@ -2900,16 +2956,16 @@
 
 /**
  * itdb_parse:
- * @mp: mount point of the iPod (eg "/mnt/ipod) in local encoding
- * @error: return location for a #GError or NULL
+ * @mp:     mount point of the iPod (eg "/mnt/ipod") in local encoding
+ * @error:  return location for a #GError or NULL
  *
  * Parse the Itdb_iTunesDB of the iPod located at @mp
  *
- * Return value: a newly allocated #Itdb_iTunesDB struct holding the tracks and
+ * Returns: a newly allocated #Itdb_iTunesDB struct holding the tracks and
  * the playlists present on the iPod at @mp, NULL if @mp isn't an iPod mount
  * point. If non-NULL, the #Itdb_iTunesDB is to be freed with itdb_free() when
  * it's no longer needed
- **/
+ */
 Itdb_iTunesDB *itdb_parse (const gchar *mp, GError **error)
 {
     gchar *filename;
@@ -2985,19 +3041,18 @@
     return itdb;
 }
 
-
 /**
  * itdb_parse_file:
- * @filename: path to a file in iTunesDB format
- * @error: return location for a #GError or NULL
+ * @filename:   path to a file in iTunesDB format
+ * @error:      return location for a #GError or NULL
  *
  *  Same as itunesdb_parse(), but filename is specified directly.
  *
- * Return value: a newly allocated #Itdb_iTunesDB struct holding the tracks and
+ * Returns: a newly allocated #Itdb_iTunesDB struct holding the tracks and
  * the playlists present in @filename, NULL if @filename isn't a parsable 
  * iTunesDB file. If non-NULL, the #Itdb_iTunesDB is to be freed with 
  * itdb_free() when it's no longer needed
- **/
+ */
 Itdb_iTunesDB *itdb_parse_file (const gchar *filename, GError **error)
 {
     Itdb_iTunesDB *itdb;
@@ -3340,7 +3395,6 @@
 /* ------------------------------------------------------------
    Reversed Endian Sensitive (big endian)
    ------------------------------------------------------------ */
-#if 0
 static void put16bint (WContents *cts, guint16 n)
 {
     if (cts->reversed)
@@ -3348,7 +3402,7 @@
     else
 	raw_put16bint (cts, n);
 }
-#endif
+
 static void put24bint (WContents *cts, guint32 n)
 {
     if (cts->reversed)
@@ -3372,6 +3426,7 @@
     else
 	raw_put32bfloat (cts, f);
 }
+#endif
 
 static void put32bint_seek (WContents *cts, guint32 n, gulong seek)
 {
@@ -3380,7 +3435,7 @@
     else
 	raw_put32bint_seek (cts, n, seek);
 }
-#endif
+
 static void put64bint (WContents *cts, guint64 n)
 {
     if (cts->reversed)
@@ -3548,7 +3603,7 @@
   mac_time = device_time_time_t_to_mac (track->itdb->device, track->time_released);
   put32lint (cts, mac_time);
   put16lint (cts, track->unk144);
-  put16lint (cts, track->unk146);
+  put16lint (cts, track->explicit_flag);
   put32lint (cts, track->unk148);
   put32lint (cts, track->unk152);
   /* since iTunesDB version 0x0c */
@@ -3585,9 +3640,8 @@
   put16lint (cts, track->gapless_track_flag);
   put16lint (cts, track->gapless_album_flag);
   put32_n0 (cts, 23);
-  put32lint (cts, track->id); /* Needed on fat nanos/ipod classic to get art
-			       * in the right sidepane
-			       */
+  put32lint (cts, track->mhii_link); /* Needed on fat nanos/ipod classic to get art
+				      * in the right sidepane (mhii_link) */
   put32_n0 (cts, 8); /* padding */
 }
 
@@ -3708,6 +3762,58 @@
 }
 
 
+/* Return the first alpha-numeric character in the string
+   Return upper-case for alpha, return 0 for all numbers */
+
+static gunichar2 jump_table_letter (gchar *p)
+{
+    gunichar chr = 0;
+    gboolean found_alnum_chars = FALSE;
+
+    g_return_val_if_fail (p != NULL, '0');
+    g_return_val_if_fail (g_utf8_validate (p, -1, NULL), '0');
+
+    while (*p != '\0') {
+        chr = g_utf8_get_char (p);
+        if (g_unichar_isalnum (chr)) 
+        {
+	    found_alnum_chars = TRUE;
+            break;        
+        }
+        p = g_utf8_find_next_char (p, NULL);
+    }
+
+    if (!found_alnum_chars) {
+        /* Return number 0 if no alphanumerics in string */
+        return '0';
+    }
+
+    if (g_unichar_isalpha(chr))
+    {
+        gunichar2 utf16chr;
+        gunichar upperchr;
+        gunichar2 *str;
+        GError *err = NULL;
+
+	upperchr = g_unichar_toupper (chr);
+        str = g_ucs4_to_utf16 (&upperchr, 1, NULL, NULL, &err);
+	if (err != NULL) {
+	    fprintf (stderr, "Error in UCS4 to UTF16 conversion: %s, original unichar: %x, toupper unichar: %x\n", err->message, chr, upperchr);
+	    g_error_free (err);
+	    return '0';
+	}
+	else
+        {
+	    utf16chr = str[0];
+	    g_free (str);
+	    return utf16chr;
+	}
+    }	    
+
+    return '0';		/* Return number 0 for any digit */
+}
+
+
 /* Create a new list containing all tracks but with collate keys
    instead of the actual strings (title, artist, album, genre,
    composer) */
@@ -3731,28 +3837,34 @@
 	if (tr->sort_album && *tr->sort_album)
 	{
 	    ct->album = g_utf8_collate_key (tr->sort_album, -1);
+	    ct->letter_album = jump_table_letter (tr->sort_album);
 	}
 	else if (tr->album)
 	{
 	    ct->album = g_utf8_collate_key (tr->album, -1);
+	    ct->letter_album = jump_table_letter (tr->album);
 	}
 	else
 	{
 	    ct->album = g_strdup ("");
+	    ct->letter_album = '0';
 	}
 
 	/* title */
 	if (tr->sort_title && *tr->sort_title)
 	{
 	    ct->title = g_utf8_collate_key (tr->sort_title, -1);
+	    ct->letter_title = jump_table_letter (tr->sort_title);
 	}
 	else if (tr->title)
 	{
 	    ct->title = g_utf8_collate_key (tr->title, -1);
+	    ct->letter_title = jump_table_letter (tr->title);
 	}
 	else
 	{
 	    ct->title = g_strdup ("");
+	    ct->letter_title = '0';
 	}
 
 	/* artist */
@@ -3760,39 +3872,47 @@
 	if (str)
 	{
 	    ct->artist = g_utf8_collate_key (str, -1);
+	    ct->letter_artist = jump_table_letter (str);
 	    g_free (str);
 	}
 	else if (tr->artist)
 	{
 	    ct->artist = g_utf8_collate_key (tr->artist, -1);
+	    ct->letter_artist = jump_table_letter (tr->artist);
 	}
 	else
 	{
 	    ct->artist = g_strdup ("");
+	    ct->letter_artist = '0';
 	}
 
 	/* genre */
 	if (tr->genre)
 	{
 	    ct->genre = g_utf8_collate_key (tr->genre, -1);
+	    ct->letter_genre = jump_table_letter (tr->genre);
 	}
 	else
 	{
 	    ct->genre = g_strdup ("");
+	    ct->letter_genre = '0';
 	}
 
 	/* composer */
 	if (tr->sort_composer && *tr->sort_composer)
 	{
 	    ct->composer = g_utf8_collate_key (tr->sort_composer, -1);
+	    ct->letter_composer = jump_table_letter (tr->sort_composer);
 	}
 	else if (tr->composer)
 	{
 	    ct->composer = g_utf8_collate_key (tr->composer, -1);
+	    ct->letter_composer = jump_table_letter (tr->composer);
 	}
 	else
 	{
 	    ct->composer = g_strdup ("");
+	    ct->letter_composer = '0';
 	}
 
 	ct->track_nr = tr->track_nr;
@@ -3823,7 +3943,6 @@
     g_list_free (coltracks);
 }
 
-
 /* Write out one mhod header.
      type: see enum of MHMOD_IDs;
      data: utf8 string for text items
@@ -3927,16 +4046,58 @@
       put32_n0 (cts, 4);             /* unknown                    */
       break;
   case MHOD_ID_CHAPTERDATA:
-      g_return_if_fail (mhod->data.chapterdata_track);
+      g_return_if_fail (mhod->data.chapterdata);
       {
-	  Itdb_Track *track = mhod->data.chapterdata_track;
-	  put_header (cts, "mhod");   /* header                     */
-	  put32lint (cts, 24);        /* size of header             */
-	  put32lint (cts, 24+track->chapterdata_raw_length); /*size */
-	  put32lint (cts, mhod->type); /* type of the entry          */
-	  put32_n0 (cts, 2);          /* unknown                    */
-	  put_data (cts, track->chapterdata_raw,
-		    track->chapterdata_raw_length);
+	  gulong header_seek = cts->pos; /* needed to fix length */
+	  GList *gl;
+	  gint numchapters = g_list_length (mhod->data.chapterdata->chapters);
+	  put_header (cts, "mhod");       /* header      */
+	  put32lint (cts, 24);            /* header size */
+	  put32lint (cts, -1);            /* total length, fix later  */
+	  put32lint (cts, mhod->type);    /* entry type  */
+	  put32_n0 (cts, 2);              /* unknown     */
+	  put32lint (cts, mhod->data.chapterdata->unk024); /* unknown */
+	  put32lint (cts, mhod->data.chapterdata->unk028); /* unknown */
+	  put32lint (cts, mhod->data.chapterdata->unk032); /* unknown */
+	  put32bint (cts, -1);            /* total length of sean atom, fix later  */
+	  put_header (cts, "sean");
+	  put32bint (cts, 1);             /* unknown     */
+	  put32bint (cts, numchapters+1); /* children    */
+	  put32bint (cts, 0);             /* unknown     */
+	  for (gl=mhod->data.chapterdata->chapters; gl; gl=gl->next)
+	  {
+	      gunichar2 *title_utf16;
+	      Itdb_Chapter *chapter = gl->data;
+/*	      gint len = strlen(chapter->chaptertitle); */
+		  glong len;
+	      title_utf16 = NULL;
+	      title_utf16 = g_utf8_to_utf16 (chapter->chaptertitle,
+		      -1,NULL,&len,NULL);
+	      fixup_big_utf16 (title_utf16);
+	      put32bint (cts, 42+2*len); /* total length  */
+	      put_header (cts, "chap");
+	      put32bint (cts, chapter->startpos); /* should we check if startpos=0 here? */
+	      put32bint (cts, 1);        /* children */
+	      put32bint (cts, 0);        /* unknown  */
+	      put32bint (cts, 22+2*len); /* length   */
+	      put_header (cts, "name");
+	      put32bint (cts, 1);        /* unknown  */
+	      put32_n0 (cts, 2);         /* unknown  */
+	      put16bint (cts, len);
+	      put_data (cts, (gchar *)title_utf16, 2*len);
+	      g_free (title_utf16);
+
+	  }
+	  put32bint (cts, 28); /* size     */
+	  put_header (cts, "hedr");
+	  put32bint (cts, 1);  /* unknown  */
+	  put32bint (cts, 0);  /* children */
+	  put32_n0 (cts, 2);   /* unknown  */
+	  put32bint (cts, 1);  /* unknown  */
+	  
+	  
+	  put32bint_seek (cts, cts->pos-(header_seek+36), header_seek+36); /* fix length of sean atom */
+	  fix_header (cts, header_seek);
       }
       break;
   case MHOD_ID_SPLPREF:
@@ -4067,9 +4228,13 @@
 	  gint numtracks = ct->numtracks;
 	  GList *gl;
 	  gpointer compfunc = NULL;
+ 	  gunichar2 sortkey = 0;
+          gunichar2 lastsortkey = 0;
+	  guint32 mhod53index = 0;
+ 	  struct mhod53_entry *m53 = NULL;
 
 	  /* sort list */
-	  switch (mhod->data2.mhod52sorttype)
+	  switch (mhod->mhod52sorttype)
 	  {
 	  case MHOD52_SORTTYPE_TITLE:
 	      compfunc = mhod52_sort_title;
@@ -4099,7 +4264,7 @@
 	  put32lint (cts, mhod->type);      /* type of the mhod           */
 	  put32_n0 (cts, 2);                /* unknown                    */
 	  /* end of header, start of data */
-	  put32lint (cts, mhod->data2.mhod52sorttype);   /* sort type     */
+	  put32lint (cts, mhod->mhod52sorttype);   /* sort type     */
 	  put32lint (cts, numtracks);       /* number of entries          */
 	  put32_n0 (cts, 10);               /* unknown                    */
 	  for (gl=mhod->data.mhod52coltracks; gl; gl=gl->next)
@@ -4107,9 +4272,66 @@
 	      ct = gl->data;
 	      g_return_if_fail (ct);
 	      put32lint (cts, ct->index);
+
+	      /* This is for the type 53s */
+	      switch (mhod->mhod52sorttype)
+	      {
+		case MHOD52_SORTTYPE_TITLE:
+		sortkey = ct->letter_title;
+		break;
+	      case MHOD52_SORTTYPE_ALBUM:
+		sortkey = ct->letter_album;
+		break;
+	      case MHOD52_SORTTYPE_ARTIST:
+		sortkey = ct->letter_artist;
+		break;
+	      case MHOD52_SORTTYPE_GENRE:
+		sortkey = ct->letter_genre;
+		break;
+	      case MHOD52_SORTTYPE_COMPOSER:
+		sortkey = ct->letter_composer;
+		break;
+	      }
+
+	    if (sortkey != lastsortkey) {
+	      m53 = g_new0 (struct mhod53_entry, 1);
+	      m53->letter = sortkey;
+	      m53->start = mhod53index;
+	      m53->count = 0;
+	      mhod->mhod53_list = g_list_append (mhod->mhod53_list, m53);
+	      lastsortkey = sortkey; 
+	    }
+	    mhod53index++;
+	    m53->count++;
 	  }
       }
       break;
+  case MHOD_ID_LIBPLAYLISTJUMPTABLE:
+      {
+          GList *gl;
+          guint32 numentries;
+          struct mhod53_entry *m53;
+
+          numentries = g_list_length (mhod->mhod53_list);
+          put_header (cts, "mhod");				/* header */
+          put32lint (cts, 24);				/* size of header */
+          put32lint (cts, 12*numentries+40);		/* size of header + body */
+          put32lint (cts, mhod->type);			/* type of the mhod */
+          put32_n0 (cts, 2);				/* unknown */
+          put32lint (cts, mhod->mhod52sorttype);    	/* sort type */
+          put32lint (cts, numentries);			/* number of entries */
+          put32_n0 (cts, 2);				/* unknown */
+
+          for (gl=mhod->mhod53_list; gl; gl=gl->next)
+          {
+              m53 = gl->data;
+              put16lint (cts, m53->letter);
+              put16lint (cts, 0);
+              put32lint (cts, m53->start);
+              put32lint (cts, m53->count);
+          }
+      }
+      break;
   }
 }
 
@@ -4420,10 +4642,10 @@
 	    mk_mhod (fexp, &mhod);
 	    ++mhod_num;
 	}
-	if (track->chapterdata_raw && track->chapterdata_raw_length)
+	if (track->chapterdata && track->chapterdata->chapters)
 	{
 	    mhod.type = MHOD_ID_CHAPTERDATA;
-	    mhod.data.chapterdata_track = track;
+	    mhod.data.chapterdata = track->chapterdata;
 	    mk_mhod (fexp, &mhod);
 	    ++mhod_num;
 	}
@@ -4481,9 +4703,9 @@
 }
 
 
-void free_memberlist (gpointer data);
-void write_one_podcast_group (gpointer key, gpointer value, gpointer userdata);
-void free_memberlist (gpointer data)
+static void free_memberlist (gpointer data);
+static void write_one_podcast_group (gpointer key, gpointer value, gpointer userdata);
+static void free_memberlist (gpointer data)
 {
     GList **memberlist = data;
     if (memberlist)
@@ -4492,8 +4714,8 @@
 	g_free (memberlist);
     }
 }
-void write_one_podcast_group (gpointer key, gpointer value,
-			      gpointer userdata)
+static void write_one_podcast_group (gpointer key, gpointer value,
+   			             gpointer userdata)
 {
     gchar *album = key;
     GList **memberlist = value;
@@ -4601,7 +4823,26 @@
     return TRUE;
 }
 
+/* Write one type 52 and the corresponding type 53 mhod */
+static void mk_mhod52 (enum MHOD52_SORTTYPE mhod52sorttype, FExport *fexp, 
+                       MHODData *mhod)
+{
+    mhod->mhod52sorttype = mhod52sorttype;
+    mhod->type = MHOD_ID_LIBPLAYLISTINDEX;
+    mk_mhod (fexp, mhod);
+}
 
+static void mk_mhod53 (enum MHOD52_SORTTYPE mhod52sorttype, FExport *fexp, 
+                       MHODData *mhod)
+{
+    mhod->type = MHOD_ID_LIBPLAYLISTJUMPTABLE;
+    mk_mhod (fexp, mhod);
+    g_list_foreach (mhod->mhod53_list, (GFunc)g_free, NULL);
+    g_list_free (mhod->mhod53_list);
+    mhod->mhod53_list = NULL;
+}
+
+
 /* corresponds to mk_mhyp */
 /* mhsd_type: 2: write normal playlists
               3: write podcast playlist in special format */
@@ -4639,8 +4880,8 @@
     else
     {
 	if ((pl->type == ITDB_PL_TYPE_MPL) && pl->members)
-	{   /* 5 more MHOD 52 lists */
-	    mhodnum += 5;
+	{   /* 5 more MHOD 52 lists and 5 more MHOD 53 lists*/
+	    mhodnum += 10;
 	}
     }
     put32lint (cts, mhodnum);      /* nr of mhods               */
@@ -4666,23 +4907,25 @@
     mk_long_mhod_id_playlist (fexp, pl);
 
     if ((pl->type == ITDB_PL_TYPE_MPL) && pl->members)
-    {   /* write out the MHOD 52 lists */
+    {   /* write out the MHOD 52 and MHOD 53 lists */
 	/* We have to sort all tracks five times. To speed this up,
 	   translate the utf8 keys into collate_keys and use the
 	   faster strcmp() for comparison */
 	mhod.valid = TRUE;
-	mhod.type = MHOD_ID_LIBPLAYLISTINDEX;
 	mhod.data.mhod52coltracks = mhod52_make_collate_keys (pl->members);
-	mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_TITLE;
-	mk_mhod (fexp, &mhod);
-	mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_ARTIST;
-	mk_mhod (fexp, &mhod);
-	mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_ALBUM;
-	mk_mhod (fexp, &mhod);
-	mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_GENRE;
-	mk_mhod (fexp, &mhod);
-	mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_COMPOSER;
-	mk_mhod (fexp, &mhod);
+	mhod.mhod53_list = NULL;	
+
+	mk_mhod52 (MHOD52_SORTTYPE_TITLE, fexp, &mhod);	
+	mk_mhod53 (MHOD52_SORTTYPE_TITLE, fexp, &mhod);	
+	mk_mhod52 (MHOD52_SORTTYPE_ARTIST, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_ARTIST, fexp, &mhod);
+	mk_mhod52 (MHOD52_SORTTYPE_ALBUM, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_ALBUM, fexp, &mhod);
+	mk_mhod52 (MHOD52_SORTTYPE_GENRE, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_GENRE, fexp, &mhod);
+	mk_mhod52 (MHOD52_SORTTYPE_COMPOSER, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_COMPOSER, fexp, &mhod);
+
 	mhod52_free_collate_keys (mhod.data.mhod52coltracks);
     }
     else  if (pl->is_spl)
@@ -4759,44 +5002,12 @@
  * cts->error accordingly. */
 static gboolean wcontents_write (WContents *cts)
 {
-    int fd;
-
     g_return_val_if_fail (cts, FALSE);
     g_return_val_if_fail (cts->filename, FALSE);
 
-    fd = creat (cts->filename, S_IRWXU|S_IRWXG|S_IRWXO);
-
-    if (fd == -1)
-    {
-	cts->error = g_error_new (G_FILE_ERROR,
-				  g_file_error_from_errno (errno),
-				  _("Opening of '%s' for writing failed (%s)."),
-				  cts->filename, g_strerror (errno));
-	return FALSE;
-    }
-    if (cts->contents && cts->pos)
-    {
-	ssize_t written = write (fd, cts->contents, cts->pos);
-	if (written == -1)
-	{
-	    cts->error = g_error_new (G_FILE_ERROR,
-				      g_file_error_from_errno (errno),
-				      _("Writing to '%s' failed (%s)."),
-				      cts->filename, g_strerror (errno));
-	    close (fd);
-	    return FALSE;
-	}
-    }
-    fd = close (fd);
-    if (fd == -1)
-    {
-	cts->error = g_error_new (G_FILE_ERROR,
-				  g_file_error_from_errno (errno),
-				  _("Writing to '%s' failed (%s)."),
-				  cts->filename, g_strerror (errno));
-	return FALSE;
-    }
-    return TRUE;
+    cts->error = NULL;
+    return itdb_file_set_contents (cts->filename, cts->contents, 
+                                   cts->pos, &cts->error);
 }
 
 
@@ -4905,15 +5116,15 @@
 
 /**
  * itdb_write_file:
- * @itdb: the #Itdb_iTunesDB to save
- * @filename: filename to save @itdb to
- * @error: return location for a #GError or NULL
+ * @itdb:       the #Itdb_iTunesDB to save
+ * @filename:   filename to save @itdb to
+ * @error:      return location for a #GError or NULL
  *
  * Write the content of @itdb to @filename. If @filename is NULL, it attempts
- * to write to itdb-&gt;filename.
+ * to write to @itdb->filename.
  *
- * Return value: TRUE if all went well, FALSE otherwise
- **/
+ * Returns: TRUE if all went well, FALSE otherwise
+ */
 gboolean itdb_write_file (Itdb_iTunesDB *itdb, const gchar *filename,
 			  GError **error)
 {
@@ -5000,8 +5211,8 @@
 
 /**
  * itdb_write:
- * @itdb: the #Itdb_iTunesDB to write to disk
- * @error: return location for a #GError or NULL
+ * @itdb:   the #Itdb_iTunesDB to write to disk
+ * @error:  return location for a #GError or NULL
  *
  * Write out an iTunesDB. It reassigns unique IDs to all tracks. 
  * An existing "Play Counts" file is renamed to "Play Counts.bak" if
@@ -5009,9 +5220,9 @@
  * An existing "OTGPlaylistInfo" file is removed if the export was
  * successful.
  *
- * Return value: TRUE on success, FALSE on error, in which case @error is
+ * Returns: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
- **/
+ */
 gboolean itdb_write (Itdb_iTunesDB *itdb, GError **error)
 {
     gchar *itunes_filename, *itunes_path;
@@ -5163,24 +5374,22 @@
 
 */
 
-
 /**
  * itdb_shuffle_write:
- * @itdb: the #Itdb_iTunesDB to write to disk
- * @error: return location for a #GError or NULL
+ * @itdb:   the #Itdb_iTunesDB to write to disk
+ * @error:  return location for a #GError or NULL
  *
  * Write out an iTunesSD for the Shuffle.
- * First reassigns unique IDs to all tracks.
- * An existing "Play Counts" file is renamed to "Play Counts.bak" if
- * the export was successful.
- * An existing "OTGPlaylistInfo" file is removed if the export was
- * successful.
- * @itdb->mountpoint must point to the mount point of the iPod,
- * e.g. "/mnt/ipod" and be in local encoding.
  *
- * Return value: TRUE on success, FALSE on error, in which case @error is
+ * First reassigns unique IDs to all tracks.  An existing "Play
+ * Counts" file is renamed to "Play Counts.bak" if the export was
+ * successful.  An existing "OTGPlaylistInfo" file is removed if the
+ * export was successful.  @itdb->mountpoint must point to the mount
+ * point of the iPod, e.g. "/mnt/ipod" and be in local encoding.
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
- **/
+ */
 gboolean itdb_shuffle_write (Itdb_iTunesDB *itdb, GError **error)
 {
     gchar *itunes_filename, *itunes_path;
@@ -5190,7 +5399,7 @@
     g_return_val_if_fail (itdb_get_mountpoint (itdb), FALSE);
 
     itunes_path = itdb_get_itunes_dir (itdb_get_mountpoint (itdb));
-    
+
     if(!itunes_path)
     {
 	gchar *str = g_build_filename (itdb_get_mountpoint (itdb),
@@ -5221,33 +5430,32 @@
     return result;
 }
 
+/* helper function */
+static gboolean haystack (gchar *filetype, gchar **desclist)
+{
+    gchar **dlp;
+    if (!filetype || !desclist) return FALSE;
+    for (dlp=desclist; *dlp; ++dlp)
+    {
+        if (strstr (filetype, *dlp)) return TRUE;
+    }
+    return FALSE;
+}
 
 /**
  * itdb_shuffle_write_file:
- * @itdb: the #Itdb_iTunesDB to write to disk
- * @filename: file to write to, cannot be NULL
- * @error: return location for a #GError or NULL
+ * @itdb:       the #Itdb_iTunesDB to write to disk
+ * @filename:   file to write to, cannot be NULL
+ * @error:      return location for a #GError or NULL
  *
- * Do the actual writing to the iTunesSD 
+ * Do the actual writing to the iTunesSD
  *
- * Return value: TRUE on success, FALSE on error, in which case @error is
+ * Returns: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
- **/
+ */
 gboolean itdb_shuffle_write_file (Itdb_iTunesDB *itdb,
 				  const gchar *filename, GError **error)
 {
-    auto gboolean haystack (gchar *filetype, gchar **desclist);
-    gboolean haystack (gchar *filetype, gchar **desclist)
-    {
-	gchar **dlp;
-	if (!filetype || !desclist) return FALSE;
-	for (dlp=desclist; *dlp; ++dlp)
-	{
-	    if (strstr (filetype, *dlp)) return TRUE;
-	}
-	return FALSE;
-    }
-
     FExport *fexp;
     GList *gl;
     WContents *cts;
@@ -5314,9 +5522,9 @@
 
 	put24bint (cts, 0x200);
 		
+	path = g_strdup (tr->ipod_path);
 	/* shuffle uses forward slash separator, not colon */
-	path = g_strdup (tr->ipod_path);
-	itdb_filename_ipod2fs (path);
+        g_strdelimit (path, ":", '/');
 	path_utf16 = g_utf8_to_utf16 (path, -1, NULL, &pathlen, NULL);
 	if (pathlen > 261) pathlen = 261;
 	fixup_little_utf16 (path_utf16);
@@ -5351,45 +5559,36 @@
     return result;
 }
 
-
-
-
-
-
-
-
-
-
-
 /*------------------------------------------------------------------*\
  *                                                                  *
  *                  Other file/filename stuff                       *
  *                                                                  *
 \*------------------------------------------------------------------*/
 
-
 /**
  * itdb_rename_files:
- * @mp: mount point of the iPod
- * @error: return location for a #GError or NULL
+ * @mp:     mount point of the iPod
+ * @error:  return location for a #GError or NULL
  *
  * Renames/removes some files on the iPod (Playcounts, OTG
  * semaphore). May have to be called if you write the iTunesDB not
  * directly to the iPod but to some other location and then manually
- * copy the file from there to the iPod. 
+ * copy the file from there to the iPod.
  *
- * Return value: FALSE on error and sets @error accordingly
- **/
+ * Returns: FALSE on error and sets @error accordingly
+ */
 gboolean itdb_rename_files (const gchar *mp, GError **error)
 {
     const gchar *db_plc_o[] = {"Play Counts", NULL};
     const gchar *db_otg[] = {"OTGPlaylistInfo", NULL};
     const gchar *db_shu[] = {"iTunesShuffle", NULL};
+    const gchar *db_ist[] = {"iTunesStats", NULL};
     gchar *itunesdir;
     gchar *plcname_o;
     gchar *plcname_n;
     gchar *otgname;
     gchar *shuname;
+    gchar *istname;
     gboolean result = TRUE;
 
     g_return_val_if_fail (mp, FALSE);
@@ -5403,10 +5602,11 @@
     }
 
     plcname_o = itdb_resolve_path (itunesdir, db_plc_o);
-    plcname_n = g_build_filename (itunesdir, 
+    plcname_n = g_build_filename (itunesdir,
 					 "Play Counts.bak", NULL);
     otgname = itdb_resolve_path (itunesdir, db_otg);
     shuname = itdb_resolve_path (itunesdir, db_shu);
+    istname = itdb_resolve_path (itunesdir, db_ist);
 
     /* rename "Play Counts" to "Play Counts.bak" */
     if (plcname_o)
@@ -5457,10 +5657,28 @@
 	}
     }
 
+    /* remove some Shuffle files */
+    if (istname)
+    {
+	if (unlink (istname) == -1)
+	{
+	    if (error && !*error)
+	    {   /* don't overwrite previous error */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error removing '%s' (%s)."),
+			 istname, g_strerror (errno));
+	    }
+	    result = FALSE;
+	}
+    }
+
     g_free (plcname_o);
     g_free (plcname_n);
     g_free (otgname);
     g_free (shuname);
+    g_free (istname);
     g_free (itunesdir);
 
     return result;
@@ -5469,12 +5687,12 @@
 
 /**
  * itdb_filename_fs2ipod:
- * @filename: a filename 'PC-style' (eg /iPod_Control/Music/f00/test.mp3)
+ * @filename: a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
  *
- * Convert string from casual PC file name to iPod iTunesDB format using ':' 
- * instead of G_DIR_SEPARATOR_S (ie slashes on Unix-like systems). @ipod_file
- * is modified in place.
- **/
+ * Convert string from casual PC file name to iPod iTunesDB format
+ * using ':' instead of G_DIR_SEPARATOR_S (i.e. slashes on Unix-like
+ * systems). @ipod_file is modified in place.
+ */
 void itdb_filename_fs2ipod (gchar *ipod_file)
 {
     g_strdelimit (ipod_file, G_DIR_SEPARATOR_S, ':');
@@ -5482,29 +5700,29 @@
 
 /**
  * itdb_filename_ipod2fs:
- * @ipod_file: a filename 'PC-style' (eg /iPod_Control/Music/f00/test.mp3)
+ * @ipod_file: a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
  *
- * Convert string from from iPod iTunesDB format to casual PC file name
- * using G_DIR_SEPARATOR (ie slashes on Unix-like systems) instead of ':'.
- * @ipod_file is modified in place.
- **/
+ * Convert string from from iPod iTunesDB format to casual PC file
+ * name using G_DIR_SEPARATOR (ie slashes on Unix-like systems)
+ * instead of ':'.  @ipod_file is modified in place.
+ */
 void itdb_filename_ipod2fs (gchar *ipod_file)
 {
     g_strdelimit (ipod_file, ":", G_DIR_SEPARATOR);
 }
 
-
-
 /**
  * itdb_set_mountpoint:
- * @itdb: an #Itdb_iTunesDB
- * @mp: new mount point
+ * @itdb:   an #Itdb_iTunesDB
+ * @mp:     new mount point
  *
- * Sets the mountpoint of @db. Always use this function to set the mountpoint
- * of an #Itdb_iTunesDB as it will reset the number of available 
- * /iPod_Control/Music/F.. dirs. It doesn't attempt to parse an iPod database
- * that may be present on the iPod at @mp
- **/
+ * Sets the mountpoint of @itdb. Always use this function to set the
+ * mountpoint of an #Itdb_iTunesDB as it will reset the number of
+ * available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
+ * an iPod database that may be present on the iPod at @mp.
+ *
+ * Since: 0.1.3
+ */
 void itdb_set_mountpoint (Itdb_iTunesDB *itdb, const gchar *mp)
 {
     g_return_if_fail (itdb);
@@ -5520,9 +5738,11 @@
  *
  * Retrieve a reference to the mountpoint of @itdb
  *
- * Return value: the @itdb mountpoint, this string shouldn't be freed nor 
- * modified
- **/
+ * Returns: the @itdb mountpoint, this string shouldn't be freed
+ * nor modified
+ *
+ * Since: 0.4.0
+ */
 const gchar *itdb_get_mountpoint (Itdb_iTunesDB *itdb)
 {
     g_return_val_if_fail (itdb, NULL);
@@ -5544,12 +5764,14 @@
  *
  * Determine the number of F.. directories in iPod_Control/Music.
  *
- * If itdb->musicdirs is already set, simply return the previously
+ * If @itdb->musicdirs is already set, simply return the previously
  * determined number. Otherwise count the directories first and set
- * itdb->musicdirs. 
+ * @itdb->musicdirs.
  *
- * Return value: max number of directories in iPod_Control/Music
- **/
+ * Returns: max number of directories in iPod_Control/Music
+ *
+ * Since: 0.1.3
+ */
 gint itdb_musicdirs_number (Itdb_iTunesDB *itdb)
 {
     g_return_val_if_fail (itdb, 0);
@@ -5560,29 +5782,31 @@
 
 /**
  * itdb_cp_get_dest_filename:
- * @track: track to transfer or NULL
+ * @track:      track to transfer or NULL
  * @mountpoint: mountpoint of your iPod or NULL
- * @filename: the source file
- * @error: return location for a #GError or NULL
+ * @filename:   the source file
+ * @error:      return location for a #GError or NULL
  *
- * Creates a valid filename on the iPod where to copy @filename.
+ * Creates a valid filename on the iPod where @filename can be copied.
  *
- * You must either provide @track or @mountpoint. Providing @track is
+ * You must provide either @track or @mountpoint. Providing @track is
  * not thread-safe (accesses track->itdb->device and may even write to
  * track->itdb->device). Providing @mountpoint is thread-safe but
  * slightly slower because the number of music directories is counted
  * each time the function is called.
  *
- * You can use #itdb_cp() to copy the track to the iPod or implement
+ * You can use itdb_cp() to copy the track to the iPod or implement
  * your own copy function. After the file was copied you have to call
- * #itdb_cp_finalize() to obtain relevant update information for
+ * itdb_cp_finalize() to obtain relevant update information for
  * #Itdb_Track.
  *
- * Return value: a valid filename on the iPod to where @filename can
- * be copied or NULL in case of an error. In that case @error is set
+ * Returns: a valid filename on the iPod where @filename can be
+ * copied or NULL in case of an error. In that case @error is set
  * accordingly. You must free the filename when it is no longer
  * needed.
- **/
+ *
+ * Since: 0.5.0
+ */
 gchar *itdb_cp_get_dest_filename (Itdb_Track *track,
                                   const gchar *mountpoint,
 				  const gchar *filename,
@@ -5656,7 +5880,7 @@
 
 	g_snprintf (dir_num_str, 6, "F%02d", dir_num);
 	dest_components[0] = dir_num_str;
-  
+
 	parent_dir_filename =
 	    itdb_resolve_path (music_dir, (const gchar **)dest_components);
 	if(parent_dir_filename == NULL)
@@ -5688,7 +5912,7 @@
 	do
 	{   /* we need to loop until we find an unused filename */
 	    dest_components[1] = 
-		g_strdup_printf("gtkpod%06d%s",
+		g_strdup_printf("libgpod%06d%s",
 				rand + oops, original_suffix);
 	    ipod_fullfile = itdb_resolve_path (
 		parent_dir_filename,
@@ -5714,33 +5938,45 @@
     return ipod_fullfile;
 }
 
-
 /**
  * itdb_cp_finalize:
- * @track: track to update or NULL
- * @mountpoint: mountpoint of your iPod or NULL
- * @dest_filename: the name of the file on the iPod copied to
- * @error: return location for a #GError or NULL
+ * @track:          track to update or NULL
+ * @mountpoint:     mountpoint of your iPod or NULL
+ * @dest_filename:  the name of the file on the iPod copied to
+ * @error:          return location for a #GError or NULL
  *
- * Updates information in @track necessary for the iPod. You must
- * either supply @track or @mountpoint. If @track == NULL, a new track
- * structure is created that must be freed with #itdb_track_free()
- * when it is no longer needed.
+ * Updates information in @track necessary for the iPod.
  *
- * The following fields are updated:
+ * You must supply either @track or @mountpoint. If @track == NULL, a
+ * new track structure is created that must be freed with
+ * itdb_track_free() when it is no longer needed.
  *
- * - ipod_path
- * - filetype_marker
- * - transferred
- * - size
+ * The following @track fields are updated:
  *
- * Return value: on success a pointer to the #Itdb_Track item passed
+ * <itemizedlist>
+ *   <listitem>
+ *       ipod_path
+ *   </listitem>
+ *   <listitem>
+ *       filetype_marker
+ *   </listitem>
+ *   <listitem>
+ *       transferred
+ *   </listitem>
+ *   <listitem>
+ *       size
+ *   </listitem>
+ * </itemizedlist>
+ *
+ * Returns: on success a pointer to the #Itdb_Track item passed
  * or a new #Itdb_Track item if @track was NULL. In the latter case
- * you must free the memory using #itdb_track_free() when the item is
+ * you must free the memory using itdb_track_free() when the item is
  * no longer used. If an error occurs NULL is returned and @error is
  * set accordingly. Errors occur when @dest_filename cannot be
  * accessed or the mountpoint is not set.
- **/
+ *
+ * Since: 0.5.0
+ */
 Itdb_Track *itdb_cp_finalize (Itdb_Track *track,
 			      const gchar *mountpoint,
 			      const gchar *dest_filename,
@@ -5840,12 +6076,11 @@
     return use_track;
 }
 
-
 /**
  * itdb_cp_track_to_ipod:
- * @track: the #Itdb_Track to copy (containing @filename metadata)
- * @filename: the source file
- * @error: return location for a #GError or NULL
+ * @track:      the #Itdb_Track to copy (containing @filename metadata)
+ * @filename:   the source file
+ * @error:      return location for a #GError or NULL
  * 
  * Copy one track to the iPod. The PC filename is @filename
  * and is taken literally.
@@ -5854,24 +6089,24 @@
  * with itdb_set_mountpoint() (done automatically when reading an
  * iTunesDB).
  *
- * If @track-&gt;transferred is set to TRUE, nothing is done. Upon
- * successful transfer @track-&gt;transferred is set to TRUE.
+ * If @track->transferred is set to TRUE, nothing is done. Upon
+ * successful transfer @track->transferred is set to TRUE.
  *
- * For storage, the directories "f00 ... fnn" will be used randomly.
+ * For storage, the directories "F00 ... Fnn" will be used randomly.
  *
- * The filename is constructed as "gtkpod"&lt;random number&gt; and copied
- * to @track-&gt;ipod_path. If this file already exists, &lt;random number&gt;
+ * The filename is constructed as "libgpod at random_number" and copied
+ * to @track->ipod_path. If this file already exists, @random_number
  * is adjusted until an unused filename is found.
  *
- * If @track-&gt;ipod_path is already set, this one will be used
+ * If @track->ipod_path is already set, this one will be used
  * instead. If a file with this name already exists, it will be
  * overwritten.
  *
- * @track-&gt;filetype_marker is set according to the filename extension
+ * @track->filetype_marker is set according to the filename extension
  *
- * Return value: TRUE on success, FALSE on error, in which case @error is
+ * Returns: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
- **/
+ */
 gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
 				const gchar *filename, GError **error)
 {
@@ -5902,24 +6137,26 @@
     return result;
 }
 
-
-
 /**
  * itdb_filename_on_ipod:
  * @track: an #Itdb_Track
  *
- * Return the full iPod filename as stored in @track.
+ * Get the full iPod filename as stored in @track.
  *
- * NOTE: NULL is returned when the file does not exist.
+ * <note>
+ * NULL is returned when the file does not exist.
+ * </note>
  *
- * NOTE: this code works around a problem on some systems (see
- * itdb_resolve_path() ) and might return a filename with different
- * case than the original filename. Don't copy it back to @track
- * unless you must 
+ * <note>
+ * This code works around a problem on some systems (see
+ * itdb_resolve_path()) and might return a filename with different
+ * case than the original filename. Don't copy it back to @track if
+ * you can avoid it.
+ * </note>
  *
- * Return value: full filename to @track on the iPod or NULL if no
+ * Returns: full filename to @track on the iPod or NULL if no
  * filename is set in @track. Must be freed with g_free() after use.
- **/
+ */
 gchar *itdb_filename_on_ipod (Itdb_Track *track)
 {
     gchar *result = NULL;
@@ -5955,25 +6192,28 @@
     return result;
 }
 
-
+/* Use open instead of fopen.  fwrite is really slow on the Mac. */
 /**
  * itdb_cp:
- * @from_file: source file
- * @to_file: destination file
- * @error: return location for a #GError or NULL
+ * @from_file:  source file
+ * @to_file:    destination file
+ * @error:      return location for a #GError or NULL
  *
- * Copy file "from_file" to "to_file".
+ * Copy file @from_file to @to_file.
  *
- * Return value: TRUE on success, FALSE on error, in which case @error is
+ * Returns: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
- **/
+ */
 gboolean itdb_cp (const gchar *from_file, const gchar *to_file,
 		  GError **error)
 {
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
     gchar *data;
     glong bread, bwrite;
-    FILE *file_in = NULL;
-    FILE *file_out = NULL;
+    int file_in = -1;
+    int file_out = -1;
 
 #if ITUNESDB_DEBUG
     fprintf(stderr, "Entered itunesdb_cp: '%s', '%s'\n", from_file, to_file);
@@ -5984,8 +6224,8 @@
 
     data = g_malloc (ITUNESDB_COPYBLK);
 
-    file_in = fopen (from_file, "r");
-    if (file_in == NULL)
+    file_in = g_open (from_file, O_RDONLY | O_BINARY, 0);
+    if (file_in < 0)
     {
 	g_set_error (error,
 		     G_FILE_ERROR,
@@ -5995,8 +6235,9 @@
 	goto err_out;
     }
 
-    file_out = fopen (to_file, "w");
-    if (file_out == NULL)
+    file_out =  g_open (to_file, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY,
+                        S_IRWXU|S_IRWXG|S_IRWXO);
+    if (file_out < 0)
     {
 	g_set_error (error,
 		     G_FILE_ERROR,
@@ -6007,25 +6248,23 @@
     }
 
     do {
-	bread = fread (data, 1, ITUNESDB_COPYBLK, file_in);
+	bread = read (file_in, data, ITUNESDB_COPYBLK);
 #if ITUNESDB_DEBUG
 	fprintf(stderr, "itunesdb_cp: read %ld bytes\n", bread);
 #endif
-	if (bread == 0)
+	if (bread < 0)
 	{
-	    if (feof (file_in) == 0)
-	    {   /* error -- not end of file! */
-		g_set_error (error,
-			     G_FILE_ERROR,
-			     g_file_error_from_errno (errno),
-			     _("Error while reading from '%s' (%s)."),
-			     from_file, g_strerror (errno));
-		goto err_out;
-	    }
+	    /* error -- not end of file! */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error while reading from '%s' (%s)."),
+			 from_file, g_strerror (errno));
+	    goto err_out;
 	}
 	else
 	{
-	    bwrite = fwrite (data, 1, bread, file_out);
+	    bwrite = write (file_out, data, bread);
 #if ITUNESDB_DEBUG
 	    fprintf(stderr, "itunesdb_cp: wrote %ld bytes\n", bwrite);
 #endif
@@ -6041,9 +6280,9 @@
 	}
     } while (bread != 0);
 
-    if (fclose (file_in) != 0)
+    if (close (file_in) != 0)
     {
-	file_in = NULL;
+	file_in = -1;
 	g_set_error (error,
 		     G_FILE_ERROR,
 		     g_file_error_from_errno (errno),
@@ -6051,9 +6290,9 @@
 		     from_file, g_strerror (errno));
 	goto err_out;
     }
-    if (fclose (file_out) != 0)
+    if (close (file_out) != 0)
     {
-	file_out = NULL;
+	file_out = -1;
 	g_set_error (error,
 		     G_FILE_ERROR,
 		     g_file_error_from_errno (errno),
@@ -6065,16 +6304,58 @@
     return TRUE;
 
   err_out:
-    if (file_in)  fclose (file_in);
-    if (file_out) fclose (file_out);
-    remove (to_file);
+    if (file_in >= 0)  close (file_in);
+    if (file_out >= 0) close (file_out);
+    g_unlink (to_file);
     g_free (data);
     return FALSE;
 }
 
 
+G_GNUC_INTERNAL gboolean
+itdb_file_set_contents (const char *filename, 
+                        const char *data, gssize len, 
+                        GError **error)
+{
+    gchar *backup;
+    gboolean success;
 
+    /* sshfs (which is used to access iPhones/iTouches) can't successfully
+     * rename a file if the destination file already exist.
+     * We first move away the existing file to workaround that limitation
+     *                            */
+    if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
+        gint result;
+        backup = g_strdup_printf ("%sXXXXXX", filename);
+        result = g_rename (filename, backup);
+        if (result != 0) {
+            g_free (backup);
+            return FALSE;
+        }
+    } else {
+        backup = NULL;
+    }
 
+    success = g_file_set_contents (filename, data, len, error);
+    if (!success) {
+        if (backup != NULL) {
+            g_rename (backup, filename);
+            g_free (backup);
+        }
+        return FALSE;
+    }
+
+    /* File saving was
+     * ok, clean up our
+     * mess */
+    if (backup != NULL) {
+        g_unlink (backup);
+        g_free (backup);
+    }
+
+    return TRUE;
+}
+
 /**
  * itdb_get_control_dir:
  * @mountpoint: the iPod mountpoint
@@ -6083,9 +6364,11 @@
  * for standard iPods and 'iTunes/iTunes_Control' for mobile
  * applications.
  *
- * Return value: path to the control dir or NULL of non-existent. Must
+ * Returns: path to the control dir or NULL if non-existent. Must
  * g_free() after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_control_dir (const gchar *mountpoint)
 {
     gchar *p_ipod[] = {"iPod_Control", NULL};
@@ -6109,14 +6392,14 @@
 /**
  * itdb_get_dir:
  * @mountpoint: the iPod mountpoint
- * @dir: a directory
+ * @dir:        a directory
  *
  * Retrieve the directory @dir by first calling itdb_get_control_dir()
  * and then adding @dir
  *
- * Return value: path to @dir or NULL if non-existent. Must g_free()
+ * Returns: path to @dir or NULL if non-existent. Must g_free()
  * after use.
- **/
+ */
 static gchar *itdb_get_dir (const gchar *mountpoint, const gchar *dir)
 {
     gchar *control_dir;
@@ -6138,14 +6421,16 @@
 
 /**
  * itdb_get_path:
- * @dir: a directory
- * @file: a file
+ * @dir:    a directory
+ * @file:   a file
  *
  * Retrieve a path to the @file in @dir
  *
- * Return value: path to the @file or NULL if non-existent. Must be g_free()'d 
+ * Returns: path to the @file or NULL if non-existent. Must g_free()
  * after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_path (const gchar *dir, const gchar *file)
 {
     const gchar *p_file[] = {NULL, NULL};
@@ -6164,9 +6449,11 @@
  * Retrieve the iTunes directory (containing the iTunesDB) by first
  * calling itdb_get_control_dir() and then adding 'iTunes'
  *
- * Return value: path to the iTunes directory or NULL of non-existent.
+ * Returns: path to the iTunes directory or NULL if non-existent.
  * Must g_free() after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_itunes_dir (const gchar *mountpoint)
 {
     g_return_val_if_fail (mountpoint, NULL);
@@ -6181,9 +6468,9 @@
  * Retrieve the Music directory (containing the Fnn dirs) by first
  * calling itdb_get_control_dir() and then adding 'Music'
  *
- * Return value: path to the Music directory or NULL of
+ * Returns: path to the Music directory or NULL if
  * non-existent. Must g_free() after use.
- **/
+ */
 gchar *itdb_get_music_dir (const gchar *mountpoint)
 {
     g_return_val_if_fail (mountpoint, NULL);
@@ -6198,9 +6485,11 @@
  * Retrieve the Device directory (containing the SysInfo file) by
  * first calling itdb_get_control_dir() and then adding 'Device'
  *
- * Return value: path to the Device directory or NULL of
+ * Returns: path to the Device directory or NULL if
  * non-existent. Must g_free() after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_device_dir (const gchar *mountpoint)
 {
     g_return_val_if_fail (mountpoint, NULL);
@@ -6215,9 +6504,11 @@
  * Retrieve the Artwork directory (containing the ArtworDB) by
  * first calling itdb_get_control_dir() and then adding 'Artwork'
  *
- * Return value: path to the Artwork directory or NULL of
+ * Returns: path to the Artwork directory or NULL if
  * non-existent. Must g_free() after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_artwork_dir (const gchar *mountpoint)
 {
     g_return_val_if_fail (mountpoint, NULL);
@@ -6231,9 +6522,11 @@
  *
  * Retrieve a path to the iTunesDB
  *
- * Return value: path to the iTunesDB or NULL if non-existent. Must g_free()
+ * Returns: path to the iTunesDB or NULL if non-existent. Must g_free()
  * after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_itunesdb_path (const gchar *mountpoint)
 {
     gchar *itunes_dir, *path=NULL;
@@ -6257,9 +6550,11 @@
  *
  * Retrieve a path to the iTunesSD
  *
- * Return value: path to the iTunesSD or NULL if non-existent. Must g_free()
+ * Returns: path to the iTunesSD or NULL if non-existent. Must g_free()
  * after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_itunessd_path (const gchar *mountpoint)
 {
     gchar *itunes_dir, *path=NULL;
@@ -6283,9 +6578,11 @@
  *
  * Retrieve a path to the ArtworkDB
  *
- * Return value: path to the ArtworkDB or NULL if non-existent. Must g_free() 
+ * Returns: path to the ArtworkDB or NULL if non-existent. Must g_free()
  * after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_artworkdb_path (const gchar *mountpoint)
 {
     gchar *itunes_dir, *path=NULL;
@@ -6315,12 +6612,12 @@
  *
  * Gets the current time in a format appropriate for storing in the libgpod
  * data structures
- * 
- * Return value: current time
  *
- * Deprecated: kept for compatibility with older code, directly use 
+ * Returns: current time
+ *
+ * Deprecated: kept for compatibility with older code, directly use
  * g_get_current_time() or time(NULL) instead
- **/
+ */
 time_t itdb_time_get_mac_time (void)
 {
     GTimeVal time;
@@ -6330,18 +6627,17 @@
     return time.tv_sec;
 }
 
-
 /**
  * itdb_time_mac_to_host:
  * @time: time expressed in libgpod format
  *
  * Converts a timestamp from libgpod format to host system timestamp.
  *
- * Return value: timestamp for the host system
+ * Returns: timestamp for the host system
  *
  * Deprecated: It's been kept for compatibility with older code, but this
  * function is now a no-op
- **/
+ */
 time_t itdb_time_mac_to_host (time_t time)
 {
     return time;
@@ -6353,11 +6649,11 @@
  *
  * Convert host system timestamp to libgpod format timestamp
  *
- * Return value: a libgpod timestamp
+ * Returns: a libgpod timestamp
  *
  * Deprecated: It's been kept for compatibility with older code, but this
  * function is now a no-op
- **/
+ */
 time_t itdb_time_host_to_mac (time_t time)
 {
     return time;
@@ -6376,9 +6672,10 @@
  * information as well as the directory structure required for the
  * type of iPod.
  * 
- * Return value: TRUE when successful, FALSE if a failure has occurred.
- * 
- **/
+ * Returns: TRUE when successful, FALSE if a failure has occurred.
+ *
+ * Since: 0.4.0
+ */
 gboolean itdb_init_ipod (const gchar *mountpoint,
 			 const gchar *model_number,
 			 const gchar *ipod_name,
@@ -6389,29 +6686,29 @@
 	Itdb_Playlist *mpl = NULL;
 	Itdb_IpodInfo const *info = NULL;
 	gchar *path;
-	
+
 	g_return_val_if_fail (mountpoint, FALSE);
-						
+
 	/* Create new blank itdb database for writing to iPod */
 	itdb = itdb_new();
-					
+
 	/* Assign iPod device reference to new database */
 	itdb_set_mountpoint(itdb, mountpoint);
-	
+
 	/* Insert model_number into sysinfo file if present
 	 * The model number can be extracted in a couple of ways:
 	 *		- use the read_sysinfo_file function
-	 * 		- use libipoddevice and hal to get the model
-	 *                (as far as I know, libipoddevice will also
-         *                read the sysinfo file, complemented by some
-	 *	          guessing).
+	 *		- use libipoddevice and hal to get the model
+	 *		  (as far as I know, libipoddevice will also
+	 *		  read the sysinfo file, complemented by some
+	 *		  guessing).
 	 */
 	if (model_number)
 	{
 	    itdb_device_set_sysinfo (itdb->device,
 				     "ModelNumStr", model_number);
 	}
-	
+
 	/* Create the remaining directories resident on blank ipod */
 	writeok = itdb_create_directories(itdb->device, error);
 	if(! writeok)
@@ -6448,7 +6745,7 @@
 
 	/* Retrieve the model from the device information */
 	info = itdb_device_get_ipod_info(itdb->device);
-    
+
 	/* If model is a shuffle or the model is undetermined,
 	 * ie. @model_number is NULL, then create the itunesSD database
 	 */
@@ -6457,12 +6754,12 @@
 	    path = itdb_get_itunessd_path (mountpoint);
 	    if (!path)
 	    {
-	    	writeok = itdb_shuffle_write(itdb, error);
-	    	if(! writeok)
-	    	{
-	    	    itdb_free (itdb);
+		writeok = itdb_shuffle_write(itdb, error);
+		if(! writeok)
+		{
+		    itdb_free (itdb);
 		    return FALSE;
-	    	}
+		}
 	    }
 	    g_free (path);
 	}
@@ -6530,83 +6827,6 @@
  *             Create iPod directory hierarchy                      *
  *                                                                  *
 \*------------------------------------------------------------------*/
-
-/* mkdir_with_parents is copied from GLIB2.8 (gfileutils.c, V1.78), as
- * it is new to V2.8. May be replaced with g_mkdir_with_parents() in a
- * couple of years. */
-
-/**
- * mkdir_with_parents:
- * @pathname: a pathname in the GLib file name encoding
- * @mode: permissions to use for newly created directories
- *
- * Create a directory if it doesn't already exist. Create intermediate
- * parent directories as needed, too.
- *
- * Returns: 0 if the directory already exists, or was successfully
- * created. Returns -1 if an error occurred, with errno set.
- *
- */
-static int
-mkdir_with_parents (const gchar *pathname,
-		      int          mode)
-{
-  gchar *fn, *p;
-
-  if (pathname == NULL || *pathname == '\0')
-    {
-      errno = EINVAL;
-      return -1;
-    }
-
-  fn = g_strdup (pathname);
-
-  if (g_path_is_absolute (fn))
-    p = (gchar *) g_path_skip_root (fn);
-  else
-    p = fn;
-
-  do
-    {
-      while (*p && !G_IS_DIR_SEPARATOR (*p))
-	p++;
-      
-      if (!*p)
-	p = NULL;
-      else
-	*p = '\0';
-      
-      if (!g_file_test (fn, G_FILE_TEST_EXISTS))
-	{
-	  if (g_mkdir (fn, mode) == -1)
-	    {
-	      int errno_save = errno;
-	      g_free (fn);
-	      errno = errno_save;
-	      return -1;
-	    }
-	}
-      else if (!g_file_test (fn, G_FILE_TEST_IS_DIR))
-	{
-	  g_free (fn);
-	  errno = ENOTDIR;
-	  return -1;
-	}
-      if (p)
-	{
-	  *p++ = G_DIR_SEPARATOR;
-	  while (*p && G_IS_DIR_SEPARATOR (*p))
-	    p++;
-	}
-    }
-  while (p);
-
-  g_free (fn);
-
-  return 0;
-}
-
-	
 static gboolean itdb_create_directories (Itdb_Device *device, GError **error)
 {
     const gchar *mp;
@@ -6664,7 +6884,7 @@
     pbuf = g_build_filename (mp, podpath, NULL);
     if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
     {
-	if (mkdir_with_parents(pbuf, 0777) != 0)
+	if (g_mkdir_with_parents(pbuf, 0777) != 0)
 	{
 	    goto error_dir;
 	}
@@ -6675,7 +6895,7 @@
     pbuf = g_build_filename (mp, podpath, "Music", NULL);
     if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
     {
-	if((mkdir(pbuf, 0777) != 0))
+	if((g_mkdir(pbuf, 0777) != 0))
 	{
 	    goto error_dir;
 	}
@@ -6686,7 +6906,7 @@
     pbuf = g_build_filename (mp, podpath, "iTunes", NULL);
     if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
     {
-	if((mkdir(pbuf, 0777) != 0))
+	if((g_mkdir(pbuf, 0777) != 0))
 	{
 	    goto error_dir;
 	}
@@ -6696,13 +6916,13 @@
     /* Build Artwork directory only for devices requiring artwork
      * (assume that 'unknown models' are new and will support
      * artwork) */
-    if (ipod_supports_cover_art(device) ||
+    if (itdb_device_supports_artwork(device) ||
 	(info->ipod_model == ITDB_IPOD_MODEL_UNKNOWN))
     {
 	pbuf = g_build_filename (mp, podpath, "Artwork", NULL);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if((mkdir(pbuf, 0777) != 0)) {
+	    if((g_mkdir(pbuf, 0777) != 0)) {
 		goto error_dir;
 	    }
 	}
@@ -6710,35 +6930,31 @@
     }
 
     /* Build Photo directory only for devices requiring it */
-    if (ipod_supports_photos(device) ||
+    if (itdb_device_supports_photo(device) ||
 	(info->ipod_model == ITDB_IPOD_MODEL_UNKNOWN))
     {
 	pbuf = g_build_filename (mp, "Photos", "Thumbs", NULL);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if (mkdir_with_parents(pbuf, 0777) != 0)
+	    if (g_mkdir_with_parents(pbuf, 0777) != 0)
 	    {
 		goto error_dir;
 	    }
 	}
 	g_free (pbuf);
     }
-    
 
     /* Build the directories that hold the music files */
     dirnum = info->musicdirs;
     if (dirnum == 0)
-    {   /* do a guess */
-	struct statvfs stat;
-	if (statvfs (mp, &stat) != 0)
-	{   /* why should this fail !? */
-	    dirnum = 20;
-	}
-	else
-	{
-	    gdouble size = ((gdouble)stat.f_blocks * stat.f_frsize) / 1073741824;
+    {
+	guint64 capacity, free_space;
+	if (itdb_device_get_storage_info(device, &capacity, &free_space)) {
+	    gdouble size = ((gdouble)capacity) / 1073741824;
 	    if (size < 20)  dirnum = 20;
 	    else            dirnum = 50;
+	} else {
+	    dirnum = 20;
 	}
     }
 
@@ -6749,7 +6965,7 @@
 	g_free (num);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if((mkdir(pbuf, 0777) != 0))
+	    if((g_mkdir(pbuf, 0777) != 0))
 	    {
 		goto error_dir;
 	    }
@@ -6763,7 +6979,7 @@
 	pbuf = g_build_filename (mp, "Calendars", NULL);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if((mkdir(pbuf, 0777) != 0))
+	    if((g_mkdir(pbuf, 0777) != 0))
 	    {
 		goto error_dir;
 	    }
@@ -6774,7 +6990,7 @@
 	pbuf = g_build_filename (mp, "Contacts", NULL);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if((mkdir(pbuf, 0777) != 0))
+	    if((g_mkdir(pbuf, 0777) != 0))
 	    {
 		goto error_dir;
 	    }
@@ -6784,7 +7000,7 @@
 	pbuf = g_build_filename (mp, "Notes", NULL);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if((mkdir(pbuf, 0777) != 0))
+	    if((g_mkdir(pbuf, 0777) != 0))
 	    {
 		goto error_dir;
 	    }
@@ -6800,15 +7016,15 @@
 	pbuf = g_build_filename (mp, podpath, "Device", NULL);
 	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
 	{
-	    if((mkdir(pbuf, 0777) != 0))
+	    if((g_mkdir(pbuf, 0777) != 0))
 	    {
 		goto error_dir;
 	    }
-   	}
+	}
 	g_free (pbuf);
 
 	model_number = itdb_device_get_sysinfo (device, "ModelNumStr");
-   	/* Construct a SysInfo file */
+	/* Construct a SysInfo file */
 	if (model_number && (strlen (model_number) != 0))
 	{
 	    pbuf = NULL;
@@ -6826,7 +7042,7 @@
     if (pbuf)
     {
 	g_set_error (error, 0, -1,
-		     _("Problem creating iPod directory or file: '%s'."), 
+		     _("Problem creating iPod directory or file: '%s'."),
 		     pbuf);
 	result = FALSE;
     } else

Modified: libgpod/trunk/src/itdb_photoalbum.c
===================================================================
--- libgpod/trunk/src/itdb_photoalbum.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_photoalbum.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-/* Time-stamp: <2007-11-03 20:27:36 jcs>
+/*
 |
 |  Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -24,7 +24,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_photoalbum.c 1753 2007-11-04 00:48:12Z jcsjcs $
+|  $Id: itdb_photoalbum.c 2159 2008-12-08 01:16:58Z tmzullinger $
 */
 #include <config.h>
 
@@ -86,7 +86,7 @@
 
    For example, "MA450" would stand for an 80 GB 6th generation iPod
    Video. See itdb_device.c for a list of supported models.
-   
+
    This information will be written to the iPod when the PhotoDB is
    saved (itdb_device_write_sysinfo() is called).
 */
@@ -114,7 +114,6 @@
     }
 }
 
-
 /**
  * itdb_get_photos_dir:
  * @mountpoint: mountpoint of iPod
@@ -122,8 +121,10 @@
  * Retrieve the Photo directory by
  * first calling itdb_get_control_dir() and then adding 'Photos'
  *
- * Return value: path to the Artwork directory or NULL of
+ * Returns: path to the Artwork directory or NULL if
  * non-existent. Must g_free() after use.
+ *
+ * Since: 0.4.0
  */
 gchar *itdb_get_photos_dir (const gchar *mountpoint)
 {
@@ -150,9 +151,11 @@
  *
  * Retrieve a path to the Photo DB
  *
- * Return value: path to the PhotoDB or NULL if non-existent. Must
+ * Returns: path to the PhotoDB or NULL if non-existent. Must
  * g_free() after use.
- **/
+ *
+ * Since: 0.4.0
+ */
 gchar *itdb_get_photodb_path (const gchar *mountpoint)
 {
     gchar *photo_dir, *path=NULL;
@@ -177,8 +180,10 @@
  * Retrieve the Photo Thumbnail directory by
  * first calling itdb_get_control_dir() and then adding 'Photos/Thumbs'
  *
- * Return value: path to the Artwork directory or NULL of
+ * Returns: path to the Artwork directory or NULL if
  * non-existent. Must g_free() after use.
+ *
+ * Since: 0.4.0
  */
 gchar *itdb_get_photos_thumb_dir (const gchar *mountpoint)
 {
@@ -200,16 +205,17 @@
     return result;
 }
 
-
 /**
  * itdb_photodb_parse:
- * @mp: mountpoint of the iPod
- * @error: will contain the error description when an error occured.
+ * @mp:     mountpoint of the iPod
+ * @error:  will contain the error description when an error occured.
  *
  * Parses the photo database of an iPod mounted at @mp.
  *
- * Return value: the imported PhotoDB or NULL in case of an error.
- **/
+ * Returns: the imported PhotoDB or NULL in case of an error.
+ *
+ * Since: 0.4.0
+ */
 Itdb_PhotoDB *itdb_photodb_parse (const gchar *mp, GError **error)
 {
     gchar *photos_dir;
@@ -239,7 +245,6 @@
     return photodb;
 }
 
-
 /**
  * itdb_photodb_create:
  * @mountpoint: mountpoint or NULL.
@@ -247,10 +252,12 @@
  * Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
  * set it manually later by calling itdb_device_set_mountpoint().
  *
- * Return value: a newly created Itdb_PhotoDB to be freed with
+ * Returns: a newly created Itdb_PhotoDB to be freed with
  * itdb_photodb_free() when it's no longer needed. The Photo Library
  * Album is created automatically.
- **/
+ *
+ * Since: 0.4.2
+ */
 Itdb_PhotoDB *itdb_photodb_create (const gchar *mountpoint)
 {
     Itdb_PhotoDB *photodb = itdb_photodb_new ();
@@ -268,7 +275,6 @@
 }
 
 
-
 static Itdb_PhotoDB *itdb_photodb_new (void)
 {
     Itdb_PhotoDB *photodb;
@@ -279,14 +285,14 @@
     return photodb;
 }
 
-
-
-/** 
+/**
  * itdb_photodb_free:
  * @photodb: an #Itdb_PhotoDB
  *
- * Free the memory taken by @photodb. 
- **/
+ * Free the memory taken by @photodb.
+ *
+ * Since: 0.4.0
+ */
 void itdb_photodb_free (Itdb_PhotoDB *photodb)
 {
 	if (photodb)
@@ -309,25 +315,33 @@
 
 
 
-G_GNUC_INTERNAL gint itdb_get_free_photo_id ( Itdb_PhotoDB *db ) 
+G_GNUC_INTERNAL gint itdb_get_max_photo_id ( Itdb_PhotoDB *db )
 {
-	gint photo_id = 0;
+	gint max_seen_id = 0;
 	GList *it;
 
 	for (it = db->photos; it != NULL; it = it->next) {
 		Itdb_Artwork *artwork;
 
 		artwork = (Itdb_Artwork *)it->data;
-		if( artwork->id > photo_id )
-			photo_id = artwork->id;
+		if( artwork->id > max_seen_id )
+			max_seen_id = artwork->id;
 	}
-	return photo_id + 1;
+        for (it = db->photoalbums; it != NULL; it = it->next) {
+		Itdb_PhotoAlbum *album;
+		album = (Itdb_PhotoAlbum *)it->data;
+		if ( album->album_id > max_seen_id )
+			max_seen_id = album->album_id;
+		
+	}
+	return max_seen_id;
 }
 
 static void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *album)
 {
     if (album)
     {
+	album->photodb = NULL;
 	g_free (album->name);
 	g_list_free (album->members);
 
@@ -351,10 +365,9 @@
 						      GError **error)
 {
 #ifdef HAVE_GDKPIXBUF
-    gboolean result;
+    gboolean result=FALSE;
     Itdb_Artwork *artwork;
     Itdb_PhotoAlbum *album;
-    const Itdb_ArtworkFormat *format;
 
     g_return_val_if_fail (db, NULL);
     g_return_val_if_fail (db->device, NULL);
@@ -362,7 +375,7 @@
     g_return_val_if_fail (!(image_data && (image_data_len == 0)), NULL);
     g_return_val_if_fail (!(pixbuf && (!GDK_IS_PIXBUF (pixbuf))), NULL);
 
-    if (!ipod_supports_photos (db->device))
+    if (!itdb_device_supports_photo (db->device))
     {
 	const Itdb_IpodInfo *ipodinfo = itdb_device_get_ipod_info (db->device);
 	const gchar *model, *generation;
@@ -411,41 +424,22 @@
 
     artwork = itdb_artwork_new ();
 
-    /* Add a thumbnail for every supported format */
-    format = itdb_device_get_artwork_formats (db->device);
-    g_return_val_if_fail (format, NULL);
-
-    for(result = TRUE; format->type != -1 && result == TRUE; format++)
+    if (filename)
     {
-	if (itdb_thumb_type_is_valid_for_db (format->type, DB_TYPE_PHOTO))
-	{
-	    if (filename)
-	    {
-		result = itdb_artwork_add_thumbnail (artwork,
-						     format->type,
-						     filename,
-						     rotation,
-						     error);
-	    }
-	    if (image_data)
-	    {
-		result = itdb_artwork_add_thumbnail_from_data (artwork,
-							       format->type,
-							       image_data,
-							       image_data_len,
-							       rotation,
-							       error);
-	    }
-	    if (pixbuf) 
-	    {
-		result = itdb_artwork_add_thumbnail_from_pixbuf (artwork,
-								 format->type, 
-								 pixbuf,
-								 rotation,
-								 error);
-	    }
-	}
+        result = itdb_artwork_set_thumbnail (artwork, filename,
+                                             rotation, error);
     }
+    if (image_data)
+    {
+        result = itdb_artwork_set_thumbnail_from_data (artwork, image_data,
+                                                       image_data_len,
+                                                       rotation, error);
+    }
+    if (pixbuf) 
+    {
+        result = itdb_artwork_set_thumbnail_from_pixbuf (artwork, pixbuf,
+                                                         rotation, error);
+    }
 
     if (result != TRUE)
     {
@@ -476,28 +470,28 @@
 #endif
 }
 
-
-
 /**
  * itdb_photodb_add_photo:
- * @db: the #Itdb_PhotoDB to add the photo to.
- * @filename: file with the photo to add.
- * @position: position where to insert the new photo (-1 to append at
- * the end)
- * @rotation: angle by which the image should be rotated
- * counterclockwise. Valid values are 0, 90, 180 and 270.
- * @error: return location for a #GError or NULL
- * 
+ * @db:         the #Itdb_PhotoDB to add the photo to
+ * @filename:   path of the photo to add.
+ * @position:   position where to insert the new photo (-1 to append
+ *              at the end)
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
+ *
  * Add a photo to the PhotoDB. The photo is automatically added to the
  * first Photoalbum, which by default contains a list of all photos in
  * the database. If no Photoalbums exist one is created automatically.
  *
  * For the rotation angle you can also use the gdk constants
- * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
- * ..._CLOCKWISE.
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
  *
- * Return value: a pointer to the added photo.
- **/
+ * Returns: a pointer to the added photo.
+ *
+ * Since: 0.4.0
+ */
 Itdb_Artwork *itdb_photodb_add_photo (Itdb_PhotoDB *db,
 				      const gchar *filename,
 				      gint position,
@@ -511,29 +505,30 @@
 					    position, rotation, error);
 }
 
-
 /**
  * itdb_photodb_add_photo_from_data:
- * @db: the #Itdb_PhotoDB to add the photo to.
- * @image_data: chunk of memory containing the image data (for example
- * a jpg file)
+ * @db:             the #Itdb_PhotoDB to add the photo to
+ * @image_data:     chunk of memory containing the image data (for
+ *                  example a jpg file)
  * @image_data_len: length of above chunk of memory
- * @position: position where to insert the new photo (-1 to append at
- * the end)
- * @rotation: angle by which the image should be rotated
- * counterclockwise. Valid values are 0, 90, 180 and 270.
- * @error: return location for a #GError or NULL
- * 
+ * @position:       position where to insert the new photo (-1 to
+ *                  append at the end)
+ * @rotation:       angle by which the image should be rotated
+ *                  counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:          return location for a #GError or NULL
+ *
  * Add a photo to the PhotoDB. The photo is automatically added to the
  * first Photoalbum, which by default contains a list of all photos in
  * the database. If no Photoalbums exist one is created automatically.
  *
  * For the rotation angle you can also use the gdk constants
- * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
- * ..._CLOCKWISE.
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
  *
- * Return value: a pointer to the added photo.
- **/
+ * Returns: a pointer to the added photo.
+ *
+ * Since: 0.4.0
+ */
 Itdb_Artwork *itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
 						const guchar *image_data,
 						gsize image_data_len,
@@ -551,24 +546,26 @@
 
 /**
  * itdb_photodb_add_photo_from_pixbuf:
- * @db: the #Itdb_PhotoDB to add the photo to.
- * @pixbuf: a #GdkPixbuf to use as the image data
- * @position: position where to insert the new photo (-1 to append at
- * the end)
- * @rotation: angle by which the image should be rotated
- * counterclockwise. Valid values are 0, 90, 180 and 270.
- * @error: return location for a #GError or NULL
- * 
+ * @db:         the #Itdb_PhotoDB to add the photo to
+ * @pixbuf:     a #GdkPixbuf to use as the image data
+ * @position:   position where to insert the new photo (-1 to append
+ *              at the end)
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
+ *
  * Add a photo to the PhotoDB. The photo is automatically added to the
  * first Photoalbum, which by default contains a list of all photos in
  * the database. If no Photoalbums exist one is created automatically.
  *
  * For the rotation angle you can also use the gdk constants
- * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
- * ..._CLOCKWISE.
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
  *
- * Return value: a pointer to the added photo.
- **/
+ * Returns: a pointer to the added photo.
+ *
+ * Since: 0.5.0
+ */
 Itdb_Artwork *itdb_photodb_add_photo_from_pixbuf (Itdb_PhotoDB *db,
 						  gpointer pixbuf,
 						  gint position,
@@ -582,22 +579,25 @@
 					    position, rotation, error);
 }
 
-
 /**
  * itdb_photodb_remove_photo:
- * @db: the #Itdb_PhotoDB to remove the photo from
- * @album: the album to remove the photo from. If album is NULL, then
- * it will first be removed from all photoalbums and then from the
- * photo database as well.
- * @photo: #Itdb_Artwork (photo) to remove.
+ * @db:     the #Itdb_PhotoDB to remove the photo from
+ * @album:  the album to remove the photo from. If album is NULL, then
+ *          it will first be removed from all photoalbums and then
+ *          from the photo database as well.
+ * @photo:  #Itdb_Artwork (photo) to remove.
  *
- * Remove photo. If @album is not the first photoalbum, the photo will
- * be removed from that album only. If @album is NULL or the first
- * photoalbum (Photo Library), the photo will be removed from all
- * albums and the #Itdb_PhotoDB.
+ * Removes a photo. If @album is not the first photoalbum, the photo
+ * will be removed from that album only. If @album is NULL or the
+ * first photoalbum (Photo Library), the photo will be removed from
+ * all albums and the #Itdb_PhotoDB.
  *
+ * <note>
  * @photo will be freed and can no longer be used if removed from the
  * first photoalbum.
+ * </note>
+ *
+ * Since: 0.4.0
  */
 void itdb_photodb_remove_photo (Itdb_PhotoDB *db,
 				Itdb_PhotoAlbum *album,
@@ -615,10 +615,7 @@
         for (it = db->photoalbums; it != NULL; it = it->next)
 	{
             Itdb_PhotoAlbum *_album = it->data;
-	    while (g_list_find (_album->members, photo))
-	    {
-		_album->members = g_list_remove (_album->members, photo);
-	    }
+            _album->members = g_list_remove_all (_album->members, photo);
         }
         /* Remove the photo from the image list */
 	db->photos = g_list_remove (db->photos, photo);
@@ -634,15 +631,17 @@
 
 /**
  * itdb_photodb_photoalbum_by_name:
- * @db: the #Itdb_PhotoDB to retrieve the album from
- * @albumname: the name of the photoalbum to get or NULL for the
- * master photoalbum.
+ * @db:         the #Itdb_PhotoDB to retrieve the album from
+ * @albumname:  the name of the photoalbum to get or NULL for the
+ *              master photoalbum.
  *
  * Find the first photoalbum with a given name or the Photo Library
  * Album if called with no name.
  *
- * Return value: a pointer to the first photoalbum named @albumname,
+ * Returns: a pointer to the first photoalbum named @albumname,
  * else NULL
+ *
+ * Since: 0.4.2
  */
 Itdb_PhotoAlbum *itdb_photodb_photoalbum_by_name (Itdb_PhotoDB *db, const gchar *albumname)
 {
@@ -663,23 +662,25 @@
 
 /**
  * itdb_photodb_photoalbum_remove:
- * @db: the #Itdb_PhotoDB to apply changes to
- * @album: the album to be removed from the database
- * @remove_pics: TRUE to remove pics in that album permanently from
- * the database.
+ * @db:             the #Itdb_PhotoDB to apply changes to
+ * @album:          the album to be removed from the database
+ * @remove_pics:    TRUE to remove pics in that album permanently
+ *                  from the database.
  *
- * Remove @album from the Photo Database. If remove_pics is TRUE,
+ * Remove @album from the Photo Database. If @remove_pics is TRUE,
  * remove all photos contained in @album from the Photo Database.
  *
+ * <note>
  * Memory used by the removed album will be freed and the album cannot
  * be accessed any more.
- **/
+ * </note>
+ *
+ * Since: 0.4.2
+ */
 void itdb_photodb_photoalbum_remove (Itdb_PhotoDB *db,
 				     Itdb_PhotoAlbum *album,
 				     gboolean remove_pics)
 {
-        GList *it;
-
         g_return_if_fail (db);
         g_return_if_fail (album);
 
@@ -687,11 +688,16 @@
 	 * and remove them from the database */
         if (remove_pics)
 	{
-            for (it = album->members; it != NULL; it = it->next )
+	    /* we can't iterate over album->members because
+	       itdb_photodb_remove_photo() modifies album->members in
+	       a not easily predicable way (e.g. @photo may exist in the
+	       album several times). Therefore we remove photos until
+	       album->members is empty. */
+	    while (album->members)
 	    {
-                Itdb_Artwork *photo = it->data;
-                itdb_photodb_remove_photo (db, NULL, photo);
-            }
+		Itdb_Artwork *photo = album->members->data;
+		itdb_photodb_remove_photo (db, NULL, photo);
+	    }
         }
         db->photoalbums = g_list_remove (db->photoalbums, album);
 	itdb_photodb_photoalbum_free (album);
@@ -699,11 +705,12 @@
 
 /**
  * itdb_photodb_photoalbum_add_photo:
- * @db: the #Itdb_PhotoDB to act on
- * @album: the #Itdb_PhotoAlbum to add the photo to
- * @photo: a pointer to the photo (#Itdb_Artwork) to add to the album
- * @position: position where to insert the new photo (-1 to append at
- * the end)
+ * @db:         the #Itdb_PhotoDB to act on
+ * @album:      the #Itdb_PhotoAlbum to add the photo to
+ * @photo:      a pointer to the photo (#Itdb_Artwork) to add to the
+ *              album
+ * @position:   position where to insert the new photo (-1 to append
+ *              at the end)
  *
  * Adds a photo already in the library to the specified album
  * @album. Photos are automatically added to the first album (Photo
@@ -711,8 +718,8 @@
  * itdb_photodb_add_photo_from_data(), so you don't have to use this
  * function to add them there.
  *
+ * Since: 0.4.2
  */
-
 void itdb_photodb_photoalbum_add_photo (Itdb_PhotoDB *db,
 					Itdb_PhotoAlbum *album,
 					Itdb_Artwork *photo,
@@ -725,17 +732,18 @@
     album->members = g_list_insert (album->members, photo, position);
 }
 
-
 /**
  * itdb_photodb_photoalbum_create:
- * @db: The database to create a new album in
- * @albumname: the name of the new album
- * @pos: position where to insert the newly created album (-1 for
- * append to end).
+ * @db:         The database to create a new album in
+ * @albumname:  the name of the new album
+ * @pos:        position where to insert the newly created album (-1
+ *              to append at the end).
  *
  * Create and add a new photoalbum.
  *
- * Return value: the album which was created and added.
+ * Returns: the album which was created and added.
+ *
+ * Since: 0.4.2
  */
 Itdb_PhotoAlbum *itdb_photodb_photoalbum_create (Itdb_PhotoDB *db,
 						 const gchar *albumname,
@@ -748,6 +756,7 @@
 
 	album = g_new0 (Itdb_PhotoAlbum, 1);
 	album->album_type = 2; /* normal album, set to 1 for Photo Library */
+	album->photodb = db;
 	album->name = g_strdup(albumname);
 	db->photoalbums = g_list_insert (db->photoalbums, album, pos);
 
@@ -756,16 +765,18 @@
 
 /**
  * itdb_photodb_write:
- * @photodb: the #Itdb_PhotoDB to write to disk
- * @error: return location for a #GError or NULL
+ * @photodb:    the #Itdb_PhotoDB to write to disk
+ * @error:      return location for a #GError or NULL
  *
  * Write out a PhotoDB.
  *
  * FIXME: error is not set yet.
  *
- * Return value: TRUE on success, FALSE on error, in which case @error is
+ * Returns: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
- **/
+ *
+ * Since: 0.4.0
+ */
 gboolean itdb_photodb_write (Itdb_PhotoDB *photodb, GError **error)
 {
     gint result;

Modified: libgpod/trunk/src/itdb_playlist.c
===================================================================
--- libgpod/trunk/src/itdb_playlist.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_playlist.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,7 @@
-/* Time-stamp: <2007-02-25 11:52:48 jcs>
-|
+/*
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -24,7 +23,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_playlist.c 1423 2007-04-30 00:46:48Z jcsjcs $
+|  $Id: itdb_playlist.c 2159 2008-12-08 01:16:58Z tmzullinger $
 */
 
 #include "itdb_private.h"
@@ -40,13 +39,13 @@
 
 /**
  * itdb_spl_action_known:
- * @action: an #SPLAction
+ * @action: an #ItdbSPLAction
  *
  * Checks if @action is a known (to libgpod) smart playlist action.
  *
- * Return value: TRUE if @action is known. Otherwise a warning is displayed 
- * and FALSE is returned. 
- **/
+ * Returns: TRUE if @action is known. Otherwise a warning is
+ * displayed and FALSE is returned.
+ */
 gboolean itdb_spl_action_known (ItdbSPLAction action)
 {
     gboolean result = FALSE;
@@ -87,9 +86,9 @@
  *
  * Gets the type of the field of the @splr rule
  *
- * Return value: an #Itdb_SPLFieldType corresponding to @splr field type 
- * (string, int, date, ...)
- **/
+ * Returns: an #Itdb_SPLFieldType corresponding to @splr field
+ * type (string, int, date, ...)
+ */
 ItdbSPLFieldType itdb_splr_get_field_type (const Itdb_SPLRule *splr)
 {
     g_return_val_if_fail (splr != NULL, ITDB_SPLFT_UNKNOWN);
@@ -136,15 +135,14 @@
     return(ITDB_SPLFT_UNKNOWN);
 }
 
-
 /**
  * itdb_splr_get_action_type:
  * @splr: an #Itdb_SPLRule
- * 
+ *
  * Gets the type of the action associated with @splr.
  *
- * Return value: type (range, date, string...) of the action field 
- **/
+ * Returns: type (range, date, string...) of the action field
+ */
 ItdbSPLActionType itdb_splr_get_action_type (const Itdb_SPLRule *splr)
 {
     ItdbSPLFieldType fieldType;
@@ -320,16 +318,15 @@
  *
  */
 
-
 /**
  * itdb_splr_eval:
- * @splr: an #Itdb_SPLRule
- * @track: an #Itdb_Track
+ * @splr:   an #Itdb_SPLRule
+ * @track:  an #Itdb_Track
  *
- * Evaluates @splr's truth against @track. track-&gt;itdb must be set.
+ * Evaluates @splr's truth against @track. @track->itdb must be set.
  *
- * Return value: TRUE if @track matches @splr, FALSE otherwise.
- **/
+ * Returns: TRUE if @track matches @splr, FALSE otherwise.
+ */
 gboolean itdb_splr_eval (Itdb_SPLRule *splr, Itdb_Track *track)
 {
     ItdbSPLFieldType ft;
@@ -341,7 +338,6 @@
     guint32 datecomp = 0;
     Itdb_Playlist *playcomp = NULL;
     time_t t;
-    guint64 mactime;
 
     g_return_val_if_fail (splr, FALSE);
     g_return_val_if_fail (track, FALSE);
@@ -424,7 +420,7 @@
 	handled = TRUE;
 	break;
     case ITDB_SPLFIELD_TIME:
-	intcomp = track->tracklen/1000;
+	intcomp = track->tracklen;
 	handled = TRUE;
 	break;
     case ITDB_SPLFIELD_COMPILATION:
@@ -568,13 +564,11 @@
 	case ITDB_SPLACTION_IS_IN_THE_LAST:
 	    time (&t);
 	    t += (splr->fromdate * splr->fromunits);
-	    mactime = itdb_time_host_to_mac (t);
-	    return (datecomp > mactime);
+	    return (datecomp > t);
 	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
 	    time (&t);
 	    t += (splr->fromdate * splr->fromunits);
-	    mactime = itdb_time_host_to_mac (t);
-	    return (datecomp <= mactime);
+	    return (datecomp <= t);
 	case ITDB_SPLACTION_IS_IN_THE_RANGE:
 	    return ((datecomp <= splr->fromvalue &&
 		     datecomp >= splr->tovalue) ||
@@ -682,13 +676,12 @@
     return list;
 }
 
-
 /**
  * itdb_playlist_randomize:
  * @pl: an #Itdb_Playlist to randomize
  *
  * Randomizes @pl
- **/
+ */
 void itdb_playlist_randomize (Itdb_Playlist *pl)
 {
     g_return_if_fail (pl);
@@ -696,16 +689,16 @@
     pl->members = randomize_glist (pl->members);
 }
 
-
 /**
  * itdb_spl_update:
  * @spl: an #Itdb_Playlist
  *
- * Updates the content of the smart playlist @spl (meant to be called if the 
- * tracks stored in the #Itdb_iTunesDB associated with @spl have changed 
- * somehow and you want spl-&gt;members to be accurate with regards to those 
- * changes. Does nothing if @spl isn't a smart playlist.
- **/
+ * Updates the content of the smart playlist @spl (meant to be called
+ * if the tracks stored in the #Itdb_iTunesDB associated with @spl
+ * have changed somehow and you want @spl->members to be accurate
+ * with regards to those changes. Does nothing if @spl isn't a smart
+ * playlist.
+ */
 void itdb_spl_update (Itdb_Playlist *spl)
 {
     GList *gl;
@@ -912,13 +905,12 @@
     }
 }
 
-
 /**
  * itdb_spl_update_all:
  * @itdb: an #Itdb_iTunesDB
  *
  * Updates all smart playlists contained in @itdb
- **/
+ */
 void itdb_spl_update_all (Itdb_iTunesDB *itdb)
 {
     g_return_if_fail (itdb);
@@ -934,14 +926,15 @@
         itdb_spl_update (playlist);
 }
 
-
-/** 
+/**
  * itdb_spl_update_live:
  * @itdb: an #Itdb_iTunesDB
  *
- * Updates all 'live' smart playlists contained in @itdb, ie those which have 
- * the 'live updating' flag set
- **/
+ * Updates all smart playlists contained in @itdb which have the
+ * @liveupdate flag set.
+ *
+ * Since: 0.2.0
+ */
 void itdb_spl_update_live (Itdb_iTunesDB *itdb)
 {
     g_return_if_fail (itdb);
@@ -953,13 +946,12 @@
 /* end of code based on Samuel Wood's work */
 /* ------------------------------------------------------------------- */
 
-
 /**
  * itdb_splr_validate:
  * @splr: an #Itdb_SPLRule
  *
- * Validates a rule 
- **/
+ * Validates a smart playlist rule
+ */
 void itdb_splr_validate (Itdb_SPLRule *splr)
 {
     ItdbSPLActionType at;
@@ -1011,13 +1003,12 @@
 
 }
 
-
 /**
  * itdb_splr_free:
  * @splr: an #Itdb_SPLRule
  *
- * Frees the memory used by @splr 
- **/
+ * Frees the memory used by @splr
+ */
 void itdb_splr_free (Itdb_SPLRule *splr)
 {
     if (splr)
@@ -1032,9 +1023,9 @@
  * @pl: an #Itdb_Playlist
  * @splr: an Itdb_SPLRule
  *
- * Removes the smart playlist rule @splr from playlist @pl. The memory used by
- * @splr is freed.
- **/
+ * Removes the smart playlist rule @splr from playlist @pl. The memory
+ * used by @splr is freed.
+ */
 void itdb_splr_remove (Itdb_Playlist *pl, Itdb_SPLRule *splr)
 {
     g_return_if_fail (pl);
@@ -1046,14 +1037,14 @@
 
 /**
  * itdb_splr_add:
- * @pl: an #Itdb_Playlist
- * @splr: an #Itdb_SPLRule
- * @pos: position of the rule
+ * @pl:     an #Itdb_Playlist
+ * @splr:   an #Itdb_SPLRule
+ * @pos:    position of the rule
  *
- * Adds the smart rule @splr to @pl at position @pos. If @pos is -1, @splr gets
- * appended to the end. After this call, @splr memory is managed by @pl, so 
- * you no longer need to call itdb_splr_free()
- **/
+ * Adds the smart rule @splr to @pl at position @pos. If @pos is -1,
+ * @splr gets appended to the end. After this call, @splr memory is
+ * managed by @pl, so you no longer need to call itdb_splr_free()
+ */
 void itdb_splr_add (Itdb_Playlist *pl, Itdb_SPLRule *splr, gint pos)
 {
     g_return_if_fail (pl);
@@ -1063,15 +1054,14 @@
 					splr, pos);
 }
 
-
 /**
  * itdb_splr_new:
- * 
- * Creates a new default smart rule 
  *
- * Return value: a new #Itdb_SPLRule that must be freed with itdb_splr_free() when 
+ * Creates a new default smart rule
+ *
+ * Returns: a new #Itdb_SPLRule that must be freed with itdb_splr_free() when
  * no longer needed
- **/
+ */
 Itdb_SPLRule *itdb_splr_new (void)
 {
     Itdb_SPLRule *splr = g_new0 (Itdb_SPLRule, 1);
@@ -1088,18 +1078,18 @@
     return splr;
 }
 
-
 /**
  * itdb_splr_add_new:
- * @pl: an #Itdb_Playlist
- * @pos: position to insert the rule at
+ * @pl:     an #Itdb_Playlist
+ * @pos:    position to insert the rule at
  *
- * Creates a new smart rule and inserts it at position @pos in @pl. If @pos is
- * -1, the new rule gets appended to the end.
+ * Creates a new smart rule and inserts it at position @pos in @pl. If
+ * @pos is -1, the new rule gets appended to the end.
  *
- * Return value: pointer to the newly created #Itdb_SPLRule. Its memory is handled 
- * by @pl though, so you don't need to explicitly call itdb_splr_free() on it
- **/
+ * Returns: pointer to the newly created #Itdb_SPLRule. Its
+ * memory is handled by @pl though, so you don't need to explicitly
+ * call itdb_splr_free() on it
+ */
 Itdb_SPLRule *itdb_splr_add_new (Itdb_Playlist *pl, gint pos)
 {
     Itdb_SPLRule *splr;
@@ -1126,18 +1116,18 @@
     return dup;
 }
 
-
 /**
  * itdb_playlist_duplicate:
  * @pl: an #Itdb_Playlist
  *
- * Duplicates an existing playlist. pl_dup-&gt;id is set to zero, so that
- * it will be set to a unique value when adding it to an #Itdb_iTunesDB. The
- * returned playlist won't be associated with an #Itdb_iTunesDB.
+ * Duplicates an existing playlist. @pl_dup->id is set to zero, so
+ * that it will be set to a unique value when adding it to an
+ * #Itdb_iTunesDB. The returned playlist won't be associated with an
+ * #Itdb_iTunesDB.
  *
- * Return value: a newly allocated #Itdb_Playlist that you'll have to free
- * with itdb_playlist_free() when you no longer need it. 
- **/
+ * Returns: a newly allocated #Itdb_Playlist that you'll have to
+ * free with itdb_playlist_free() when you no longer need it.
+ */
 Itdb_Playlist *itdb_playlist_duplicate (Itdb_Playlist *pl)
 {
     Itdb_Playlist *pl_dup;
@@ -1179,16 +1169,15 @@
     return pl_dup;
 }
 
-
 /**
  * itdb_spl_copy_rules:
- * @dest: destination #Itdb_Playlist
- * @src: source #Itdb_Playlist
+ * @dest:   destination #Itdb_Playlist
+ * @src:    source #Itdb_Playlist
  *
  * Copy all relevant information for smart playlist from playlist @src
- * to playlist @dest. If @dest is already a smart playlist, the existing data
- * is overwritten/deleted. 
- **/
+ * to playlist @dest. If @dest is already a smart playlist, the
+ * existing data is overwritten/deleted.
+ */
 void itdb_spl_copy_rules (Itdb_Playlist *dest, Itdb_Playlist *src)
 {
     GList *gl;
@@ -1216,20 +1205,18 @@
     }
 }
 
-
-
 /**
  * itdb_playlist_new:
- * @title: playlist title
- * @spl: smart playlist flag
+ * @title:  playlist title
+ * @spl:    smart playlist flag
  *
- * Creates a new playlist. If @spl is TRUE, a smart
- * playlist is generated. pl->id is set by itdb_playlist_add() when the 
- * playlist is added to an #Itdb_iTunesDB
- * 
- * Return value: a new #Itdb_Playlist which must be freed with 
+ * Creates a new playlist. If @spl is TRUE, a smart playlist is
+ * generated. pl->id is set by itdb_playlist_add() when the playlist
+ * is added to an #Itdb_iTunesDB
+ *
+ * Returns: a new #Itdb_Playlist which must be freed with
  * itdb_playlist_free() after use
- **/
+ */
 Itdb_Playlist *itdb_playlist_new (const gchar *title, gboolean spl)
 {
     Itdb_Playlist *pl = g_new0 (Itdb_Playlist, 1);
@@ -1238,7 +1225,7 @@
     pl->name = g_strdup (title);
     pl->sortorder = ITDB_PSO_MANUAL;
 
-    pl->timestamp = itdb_time_get_mac_time ();
+    pl->timestamp = time (NULL);
 
     pl->is_spl = spl;
     if (spl)
@@ -1257,13 +1244,12 @@
     return pl;
 }
 
-
 /**
  * itdb_playlist_free:
  * @pl: an #Itdb_Playlist
  *
- * Frees the memory used by playlist @pl. 
- **/
+ * Frees the memory used by playlist @pl.
+ */
 void itdb_playlist_free (Itdb_Playlist *pl)
 {
     g_return_if_fail (pl);
@@ -1277,19 +1263,18 @@
     g_free (pl);
 }
 
-
-
 /**
  * itdb_playlist_add:
- * @itdb: an #Itdb_iTunesDB
- * @pl: an #Itdb_Playlist
- * @pos: position to insert @pl at
+ * @itdb:   an #Itdb_iTunesDB
+ * @pl:     an #Itdb_Playlist
+ * @pos:    position to insert @pl at
  *
  * Adds playlist @pl to the database @itdb at position @pos (-1 for
- * "append to end"). A unique id is created if pl-&gt;id is equal to
- * zero. After calling this function, @itdb manages the memory of @pl, which
- * means you no longer need to explicitly call itdb_playlist_free()
- **/
+ * "append to end"). A unique id is created if @pl->id is equal to
+ * zero. After calling this function, @itdb manages the memory of @pl,
+ * which means you no longer need to explicitly call
+ * itdb_playlist_free()
+ */
 void itdb_playlist_add (Itdb_iTunesDB *itdb, Itdb_Playlist *pl, gint32 pos)
 {
     g_return_if_fail (itdb);
@@ -1320,21 +1305,19 @@
 	pl->id = id;
     }
     if (pl->sortorder == 0)  pl->sortorder = ITDB_PSO_MANUAL;
-    if (pl->timestamp == 0)  pl->timestamp = itdb_time_get_mac_time ();
+    if (pl->timestamp == 0)  pl->timestamp = time (NULL);
 
     /* pos == -1 appends at the end of the list */
     itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
 }
 
-
-
 /**
  * itdb_playlist_move:
- * @pl: an #Itdb_Playlist
- * @pos: new position
+ * @pl:     an #Itdb_Playlist
+ * @pos:    new position
  *
- * Moves playlist @pl to position @pos 
- **/
+ * Moves playlist @pl to position @pos
+ */
 void itdb_playlist_move (Itdb_Playlist *pl, guint32 pos)
 {
     Itdb_iTunesDB *itdb;
@@ -1347,14 +1330,13 @@
     itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
 }
 
-
 /**
  * itdb_playlist_remove:
  * @pl: an #Itdb_Playlist
- * 
- * Removes @pl from the #Itdb_iTunesDB it's associated with 
- * and frees memory 
- **/
+ *
+ * Removes @pl from the #Itdb_iTunesDB it's associated with
+ * and frees memory
+ */
 void itdb_playlist_remove (Itdb_Playlist *pl)
 {
     Itdb_iTunesDB *itdb;
@@ -1367,14 +1349,13 @@
     itdb_playlist_free (pl);
 }
 
-
 /**
  * itdb_playlist_unlink:
  * @pl: an #Itdb_Playlist
  *
- * Remove @pl from the #Itdb_iTunesDB it's associated with but do not free 
- * memory. pl-&gt;itdb is set to NULL after this function returns
- **/
+ * Remove @pl from the #Itdb_iTunesDB it's associated with but do not
+ * free memory. @pl->itdb is set to NULL after this function returns
+ */
 void itdb_playlist_unlink (Itdb_Playlist *pl)
 {
     Itdb_iTunesDB *itdb;
@@ -1387,16 +1368,15 @@
     pl->itdb = NULL;
 }
 
-
 /**
  * itdb_playlist_exists:
- * @itdb: an #Itdb_iTunesDB
- * @pl: an #Itdb_Playlist
+ * @itdb:   an #Itdb_iTunesDB
+ * @pl:     an #Itdb_Playlist
  *
- * Checks if @pl is present in @db
+ * Checks if @pl is present in @itdb
  *
- * Return value: TRUE if @pl exists in @db, FALSE otherwise 
- **/
+ * Returns: TRUE if @pl exists in @itdb, FALSE otherwise
+ */
 gboolean itdb_playlist_exists (Itdb_iTunesDB *itdb, Itdb_Playlist *pl)
 {
     g_return_val_if_fail (itdb, FALSE);
@@ -1406,16 +1386,14 @@
     else                                    return FALSE;
 }
 
-
 /**
  * itdb_playlist_add_track:
- * @pl: an #Itdb_Playlist
- * @track: an #Itdb_Track
- * @pos: position to insert @track at
+ * @pl:     an #Itdb_Playlist
+ * @track:  an #Itdb_Track
+ * @pos:    position to insert @track at
  *
- * Adds @track to @pl at position @pos (-1 for "append to
- * end") 
- **/
+ * Adds @track to @pl at position @pos (-1 to append at the end)
+ */
 void itdb_playlist_add_track (Itdb_Playlist *pl,
 			      Itdb_Track *track, gint32 pos)
 {
@@ -1428,18 +1406,16 @@
     pl->members = g_list_insert (pl->members, track, pos);
 }
 
-
-
 /**
  * itdb_playlist_remove_track:
- * @pl: an #Itdb_Playlist
- * @track: an #Itdb_Track
+ * @pl:     an #Itdb_Playlist
+ * @track:  an #Itdb_Track
  *
  * Removes @track from @pl. If @pl is NULL, removes @track from the
- * master playlist. If @track can't be found in @pl, nothing happens. If after
- * removing @track, @pl is empty, it's not removed from the database
- * The memory used by @track isn't freed.
- **/
+ * master playlist. If @track can't be found in @pl, nothing happens.
+ * If after removing @track, @pl is empty, it's not removed from the
+ * database The memory used by @track isn't freed.
+ */
 void itdb_playlist_remove_track (Itdb_Playlist *pl, Itdb_Track *track)
 {
     g_return_if_fail (track);
@@ -1452,17 +1428,16 @@
     pl->members = g_list_remove (pl->members, track);
 }
 
-
 /**
  * itdb_playlist_by_id:
- * @itdb: an #Itdb_iTunesDB
- * @id: ID of the playlist to look for
+ * @itdb:   an #Itdb_iTunesDB
+ * @id:     ID of the playlist to look for
  *
- * Looks up a playlist whose ID is @id 
+ * Looks up a playlist whose ID is @id
  *
- * Return value: the #Itdb_Playlist with ID @id or NULL if there is no such
- * playlist.
- **/
+ * Returns: the #Itdb_Playlist with ID @id or NULL if there is no
+ * such playlist.
+ */
 Itdb_Playlist *itdb_playlist_by_id (Itdb_iTunesDB *itdb, guint64 id)
 {
     GList *gl;
@@ -1477,16 +1452,16 @@
     return NULL;
 }
 
-
 /**
  * itdb_playlist_by_nr:
- * @itdb: an #Itdb_iTunesDB
- * @num: the position of the playlist, counting from 0
+ * @itdb:   an #Itdb_iTunesDB
+ * @num:    the position of the playlist, counting from 0
  *
  * Gets the playlist at the given position in @itdb
  *
- * Return value: the #Itdb_Playlist, or NULL if there is no playlist at @pos
- **/
+ * Returns: the #Itdb_Playlist, or NULL if there is no playlist
+ * at @pos
+ */
 Itdb_Playlist *itdb_playlist_by_nr (Itdb_iTunesDB *itdb, guint32 num)
 {
     Itdb_Playlist *pl;
@@ -1496,17 +1471,16 @@
     return pl;
 }
 
-
 /**
  * itdb_playlist_by_name:
- * @itdb: an #Itdb_iTunesDB
- * @name: name of the playlist to look for
+ * @itdb:   an #Itdb_iTunesDB
+ * @name:   name of the playlist to look for
  *
  * Searches a playlist whose name is @name in @itdb
  *
- * Return value: the first #Itdb_Playlist with name @name, NULL if there is no
- * such playlist
- **/
+ * Returns: the first #Itdb_Playlist with name @name, NULL if
+ * there is no such playlist
+ */
 Itdb_Playlist *itdb_playlist_by_name (Itdb_iTunesDB *itdb, gchar *name)
 {
     GList *gl;
@@ -1523,15 +1497,16 @@
     return NULL;
 }
 
-
 /**
  * itdb_playlist_is_mpl:
  * @pl: an #Itdb_Playlist
  *
- * Checks if @pl is the master playlist 
+ * Checks if @pl is the master playlist
  *
- * Return value: TRUE if @pl is the master playlist, FALSE otherwise 
- **/
+ * Returns: TRUE if @pl is the master playlist, FALSE otherwise
+ *
+ * Since: 0.1.6
+ */
 gboolean itdb_playlist_is_mpl (Itdb_Playlist *pl)
 {
     g_return_val_if_fail (pl, FALSE);
@@ -1539,15 +1514,16 @@
     return ((pl->type & 0xff) == ITDB_PL_TYPE_MPL);
 }
 
-
 /**
  * itdb_playlist_is_podcasts:
  * @pl: an #Itdb_Playlist
  *
  * Checks if @pl is the podcasts playlist
  *
- * Return value: TRUE if @pl is the podcasts playlist, FALSE otherwise 
- **/
+ * Returns: TRUE if @pl is the podcasts playlist, FALSE otherwise
+ *
+ * Since: 0.1.6
+ */
 gboolean itdb_playlist_is_podcasts (Itdb_Playlist *pl)
 {
     g_return_val_if_fail (pl, FALSE);
@@ -1555,13 +1531,14 @@
     return (pl->podcastflag == ITDB_PL_FLAG_PODCASTS);
 }
 
-
 /**
  * itdb_playlist_set_mpl:
  * @pl: an #Itdb_Playlist
  *
  * Sets @pl to be a master playlist
- **/
+ *
+ * Since: 0.2.0
+ */
 void itdb_playlist_set_mpl (Itdb_Playlist *pl)
 {
     g_return_if_fail (pl);
@@ -1569,13 +1546,14 @@
     pl->type = ITDB_PL_TYPE_MPL;
 }
 
-
 /**
  * itdb_playlist_set_podcasts:
  * @pl: an #Itdb_Playlist
  *
- * Set @pl to be a podcasts playlist 
- **/
+ * Set @pl to be a podcasts playlist
+ *
+ * Since: 0.2.0
+ */
 void itdb_playlist_set_podcasts (Itdb_Playlist *pl)
 {
     g_return_if_fail (pl);
@@ -1583,15 +1561,14 @@
     pl->podcastflag = ITDB_PL_FLAG_PODCASTS;
 }
 
-
 /**
  * itdb_playlist_mpl:
  * @itdb: an #Itdb_iTunesDB
- * 
+ *
  * Gets the master playlist of @itdb
  *
- * Return value: the master playlist of @itdb 
- **/
+ * Returns: the master playlist of @itdb
+ */
 Itdb_Playlist *itdb_playlist_mpl (Itdb_iTunesDB *itdb)
 {
     Itdb_Playlist *pl;
@@ -1607,15 +1584,17 @@
     return pl;
 }
 
-
 /**
  * itdb_playlist_podcasts:
  * @itdb: an #Itdb_iTunesDB
  *
  * Gets the podcasts playlist of @itdb
  *
- * Return value: the podcasts playlist of @itdb, or NULL if it's there is none
- **/
+ * Returns: the podcasts playlist of @itdb, or NULL if there is
+ * not one
+ *
+ * Since: 0.1.6
+ */
 Itdb_Playlist *itdb_playlist_podcasts (Itdb_iTunesDB *itdb)
 {
     GList *gl;
@@ -1633,17 +1612,15 @@
     return NULL;
 }
 
-
-
 /**
  * itdb_playlist_contains_track:
- * @pl: an #Itdb_Playlist
- * @track: an #Itdb_Track
+ * @pl:     an #Itdb_Playlist
+ * @track:  an #Itdb_Track
  *
- * Checks if @track is in @pl.
- * 
- * Return value: TRUE if @track is in @pl, FALSE otherwise
- **/
+ * Checks if @track is in @pl
+ *
+ * Returns: TRUE if @track is in @pl, FALSE otherwise
+ */
 gboolean itdb_playlist_contains_track (Itdb_Playlist *pl, Itdb_Track *tr)
 {
     g_return_val_if_fail (tr, FALSE);
@@ -1657,16 +1634,15 @@
     else                                return FALSE;
 }
 
-
 /**
  * itdb_playlist_contain_track_number:
  * @tr: an #Itdb_Track
  *
- * Counts the number of playlist @track is a member of (not including the 
- * master playlist)
+ * Counts the number of playlist @track is a member of (not including
+ * the master playlist)
  *
- * Return value: number of playlist containing @track
- **/
+ * Returns: the number of playlist containing @track
+ */
 guint32 itdb_playlist_contain_track_number (Itdb_Track *tr)
 {
     Itdb_iTunesDB *itdb;
@@ -1688,16 +1664,14 @@
     return num;
 }
 
-
-
 /**
  * itdb_playlist_tracks_number:
  * @pl: an #Itdb_Playlist
  *
  * Counts the number of tracks in @pl
  *
- * Return value: track count
- **/
+ * Returns: the number of tracks in @pl
+ */
 guint32 itdb_playlist_tracks_number (Itdb_Playlist *pl)
 {
     g_return_val_if_fail (pl, 0);

Copied: libgpod/trunk/src/itdb_plist.c (from rev 340, libgpod/branches/upstream/current/src/itdb_plist.c)
===================================================================
--- libgpod/trunk/src/itdb_plist.c	                        (rev 0)
+++ libgpod/trunk/src/itdb_plist.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,472 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+/* This file implements a generic plist parser. A plist file is an
+ * Apple-specific XML format which is used to serialize (simple) data
+ * structures to disk, see http://en.wikipedia.org/wiki/Property_list
+ *
+ * This parser should handle most plist files, with those limitations :
+ *      - no support for <date> tags
+ *
+ * The plist file is parsed using libxml, and the parsed result is stored
+ * in GValue. The types are mapped in the following way:
+ *      - <string> => G_TYPE_STRING (char*)
+ *      - <real> => G_TYPE_DOUBLE (double)
+ *      - <integer> => G_TYPE_INT (gint)
+ *      - <true/>, <false/> => G_TYPE_BOOLEAN (gboolean)
+ *      - <data> => G_TYPE_GSTRING (GString *)
+ *      - <array> => G_TYPE_VALUE_ARRAY (GValueArray *)
+ *      - <dict> => G_TYPE_HASH_TABLE (GHashTable *)
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_LIBXML
+
+#include <stdio.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include "itdb_plist.h"
+
+#ifdef DEBUG_SYSINFO_PARSING
+#define DEBUG g_print
+#else
+#define DEBUG(...)
+#endif
+
+/* Error domain */
+#define ITDB_DEVICE_ERROR itdb_device_error_quark ()
+extern GQuark itdb_device_error_quark (void);
+
+static GValue *parse_node (xmlNode *a_node, GError **error);
+
+static void
+value_free (GValue *val)
+{
+    g_value_unset (val);
+    g_free (val);
+}
+
+static GValue *
+parse_integer(xmlNode *a_node, GError **error)
+{
+    char *str_val;
+    char *end_ptr;
+    gint int_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+    int_val = strtol (str_val, &end_ptr, 0);
+    if (*end_ptr != '\0') {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "invalid integer value: %s", str_val);
+        xmlFree (str_val);
+        return NULL;
+    }
+    xmlFree (str_val);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_INT);
+    g_value_set_int (value, int_val);
+
+    return value;
+}
+
+static GValue *
+parse_string(xmlNode *a_node, G_GNUC_UNUSED GError **error)
+{
+    char *str_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_STRING);
+    g_value_set_string (value, str_val);
+
+    xmlFree (str_val);
+
+    return value;
+}
+
+static GValue *
+parse_real(xmlNode *a_node, GError **error)
+{
+    char *str_val;
+    char *end_ptr;
+    gfloat double_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+    double_val = g_ascii_strtod (str_val, &end_ptr);
+    if (*end_ptr != '\0') {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "invalid real value: %s", str_val);
+        xmlFree (str_val);
+        return NULL;
+    }
+    xmlFree (str_val);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_DOUBLE);
+    g_value_set_double (value, double_val);
+
+    return value;
+}
+
+static GValue *
+parse_boolean (xmlNode *a_node, GError **error)
+{
+    gboolean bool_val;
+    GValue *value;
+
+    if (strcmp ((char *)a_node->name, "true") == 0) {
+        bool_val = TRUE;
+    } else if (strcmp ((char *)a_node->name, "false") == 0) {
+        bool_val = FALSE;
+    } else {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "unexpected boolean value: %s", a_node->name);
+        return NULL;
+    }
+
+    value = g_new0 (GValue, 1);
+    g_value_init (value, G_TYPE_BOOLEAN);
+    g_value_set_boolean (value, bool_val);
+
+    return value;
+}
+
+static GValue *
+parse_data (xmlNode *a_node, G_GNUC_UNUSED GError **error)
+{
+    char *str_val;
+    guchar *raw_data;
+    gsize len;
+    GString *data_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+#if GLIB_CHECK_VERSION(2,12,0)
+    /* base64 support only after GLib 2.12 */
+    raw_data = g_base64_decode (str_val, &len);
+#else
+#warning GLib > 2.12 required for g_base64_decode(). Working around this problem.
+    raw_data = g_strdup ("");
+    len = 0;
+#endif
+    xmlFree (str_val);
+    data_val = g_string_new_len ((char *)raw_data, len);
+    g_free (raw_data);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_GSTRING);
+    g_value_take_boxed (value, data_val);
+
+    return value;
+}
+
+static xmlNode *
+parse_one_dict_entry (xmlNode *a_node, GHashTable *dict, GError **error)
+{
+    xmlNode *cur_node = a_node;
+    xmlChar *key_name;
+    GValue *value;
+
+    while ((cur_node != NULL) && (xmlStrcmp(cur_node->name, (xmlChar *)"key") != 0)) {
+        if (!xmlIsBlankNode (cur_node)) {
+            DEBUG ("skipping %s\n", cur_node->name);
+        }
+        cur_node = cur_node->next;
+    }
+    if (cur_node == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Dict entry contains no <key> node");
+        return NULL;
+    }
+    key_name = xmlNodeGetContent (cur_node);
+    cur_node = cur_node->next;
+    while ((cur_node != NULL) && xmlIsBlankNode (cur_node)) {
+        cur_node = cur_node->next;
+    }
+    if (cur_node == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "<key> %s with no corresponding value node", key_name);
+        xmlFree (key_name);
+        return NULL;
+    }
+
+    value = parse_node (cur_node, error);
+    if (value != NULL) {
+        g_hash_table_insert (dict, g_strdup ((char *)key_name), value);
+    } else {
+        g_warning ("Couldn't parse value for %s: %s",
+                   key_name, (*error)->message);
+        g_clear_error (error);
+    }
+    xmlFree (key_name);
+
+    return cur_node->next;
+}
+
+static GValue *
+parse_dict (xmlNode *a_node, GError **error)
+{
+    xmlNode *cur_node = a_node->children;
+    GValue *value;
+    GHashTable *dict;
+
+    dict = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                  g_free, (GDestroyNotify)value_free);
+
+    while (cur_node != NULL) {
+	if (xmlIsBlankNode (cur_node)) {
+	    cur_node = cur_node->next;
+	} else {
+	    cur_node = parse_one_dict_entry (cur_node, dict, error);
+	}
+    }
+    if ((error != NULL) && (*error != NULL)) {
+        g_hash_table_destroy (dict);
+        return NULL;
+    }
+    value = g_new0 (GValue, 1);
+    value = g_value_init (value, G_TYPE_HASH_TABLE);
+    g_value_take_boxed (value, dict);
+
+    return value;
+}
+	
+typedef GValue *(*ParseCallback) (xmlNode *, GError **);
+static ParseCallback get_parser_for_type (const xmlChar *type);
+
+static GValue *
+parse_array (xmlNode *a_node, GError **error)
+{
+    xmlNode *cur_node = a_node->children;
+    GValue *value;
+    GValueArray *array;
+
+    array = g_value_array_new (4);
+
+    while (cur_node != NULL) {
+	if (get_parser_for_type (cur_node->name) != NULL) {
+   	    GValue *cur_value;
+	    cur_value = parse_node (cur_node, error);
+	    if (cur_value != NULL) {
+	        array = g_value_array_append (array, cur_value);
+		g_value_unset (cur_value);
+		g_free (cur_value);
+	    }
+	}
+	/* When an array contains an element enclosed in "unknown" tags (ie
+	 * non-type ones), we silently skip them since early
+	 * SysInfoExtended files used to have <key> values enclosed within
+	 * <array> tags.
+	 */
+	cur_node = cur_node->next;
+    }
+
+    if ((error != NULL) && (*error != NULL)) {
+	g_value_array_free (array);
+        return NULL;
+    }
+    value = g_new0 (GValue, 1);
+    value = g_value_init (value, G_TYPE_VALUE_ARRAY);
+    g_value_take_boxed (value, array);
+
+    return value;
+}
+
+struct Parser {
+    const char * const type_name;
+    ParseCallback parser;
+};
+
+static const struct Parser parsers[] = { {"integer", parse_integer},
+					 {"real",    parse_real},
+					 {"string",  parse_string},
+					 {"true",    parse_boolean},
+					 {"false",   parse_boolean},
+					 {"data",    parse_data},
+					 {"dict",    parse_dict},
+					 {"array",   parse_array},
+					 {NULL,      NULL} };
+
+static ParseCallback get_parser_for_type (const xmlChar *type)
+{
+    guint i = 0;
+
+    while (parsers[i].type_name != NULL) {
+        if (xmlStrcmp (type, (xmlChar *)parsers[i].type_name) == 0) {
+            if (parsers[i].parser != NULL) {
+                return parsers[i].parser;
+            }
+        }
+        i++;
+    }
+    return NULL;
+}
+
+static GValue *parse_node (xmlNode *a_node, GError **error)
+{
+    ParseCallback parser;
+
+    g_return_val_if_fail (a_node != NULL, NULL);
+    parser = get_parser_for_type (a_node->name);
+    if (parser != NULL) {
+	return parser (a_node, error);
+    } else {
+	DEBUG ("no parser for <%s>\n", a_node->name);
+	return NULL;
+    }
+}
+
+static GValue *
+itdb_plist_parse (xmlNode * a_node, GError **error)
+{
+    xmlNode *cur_node;
+    if (a_node == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Empty XML document");
+        return NULL;
+    }
+    if (xmlStrcmp (a_node->name, (xmlChar *)"plist") != 0) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "XML document does not seem to be a plist document");
+        return NULL;
+    }
+    cur_node = a_node->xmlChildrenNode;
+    while ((cur_node != NULL) && (xmlIsBlankNode (cur_node))) {
+        cur_node = cur_node->next;
+    }
+    if (cur_node != NULL) {
+        return parse_node (cur_node, error);
+    }
+    g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                 "Empty XML document");
+    return NULL;
+}
+
+/**
+ * itdb_plist_parse:
+ * @filename:   name of the XML plist file to parse
+ * @error:      return location for a #GError
+ *
+ * Parses the XML plist file stored in @filename. If an error occurs
+ * during the parsing, itdb_plist_parse will return NULL and @error
+ * will be set
+ *
+ * Returns: NULL on error (@error will be set), a newly allocated
+ * #GValue containing a #GHashTable otherwise.
+ */
+GValue *
+itdb_plist_parse_from_file (const char *filename, GError **error)
+{
+    xmlDoc *doc = NULL;
+    xmlNode *root_element = NULL;
+    GValue *parsed_doc;
+
+    doc = xmlReadFile(filename, NULL, 0);
+
+    if (doc == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Error during XML parsing of file %s", filename);
+        return NULL;
+    }
+
+    root_element = xmlDocGetRootElement(doc);
+
+    parsed_doc = itdb_plist_parse (root_element, error);
+
+    xmlFreeDoc(doc);
+    xmlCleanupParser();
+
+    return parsed_doc;
+}
+
+/**
+ * itdb_plist_parse_from_memory:
+ * @data:   memory location containing XML plist data to parse
+ * @len:    length in bytes of the string to parse
+ * @error:  return location for a #GError
+ *
+ * Parses the XML plist file stored in @data which length is @len
+ * bytes. If an error occurs during the parsing,
+ * itdb_plist_parse_from_memory() will return NULL and @error will be
+ * set.
+ *
+ * Returns: NULL on error (@error will be set), a newly allocated
+ * #GValue containing a #GHashTable otherwise.
+ */
+GValue *
+itdb_plist_parse_from_memory (const char *data, gsize len, GError **error)
+{
+    xmlDoc *doc = NULL;
+    xmlNode *root_element = NULL;
+    GValue *parsed_doc;
+
+    doc = xmlReadMemory(data, len, "noname.xml", NULL, 0);
+
+    if (doc == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Error during XML parsing of in-memory data");
+        return NULL;
+    }
+
+    root_element = xmlDocGetRootElement(doc);
+
+    parsed_doc = itdb_plist_parse (root_element, error);
+
+    xmlFreeDoc(doc);
+    xmlCleanupParser();
+
+    return parsed_doc;
+}
+#else
+#include <glib-object.h>
+#include "itdb_plist.h"
+
+GValue *itdb_plist_parse_from_file (G_GNUC_UNUSED const char *filename,
+                                    G_GNUC_UNUSED GError **error)
+{
+    return NULL;
+}
+
+GValue *itdb_plist_parse_from_memory (G_GNUC_UNUSED const char *data,
+                                      G_GNUC_UNUSED gsize len,
+                                      G_GNUC_UNUSED GError **error)
+{
+    return NULL;
+}
+#endif

Copied: libgpod/trunk/src/itdb_plist.h (from rev 340, libgpod/branches/upstream/current/src/itdb_plist.h)
===================================================================
--- libgpod/trunk/src/itdb_plist.h	                        (rev 0)
+++ libgpod/trunk/src/itdb_plist.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,48 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+#ifndef __ITDB_PLIST_H__
+#define __ITDB_PLIST_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+	ITDB_DEVICE_ERROR_XML_PARSING
+} ItdbDeviceError;
+
+G_GNUC_INTERNAL GValue *itdb_plist_parse_from_file (const char *filename,
+						    GError **error);
+G_GNUC_INTERNAL GValue *itdb_plist_parse_from_memory (const char *data, 
+                                                      gsize len,
+						      GError **error); 
+
+G_END_DECLS
+
+#endif

Modified: libgpod/trunk/src/itdb_private.h
===================================================================
--- libgpod/trunk/src/itdb_private.h	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_private.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -23,7 +23,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_private.h 1749 2007-10-30 08:21:16Z teuf $
+|  $Id: itdb_private.h 1971 2008-05-11 07:17:29Z jcsjcs $
 */
 
 #ifndef __ITDB_PRIVATE_H__
@@ -146,7 +146,7 @@
 G_GNUC_INTERNAL const gchar *itdb_photodb_get_mountpoint (Itdb_PhotoDB *photodb);
 G_GNUC_INTERNAL gchar *db_get_mountpoint (Itdb_DB *db);
 G_GNUC_INTERNAL Itdb_Device *db_get_device(Itdb_DB *db);
-G_GNUC_INTERNAL gint itdb_get_free_photo_id ( Itdb_PhotoDB *db );
+G_GNUC_INTERNAL gint itdb_get_max_photo_id ( Itdb_PhotoDB *db );
 G_GNUC_INTERNAL Itdb_iTunesDB *db_get_itunesdb (Itdb_DB *db);
 G_GNUC_INTERNAL Itdb_PhotoDB *db_get_photodb (Itdb_DB *db);
 G_GNUC_INTERNAL gint itdb_thumb_get_byteorder (ItdbThumbFormat format);
@@ -156,4 +156,7 @@
 						 time_t timet);
 G_GNUC_INTERNAL gint itdb_musicdirs_number_by_mountpoint (const gchar *mountpoint);
 G_GNUC_INTERNAL gboolean itdb_device_requires_checksum (Itdb_Device *device);
+G_GNUC_INTERNAL gboolean itdb_file_set_contents (const char *filename, 
+                                                 const char *data, gssize len, 
+                                                 GError **error);
 #endif

Deleted: libgpod/trunk/src/itdb_sysinfo.c
===================================================================
--- libgpod/trunk/src/itdb_sysinfo.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_sysinfo.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,269 +0,0 @@
-/*
-|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
-|  Part of the gtkpod project.
-|
-|  URL: http://www.gtkpod.org/
-|  URL: http://gtkpod.sourceforge.net/
-|
-|  Part of this code is based on ipod-device.c from the libipoddevice
-|  project (http://64.14.94.162/index.php/Libipoddevice).
-|
-|  The code contained in this file 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 file 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 code; if not, write to the Free Software
-|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-|  USA
-|
-|  iTunes and iPod are trademarks of Apple
-|
-|  This product is not supported/written/published by Apple!
-|
-|  $Id$
-*/
-
-#include <string.h>
-
-#include <glib.h>
-
-#include "itdb_device.h"
-
-enum ParsingState {
-    LOOKING_FOR_KEY_TAG,
-    PARSING_KEY_TAG,
-    LOOKING_FOR_FW_DATA,
-    PARSING_FW_DATA,
-    DONE
-};
-
-struct _SysInfoParseContext {
-    enum ParsingState state;
-    char *text;
-    Itdb_Device *device;
-};
-typedef struct _SysInfoParseContext SysInfoParseContext;
-
-
-static void parse_start_element (GMarkupParseContext *context,
-                                 const gchar *element_name,
-                                 const gchar **attribute_names,
-                                 const gchar **attribute_values,
-                                 gpointer user_data,
-                                 GError **error)
-{
-    SysInfoParseContext *sysinfo = (SysInfoParseContext *)user_data;
-
-#ifdef DEBUG
-    g_print ("start: %s\n", element_name);
-#endif
-    switch (sysinfo->state) {
-    case DONE:
-        break;
-    case LOOKING_FOR_FW_DATA:
-        if (strcmp (element_name, "string") == 0) {
-            sysinfo->state = PARSING_FW_DATA;
-            break;
-        }
-        /* Fallback to default case if we didn't find the tag we expected */
-    case LOOKING_FOR_KEY_TAG:
-    default:
-        if (strcmp (element_name, "key") == 0) {
-            sysinfo->state = PARSING_KEY_TAG;
-        } else {
-            sysinfo->state = LOOKING_FOR_KEY_TAG;
-        }
-        break;
-    }
-}
-
-static void parse_end_element (GMarkupParseContext *context,
-			       const gchar *element_name,
-			       gpointer user_data,
-			       GError **error)
-{
-    SysInfoParseContext *sysinfo = (SysInfoParseContext *)user_data;
-
-#ifdef DEBUG
-    g_print ("end: %s\n", element_name);
-#endif
-
-    switch (sysinfo->state) {
-    case PARSING_KEY_TAG:
-        if (sysinfo->text == NULL) {
-            sysinfo->state = LOOKING_FOR_KEY_TAG;
-            break;
-        }
-        if (strcmp (sysinfo->text, "FireWireGUID") == 0) {
-            sysinfo->state = LOOKING_FOR_FW_DATA;
-        } else {
-            sysinfo->state = LOOKING_FOR_KEY_TAG;
-        }
-        g_free (sysinfo->text);
-        sysinfo->text = NULL;
-        break;
-    case PARSING_FW_DATA:
-        if (sysinfo->text == NULL) {
-            sysinfo->state = LOOKING_FOR_KEY_TAG;
-        }
-	/* Use FirewireGuid instead of FireWireGUID to be coherent with what
-	 * the SysInfo file used to contain
-	 */
-	g_hash_table_insert (sysinfo->device->sysinfo,
-			     g_strdup ("FirewireGuid"),
-			     sysinfo->text);
-	sysinfo->text = NULL;
-        sysinfo->state = DONE;
-        break;
-    case LOOKING_FOR_KEY_TAG:
-    case LOOKING_FOR_FW_DATA:
-    case DONE:
-        break;
-
-    }
-}
-
-static void parse_text  (GMarkupParseContext *context,
-			 const gchar *text,
-			 gsize text_len,
-			 gpointer user_data,
-			 GError **error)
-{
-#ifdef DEBUG
-    char *str = g_strndup (text, text_len);
-    g_print ("text: %s\n", str);
-    g_free (str);
-#endif
-
-    SysInfoParseContext *sysinfo = (SysInfoParseContext *)user_data;
-    switch (sysinfo->state) {
-    case DONE:
-        break;
-    case PARSING_FW_DATA:
-    case PARSING_KEY_TAG:
-        g_free (sysinfo->text);
-        sysinfo->text = g_strndup (text, text_len);
-        break;
-    default:
-        g_free (sysinfo->text);
-        sysinfo->text = NULL;
-        break;
-    }
-}
-
-static void parse_error (GMarkupParseContext *context,
-			 GError *error,
-			 gpointer user_data)
-{
-    gint line;
-    gint row;
-    g_markup_parse_context_get_position (context, &line, &row);
-    g_warning ("error at line %i row %i", line, row);
-}
-
-static char *
-get_sysinfo_extended_path (Itdb_Device *device)
-{
-    const gchar *p_sysinfo[] = {"SysInfoExtended", NULL};
-    gchar *dev_path, *sysinfo_path;
-
-    dev_path = itdb_get_device_dir (device->mountpoint);
-
-    if (!dev_path) {
-	return NULL;
-    }
-
-    sysinfo_path = itdb_resolve_path (dev_path, p_sysinfo);
-    g_free (dev_path);
-    return sysinfo_path;
-}
-
-static void init_gmarkup_parser (GMarkupParser *parser)
-{
-    parser->start_element = parse_start_element;
-    parser->end_element = parse_end_element;
-    parser->text = parse_text;
-    parser->error = parse_error;
-}
-
-
-static gboolean parse_sysinfo_xml (Itdb_Device *device, 
-				   const char *xml, gsize len,
-				   GError **error)
-{
-    GMarkupParseContext *ctx;
-    GMarkupParser parser = {0, };
-    gboolean success;
-
-    SysInfoParseContext sysinfo = {0, };
-    sysinfo.state = LOOKING_FOR_KEY_TAG;
-    sysinfo.device = device;
-
-    init_gmarkup_parser (&parser);
-    ctx = g_markup_parse_context_new (&parser, 0, &sysinfo, NULL);
-    success = g_markup_parse_context_parse (ctx, xml, len, error);
-    if (!success) {
-        g_markup_parse_context_free (ctx);
-        return FALSE;
-    }
-    success = g_markup_parse_context_end_parse (ctx, error);
-    if (!success) {
-        g_markup_parse_context_free (ctx);
-        return FALSE;
-    }
-    g_markup_parse_context_free (ctx);
-
-    return TRUE;
-}
-
-/**
- * itdb_device_read_sysinfo_xml:
- * @device: an #Itdb_Device 
- * @error: return location for a #GError or NULL
- *
- * Parses a SysInfoExtended file located in iPod_Control/Device on the 
- * passed-in @device. This file contains a detailed description of the iPod 
- * capabilities/characteristics. In particular, it contains the iPod Firewire 
- * ID which is necessary to build the checksum of the iTunesDB.
- * That file is automatically parsed when @device mount point is set 
- * if it can be found.
- *
- * If a SysInfoExtended file could be successfully read, TRUE is returned. 
- * Otherwise it returns FALSE and sets @error.
- *
- * Return value: TRUE on success, FALSE if an error occurred
- *
- **/
-gboolean
-itdb_device_read_sysinfo_xml (Itdb_Device *device, GError **error)
-{
-    gboolean success;
-    char *sysinfo_path;
-    char *xml_data;
-    gsize len;
-
-    sysinfo_path = get_sysinfo_extended_path (device);
-    if (sysinfo_path == NULL) {
-	g_set_error (error, ITDB_FILE_ERROR, ITDB_FILE_ERROR_NOTFOUND,
-		     "Couldn't find SysInfoExtended file");
-	return FALSE;
-    }
-    success = g_file_get_contents (sysinfo_path, &xml_data, &len, error);
-    g_free (sysinfo_path);
-
-    if (!success) {
-        return FALSE;
-    }
-    
-    success = parse_sysinfo_xml (device, xml_data, len, error);
-    g_free (xml_data);
-    
-    return success;
-}

Copied: libgpod/trunk/src/itdb_sysinfo_extended_parser.c (from rev 340, libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.c)
===================================================================
--- libgpod/trunk/src/itdb_sysinfo_extended_parser.c	                        (rev 0)
+++ libgpod/trunk/src/itdb_sysinfo_extended_parser.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,641 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+/*
+ * The code in this file is used to convert the output of the plist parser
+ * (a GValue *) and to convert it to data structures usable by libgpod.
+ * This is that code which interprets the generic parsed plist data as a
+ * SysInfoExtended file. The SysInfoExtended data is used to fill a
+ * SysInfoIpodProperties structure and several Itdb_ArtworkFormat structs.
+ *
+ * I tried to make the filling of the structures quite generic, if some
+ * field isn't parsed (which is quite possible since I gathered the various
+ * fields names using a few sample files), all is needed to add it is to
+ * add a field to the appropriate structure (SysInfoIpodProperties or
+ * Itdb_ArtworkFormat) and to add that field to the appropriate
+ * _fields_mapping structure. Those _fields_mapping structures are then
+ * used to convert from a GValue to the struct, but they are also used by
+ * the _dump and _free functions, so there's no need to modify them when
+ * you add a new field.
+ *
+ * If DEBUG_PARSING is defined when building that file, the fields that
+ * were found in the SysInfoExtended file but which were not used to build
+ * the data structures defined in that file will be dumped to stdout. It's
+ * normal to get a few unhandled fields, I left out on purpose a few <dict>
+ * because I was too lazy to parse them ;)
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "itdb_device.h"
+#include "itdb_plist.h"
+#include "itdb_sysinfo_extended_parser.h"
+
+struct _SysInfoIpodProperties {
+        char *build_id;
+        char *connected_bus;
+        gint max_transfer_speed;
+        gint family_id;
+        char *product_type;
+        char *firewire_guid;
+        char *firewire_version;
+        GList *artwork_formats;
+        GList *photo_formats;
+        GList *chapter_image_formats;
+        gboolean podcasts_supported;
+        char *min_itunes_version;
+        gboolean playlist_folders_supported;
+        char *serial_number;
+        gint updater_family_id;
+        char *visible_build_id;
+        gint oem_id;
+        gint oem_u;
+        gint db_version;
+        char *min_build_id;
+        char *language;
+        gboolean voice_memos_supported;
+        gint update_method;
+        gint max_fw_blocks;
+        gint fw_part_size;
+        gboolean auto_reboot_after_firmware_update;
+        char *volume_format;
+        gboolean forced_disk_mode;
+        gboolean bang_folder;
+        gboolean corrupt_data_partition;
+        gboolean corrupt_firmware_partition;
+        gboolean can_flash_backlight;
+        gboolean can_hibernate;
+        gboolean came_with_cd;
+        gboolean supports_sparse_artwork;
+        gint max_thumb_file_size;
+        gint ram;
+        gint hotplug_state;
+        gint battery_poll_interval;
+        gboolean sort_fields_supported;
+        gboolean vcard_with_jpeg_supported;
+        gint max_file_size_in_gb;
+        gint max_tracks;
+        gint games_platform_id;
+        gint games_platform_version;
+        gint rental_clock_bias;
+};
+
+static gint get_int (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return 0;
+        }
+        if (!G_VALUE_HOLDS_INT (val)) {
+                return 0;
+        }
+        return g_value_get_int (val);
+}
+
+static gdouble get_double (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return 0;
+        }
+        if (!G_VALUE_HOLDS_DOUBLE (val)) {
+                return 0;
+        }
+        return g_value_get_double (val);
+}
+
+static gboolean get_boolean (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return FALSE;
+        }
+        if (!G_VALUE_HOLDS_BOOLEAN (val)) {
+                return FALSE;
+        }
+        return g_value_get_boolean (val);
+}
+
+static char *get_string (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return NULL;
+        }
+        if (!G_VALUE_HOLDS_STRING (val)) {
+                return NULL;
+        }
+        return g_value_dup_string (val);
+}
+
+struct _DictFieldMapping {
+    const char* name;
+    GType type;
+    guint offset;
+};
+
+typedef struct _DictFieldMapping DictFieldMapping;
+static const DictFieldMapping sysinfo_ipod_properties_fields_mapping[] = {
+    { "BuildID",                       G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, build_id) },
+    { "ConnectedBus",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties,  connected_bus) },
+    { "MaxTransferSpeed",              G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_transfer_speed) },
+    { "FamilyID",                      G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, family_id) },
+    { "ProductType",                   G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, product_type) },
+    { "FireWireGUID",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, firewire_guid) },
+    { "FireWireVersion",               G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, firewire_version) },
+    { "PodcastsSupported",             G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, podcasts_supported) },
+    { "MinITunesVersion",              G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, min_itunes_version) },
+    { "PlaylistFoldersSupported",      G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, playlist_folders_supported) },
+    { "SerialNumber",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, serial_number) },
+    { "UpdaterFamilyID",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, updater_family_id) },
+    { "VisibleBuildID",                G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, visible_build_id) },
+    { "OEMID",                         G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, oem_id) },
+    { "OEMU",                          G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, oem_u) },
+    { "DBVersion",                     G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, db_version) },
+    { "MinBuildID",                    G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, min_build_id) },
+    { "Language",                      G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, language) },
+    { "VoiceMemosSupported",           G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, voice_memos_supported) },
+    { "UpdateMethod",                  G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, update_method) },
+    { "MaxFWBlocks",                   G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_fw_blocks) },
+    { "FWPartSize",                    G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, fw_part_size) },
+    { "AutoRebootAfterFirmwareUpdate", G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, auto_reboot_after_firmware_update) },
+    { "VolumeFormat",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, volume_format) },
+    { "ForcedDiskMode",                G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, forced_disk_mode) },
+    { "BangFolder",                    G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, bang_folder) },
+    { "CorruptDataPartition",          G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, corrupt_data_partition) },
+    { "CorruptFirmwarePartition",      G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, corrupt_firmware_partition) },
+    { "CanFlashBacklight",             G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, can_flash_backlight) },
+    { "CanHibernate",                  G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, can_hibernate) },
+    { "CameWithCD",                    G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, came_with_cd) },
+    { "SupportsSparseArtwork",         G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, supports_sparse_artwork) },
+    { "MaxThumbFileSize",              G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_thumb_file_size) },
+    { "RAM",                           G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, ram) },
+    { "HotPlugState",                  G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, hotplug_state) },
+    { "BatteryPollInterval",           G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, battery_poll_interval) },
+    { "SortFieldsSupported",           G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, sort_fields_supported) },
+    { "vCardWithJPEGSupported",        G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, vcard_with_jpeg_supported) },
+    { "MaxFileSizeInGB",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_file_size_in_gb) },
+    { "MaxTracks",                     G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_tracks) },
+    { "GamesPlatformID",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, games_platform_id) },
+    { "GamesPlatformVersion",          G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, games_platform_version) },
+    { "RentalClockBias",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, rental_clock_bias) },
+    { NULL,                            G_TYPE_NONE,    0 }
+};
+
+static const DictFieldMapping sysinfo_image_format_fields_mapping[] = {
+    { "FormatId",         G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, format_id) },
+    { "DisplayWidth",     G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, display_width) },
+    { "RenderWidth",      G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, width) },
+    { "RenderHeight",     G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, height) },
+/*  PixelFormat needs to be converted to ItdbThumbFormat, this is special-cased
+ *  in g_value_to_image_format */
+/*  { "PixelFormat",      G_TYPE_STRING,  G_STRUCT_OFFSET (Itdb_ArtworkFormat, format) },*/
+    { "Interlaced",       G_TYPE_BOOLEAN, G_STRUCT_OFFSET (Itdb_ArtworkFormat, interlaced) },
+    { "Crop",             G_TYPE_BOOLEAN, G_STRUCT_OFFSET (Itdb_ArtworkFormat, crop) },
+    { "AlignRowBytes",    G_TYPE_BOOLEAN, G_STRUCT_OFFSET (Itdb_ArtworkFormat, align_row_bytes) },
+    { "Rotation",         G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, rotation) },
+/* BackColor needs to be converted to a gint, this is special-cased
+ * in g_value_to_image_format */
+/*    { "BackColor",        G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, back_color) }, */
+    { "ColorAdjustment",  G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, color_adjustment) },
+    { "GammaAdjustment",  G_TYPE_DOUBLE,  G_STRUCT_OFFSET (Itdb_ArtworkFormat, gamma) },
+    { "AssociatedFormat", G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, associated_format) },
+    { NULL,               G_TYPE_NONE,    0 }
+};
+
+#ifdef DEBUG_PARSING
+static void dump_key_name (gpointer key, gpointer val, gpointer data)
+{
+    g_print ("%s ", (char *)key);
+}
+#endif
+
+static void dict_to_struct (GHashTable *dict,
+                            const DictFieldMapping *mapping,
+                            void *struct_ptr)
+{
+    const DictFieldMapping *it = mapping;
+    g_return_if_fail (it != NULL);
+    while (it->name != NULL) {
+        switch (it->type) {
+            case G_TYPE_INT: {
+                gint *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_int (dict, it->name);
+                break;
+            }
+
+            case G_TYPE_BOOLEAN: {
+                gboolean *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_boolean (dict, it->name);
+                break;
+            }
+
+            case G_TYPE_STRING: {
+                gchar **field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_string (dict, it->name);
+                break;
+            }
+
+            case G_TYPE_DOUBLE: {
+                gdouble *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_double (dict, it->name);
+                break;
+            }
+        }
+        g_hash_table_remove (dict, it->name);
+        ++it;
+    }
+#ifdef DEBUG_PARSING
+    if (g_hash_table_size (dict) != 0) {
+        g_print ("Unused keys:\n");
+        g_hash_table_foreach (dict, dump_key_name, NULL);
+        g_print ("\n");
+    }
+#endif
+}
+
+static void free_struct (const DictFieldMapping *mapping,
+                         void *struct_ptr)
+{
+    const DictFieldMapping *it = mapping;
+    while (it->name != NULL) {
+        if (it->type == G_TYPE_STRING) {
+                gchar **field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_free (*field);
+        }
+        ++it;
+    }
+    g_free (struct_ptr);
+}
+
+static void free_image_format (Itdb_ArtworkFormat *format)
+{
+    free_struct (sysinfo_image_format_fields_mapping, format);
+}
+
+void itdb_sysinfo_properties_free (SysInfoIpodProperties *props)
+{
+    g_list_foreach (props->artwork_formats, (GFunc)free_image_format, NULL);
+    g_list_free (props->artwork_formats);
+    g_list_foreach (props->photo_formats, (GFunc)free_image_format, NULL);
+    g_list_free (props->photo_formats);
+    g_list_foreach (props->chapter_image_formats, (GFunc)free_image_format, NULL);
+    g_list_free (props->chapter_image_formats);
+    free_struct (sysinfo_ipod_properties_fields_mapping, props);
+}
+
+static void dump_struct (const DictFieldMapping *mapping,
+                         void *struct_ptr)
+{
+    const DictFieldMapping *it = mapping;
+    g_return_if_fail (it != NULL);
+    while (it->name != NULL) {
+        switch (it->type) {
+            case G_TYPE_INT: {
+                gint *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %d\n", it->name, *field);
+                break;
+            }
+
+            case G_TYPE_BOOLEAN: {
+                gboolean *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %s\n", it->name, (*field)?"true":"false");
+                break;
+            }
+
+            case G_TYPE_STRING: {
+                gchar **field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %s\n", it->name, *field);
+                break;
+            }
+
+            case G_TYPE_DOUBLE: {
+                gdouble *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %f\n", it->name, *field);
+                break;
+            }
+        }
+        ++it;
+    }
+}
+
+static void dump_image_format (Itdb_ArtworkFormat *format)
+{
+    dump_struct (sysinfo_image_format_fields_mapping, format);
+}
+
+void itdb_sysinfo_properties_dump (SysInfoIpodProperties *props)
+{
+    dump_struct (sysinfo_ipod_properties_fields_mapping, props);
+    g_list_foreach (props->artwork_formats, (GFunc)dump_image_format, NULL);
+    g_list_foreach (props->photo_formats, (GFunc)dump_image_format, NULL);
+    g_list_foreach (props->chapter_image_formats, (GFunc)dump_image_format, NULL);
+}
+
+static gboolean
+set_pixel_format (Itdb_ArtworkFormat *img_spec, GHashTable *dict)
+{
+    char *pixel_format;
+
+    pixel_format = get_string (dict, "PixelFormat");
+    if (pixel_format == NULL) {
+        return FALSE;
+    }
+
+    if (strcmp (pixel_format, "32767579" /* 2vuy */) == 0) {
+        img_spec->format = THUMB_FORMAT_UYVY_BE;
+    } else if (strcmp (pixel_format, "42353635" /* B565 */) == 0) {
+        img_spec->format = THUMB_FORMAT_RGB565_BE;
+    } else if (strcmp (pixel_format, "4C353635" /* L565 */) == 0) {
+        img_spec->format = THUMB_FORMAT_RGB565_LE;
+    } else if (strcmp (pixel_format, "79343230" /* y420 */) == 0) {
+        img_spec->format = THUMB_FORMAT_I420_LE;
+    } else {
+        g_free (pixel_format);
+        return FALSE;
+    }
+    g_hash_table_remove (dict, "PixelFormat");
+    g_free (pixel_format);
+    return TRUE;
+}
+
+static void set_back_color (Itdb_ArtworkFormat *img_spec, GHashTable *dict)
+{
+    char *back_color_str;
+    guint back_color;
+    gint i;
+
+    memset (img_spec->back_color, 0, sizeof (img_spec->back_color));;
+    back_color_str = get_string (dict, "BackColor");
+    if (back_color_str == NULL) {
+        return;
+    }
+    back_color = strtoul (back_color_str, NULL, 16);
+    for (i = 3; i >= 0; i--) {
+        img_spec->back_color[(guchar)i] = back_color & 0xff;
+        back_color = back_color >> 8;
+    }
+    g_hash_table_remove (dict, "BackColor");
+    g_free (back_color_str);
+}
+
+static Itdb_ArtworkFormat *g_value_to_image_format (GValue *value)
+{
+    GHashTable *dict;
+    Itdb_ArtworkFormat *img_spec;
+
+    g_return_val_if_fail (G_VALUE_HOLDS (value, G_TYPE_HASH_TABLE), NULL);
+    dict = g_value_get_boxed (value);
+    g_return_val_if_fail (dict != NULL, NULL);
+
+    img_spec = g_new0 (Itdb_ArtworkFormat, 1);
+    if (img_spec == NULL) {
+        return NULL;
+    }
+
+    if (!set_pixel_format (img_spec, dict)) {
+        g_free (img_spec);
+        return NULL;
+    }
+    set_back_color (img_spec, dict);
+
+    dict_to_struct (dict, sysinfo_image_format_fields_mapping, img_spec);
+
+    return img_spec;
+}
+
+static GList *parse_one_formats_list (GHashTable *sysinfo_dict, 
+                                      const char *key)
+{
+    GValue *to_parse;
+    GList *formats = NULL;
+    GValueArray *array;
+    gint i;
+
+    to_parse = g_hash_table_lookup (sysinfo_dict, key);
+    if (to_parse == NULL) {
+        return NULL;
+    }
+    if (!G_VALUE_HOLDS (to_parse, G_TYPE_VALUE_ARRAY)) {
+        return NULL;
+    }
+    array = (GValueArray*)g_value_get_boxed (to_parse);
+    for (i = 0; i < array->n_values; i++) {
+        Itdb_ArtworkFormat *format;
+	format = g_value_to_image_format (g_value_array_get_nth (array, i));
+	if (format != NULL) {
+		formats = g_list_prepend (formats, format);
+	}
+    } 
+    g_hash_table_remove (sysinfo_dict, key);
+    return formats;
+}
+
+static SysInfoIpodProperties *g_value_to_ipod_properties (GValue *value)
+{
+    GHashTable *sysinfo_dict;
+    SysInfoIpodProperties *props;
+
+    g_return_val_if_fail (G_VALUE_HOLDS (value, G_TYPE_HASH_TABLE), NULL);
+    sysinfo_dict = g_value_get_boxed (value);
+
+    props = g_new0 (SysInfoIpodProperties, 1);
+    props->artwork_formats = parse_one_formats_list (sysinfo_dict,
+                                                     "AlbumArt");
+    props->photo_formats = parse_one_formats_list (sysinfo_dict,
+                                                   "ImageSpecifications");
+    props->chapter_image_formats = parse_one_formats_list (sysinfo_dict,
+                                                           "ChapterImageSpecs");
+    dict_to_struct (sysinfo_dict,
+                    sysinfo_ipod_properties_fields_mapping,
+                    props);
+
+    return props;
+}
+
+/**
+ * itdb_sysinfo_extended_parse:
+ * @filename:   name of the SysInfoExtended file to parse
+ * @error:      return location for a #GError
+ *
+ * itdb_sysinfo_extended_parse() parses a SysInfoExtended file into a
+ * #SysInfoIpodProperties structure. This structure contains a lot of
+ * information about the iPod properties (artwork format supported,
+ * podcast capabilities, ...) which can be queried using the
+ * appropriate accessors.
+ *
+ * Returns: a newly allocated #SysInfoIpodProperties which must be
+ * freed after use, or NULL if an error occurred during the parsing
+ */
+SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename,
+                                                    GError **error)
+{
+    GValue *parsed_doc;
+    SysInfoIpodProperties *props;
+
+    g_return_val_if_fail (filename != NULL, NULL);
+
+    parsed_doc = itdb_plist_parse_from_file (filename, error);
+    if (parsed_doc == NULL) {
+        return NULL;
+    }
+    props = g_value_to_ipod_properties (parsed_doc);
+    g_value_unset (parsed_doc);
+    g_free (parsed_doc);
+
+    return props;
+}
+
+/**
+ * itdb_sysinfo_properties_get_serial_number:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Gets the iPod serial number from @props if it was found while parsing
+ * @props. The serial number uniquely identify an ipod and it can be used
+ * to determine when it was produced and its model/color, see
+ * http://svn.gnome.org/viewvc/podsleuth/trunk/src/PodSleuth/PodSleuth/SerialNumber.cs?view=markup
+ * for more details about what the various parts of the serial number
+ * correspond to. Please avoid parsing this serial number by yourself and
+ * ask for additionnal API in libgpod if you find yourself needing to parse
+ * that serial number :)
+ *
+ * Returns: the iPod serial number, NULL if the serial number wasn't set in
+ * @props. The returned string must not be modified nor freed.
+ */
+const char *
+itdb_sysinfo_properties_get_serial_number (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->serial_number;
+}
+
+/**
+ * itdb_sysinfo_properties_get_firewire_id:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Gets the iPod firewire ID from @props if it was found while parsing
+ * @props. Contrary to what its name implies, the firewire ID is also set
+ * on USB iPods and is especially important on iPod Classic and Nano Video
+ * since this ID (which is unique on each iPod) is needed to generate the
+ * checksum that is required to write a valid iPod database on these
+ * models.
+ *
+ * Returns: the iPod firewire ID, NULL if the serial number wasn't set in
+ * @props. The returned string must not be modified nor freed.
+ */
+const char *
+itdb_sysinfo_properties_get_firewire_id (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->firewire_guid;
+}
+
+/**
+ * itdb_sysinfo_properties_get_cover_art_formats:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Returns: a #GList of #Itdb_ArtworkFormat describing the cover art formats
+ * supported by the iPod described in @props. The returned list must not be
+ * modified nor freed.
+ */
+const GList *
+itdb_sysinfo_properties_get_cover_art_formats (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->artwork_formats;
+}
+
+/**
+ * itdb_sysinfo_properties_get_photo_formats:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Returns: a #GList of #Itdb_ArtworkFormat describing the photo formats
+ * supported by the iPod described in @props. The returned list must not be
+ * modified nor freed.
+ */
+const GList *
+itdb_sysinfo_properties_get_photo_formats (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->photo_formats;
+}
+
+/**
+ * itdb_sysinfo_properties_get_chapter_image_formats:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Returns: a #GList of #Itdb_ArtworkFormat describing the chapter image
+ * formats supported by the iPod described in @props. The returned list must
+ * not be modified nor freed.
+ */
+const GList *
+itdb_sysinfo_properties_get_chapter_image_formats (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->chapter_image_formats;
+}
+
+/**
+ * itdb_sysinfo_properties_supports_sparse_artwork:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Sparse artwork is a way to share artwork between different iPod tracks
+ * which make things more efficient space-wise. This function can be used
+ * to check if the more space-efficient artwork storage can be used.
+ *
+ * Returns: TRUE if the iPod supports sparse artwork, FALSE if it does not
+ * or if @props doesn't contain any information about sparse artwork
+ */
+G_GNUC_INTERNAL gboolean
+itdb_sysinfo_properties_supports_sparse_artwork (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, FALSE);
+
+    return props->supports_sparse_artwork;
+}

Copied: libgpod/trunk/src/itdb_sysinfo_extended_parser.h (from rev 340, libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.h)
===================================================================
--- libgpod/trunk/src/itdb_sysinfo_extended_parser.h	                        (rev 0)
+++ libgpod/trunk/src/itdb_sysinfo_extended_parser.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,64 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+#ifndef __ITDB_SYSINFO_EXTENDED_PARSER_H__
+#define __ITDB_SYSINFO_EXTENDED_PARSER_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef struct _SysInfoIpodProperties SysInfoIpodProperties;
+
+G_GNUC_INTERNAL void
+itdb_sysinfo_properties_dump (SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL
+SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename,
+                                                    GError **error);
+
+G_GNUC_INTERNAL
+void itdb_sysinfo_properties_free (SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL const char *
+itdb_sysinfo_properties_get_serial_number (const SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL const char *
+itdb_sysinfo_properties_get_firewire_id (const SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL const GList *
+itdb_sysinfo_properties_get_cover_art_formats (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL const GList *
+itdb_sysinfo_properties_get_photo_formats (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL const GList *
+itdb_sysinfo_properties_get_chapter_image_formats (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL gboolean
+itdb_sysinfo_properties_supports_sparse_artwork (const SysInfoIpodProperties *);
+
+G_END_DECLS
+
+#endif

Copied: libgpod/trunk/src/itdb_thumb.c (from rev 340, libgpod/branches/upstream/current/src/itdb_thumb.c)
===================================================================
--- libgpod/trunk/src/itdb_thumb.c	                        (rev 0)
+++ libgpod/trunk/src/itdb_thumb.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,588 @@
+/*
+|  Copyright (C) 2007 Christophe Fergeau <teuf at gnome org>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include "itdb_private.h"
+#include "itdb_thumb.h"
+
+#ifdef HAVE_GDKPIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+Itdb_Thumb *itdb_thumb_new_from_file (const gchar *filename)
+{
+    Itdb_Thumb_File *thumb_file;
+    Itdb_Thumb *thumb;
+
+    thumb_file = g_new0 (Itdb_Thumb_File, 1);
+    thumb = (Itdb_Thumb *)thumb_file;
+    thumb->data_type = ITDB_THUMB_TYPE_FILE;
+    thumb_file->filename = g_strdup (filename);
+
+    return thumb;
+}
+
+
+Itdb_Thumb *itdb_thumb_new_from_data (const guchar *data, gsize len)
+{
+    Itdb_Thumb_Memory *thumb_memory;
+    Itdb_Thumb *thumb;
+
+    thumb_memory = g_new0 (Itdb_Thumb_Memory, 1);
+    thumb = (Itdb_Thumb *)thumb_memory;
+    thumb->data_type = ITDB_THUMB_TYPE_MEMORY;
+    thumb_memory->image_data = g_memdup (data, len);
+    thumb_memory->image_data_len = len;
+
+    return thumb;
+}
+
+
+#ifdef HAVE_GDKPIXBUF
+Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf)
+{
+    Itdb_Thumb_Pixbuf *thumb_pixbuf;
+    Itdb_Thumb *thumb;
+
+    thumb_pixbuf = g_new0 (Itdb_Thumb_Pixbuf, 1);
+    thumb = (Itdb_Thumb *)thumb_pixbuf;
+    thumb->data_type = ITDB_THUMB_TYPE_PIXBUF;
+    thumb_pixbuf->pixbuf = g_object_ref (G_OBJECT (pixbuf));
+
+    return thumb;
+}
+#else
+Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf)
+{
+    return NULL;
+}
+#endif
+
+Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat *format)
+{
+    Itdb_Thumb_Ipod_Item *thumb_ipod;
+
+    thumb_ipod = g_new0 (Itdb_Thumb_Ipod_Item, 1);
+    thumb_ipod->format = format;
+
+    return thumb_ipod;
+}
+
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void)
+{
+    Itdb_Thumb *thumb;
+
+    thumb = (Itdb_Thumb *)g_new0 (Itdb_Thumb_Ipod, 1);
+    thumb->data_type = ITDB_THUMB_TYPE_IPOD;
+
+    return thumb;
+}
+
+static void itdb_thumb_ipod_item_free (Itdb_Thumb_Ipod_Item *item)
+{
+    g_free (item->filename);
+    g_free (item);
+}
+
+/**
+ * itdb_thumb_free:
+ * @thumb: an #Itdb_Thumb
+ *
+ * Frees the memory used by @thumb
+ *
+ * Since: 0.3.0
+ */
+void itdb_thumb_free (Itdb_Thumb *thumb)
+{
+    g_return_if_fail (thumb);
+    switch (thumb->data_type) {
+        case ITDB_THUMB_TYPE_FILE: {
+            Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+            g_free (thumb_file->filename);
+            break;
+        }
+        case ITDB_THUMB_TYPE_MEMORY: {
+            Itdb_Thumb_Memory *thumb_memory = (Itdb_Thumb_Memory *)thumb;
+            g_free (thumb_memory->image_data);
+            break;
+        }
+#ifdef HAVE_GDKPIXBUF
+        case ITDB_THUMB_TYPE_PIXBUF: {
+            Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf *)thumb;
+            if (thumb_pixbuf->pixbuf) {
+                g_object_unref (G_OBJECT (thumb_pixbuf->pixbuf));
+            }
+            break;
+        }
+#else
+	case ITDB_THUMB_TYPE_PIXBUF:
+            g_assert_not_reached();
+#endif
+        case ITDB_THUMB_TYPE_IPOD: {
+            Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
+            g_list_foreach (thumb_ipod->thumbs,
+                            (GFunc)itdb_thumb_ipod_item_free,
+                            NULL);
+            g_list_free (thumb_ipod->thumbs);
+            break;
+        }
+        case ITDB_THUMB_TYPE_INVALID:
+            g_assert_not_reached ();
+    }
+    g_free (thumb);
+}
+
+
+static Itdb_Thumb_Ipod_Item *
+itdb_thumb_ipod_item_duplicate (Itdb_Thumb_Ipod_Item *item)
+{
+    Itdb_Thumb_Ipod_Item *new_item;
+
+    g_return_val_if_fail (item != NULL, NULL);
+
+    new_item = itdb_thumb_new_item_from_ipod (item->format);
+
+    new_item->filename = g_strdup (item->filename);
+    new_item->offset = item->offset;
+    new_item->size   = item->size;
+    new_item->width  = item->width;
+    new_item->height = item->height;
+    new_item->horizontal_padding = item->horizontal_padding;
+    new_item->vertical_padding = item->vertical_padding;
+
+    return new_item;
+}
+
+/**
+ * itdb_thumb_duplicate:
+ * @thumb: an #Itdb_Thumb
+ *
+ * Duplicates the data contained in @thumb
+ *
+ * Returns: a newly allocated copy of @thumb to be freed with
+ * itdb_thumb_free() after use
+ *
+ * Since: 0.3.0
+ */
+Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb)
+{
+    switch (thumb->data_type) {
+        case ITDB_THUMB_TYPE_FILE: {
+            Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+            return itdb_thumb_new_from_file (thumb_file->filename);
+        }
+        case ITDB_THUMB_TYPE_MEMORY: {
+            Itdb_Thumb_Memory *thumb_memory = (Itdb_Thumb_Memory *)thumb;
+            return itdb_thumb_new_from_data (thumb_memory->image_data,
+                                             thumb_memory->image_data_len);
+        }
+#ifdef HAVE_GDKPIXBUF
+        case ITDB_THUMB_TYPE_PIXBUF: {
+            Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf *)thumb;
+            return itdb_thumb_new_from_pixbuf (thumb_pixbuf->pixbuf);
+        }
+#else
+        case ITDB_THUMB_TYPE_PIXBUF:
+	    return NULL;
+#endif
+        case ITDB_THUMB_TYPE_IPOD: {
+            Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
+            Itdb_Thumb_Ipod *new_thumb;
+            GList *it;
+            new_thumb = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+            for (it = thumb_ipod->thumbs; it != NULL; it = it->next) {
+                Itdb_Thumb_Ipod_Item *item;
+                item = itdb_thumb_ipod_item_duplicate (it->data);
+                if (item != NULL) {
+                    itdb_thumb_ipod_add (new_thumb, item);
+                }
+            }
+	    new_thumb->thumbs = g_list_reverse (new_thumb->thumbs);
+            return (Itdb_Thumb *)new_thumb;
+        }
+        case ITDB_THUMB_TYPE_INVALID:
+            g_assert_not_reached ();
+    }
+
+       return NULL;
+}
+
+
+G_GNUC_INTERNAL gint
+itdb_thumb_get_byteorder (const ItdbThumbFormat format)
+{
+    switch (format)
+    {
+      case THUMB_FORMAT_UYVY_LE:
+      case THUMB_FORMAT_I420_LE:
+      case THUMB_FORMAT_RGB565_LE:
+      case THUMB_FORMAT_RGB565_LE_90:
+      case THUMB_FORMAT_RGB555_LE:
+      case THUMB_FORMAT_RGB555_LE_90:
+      case THUMB_FORMAT_RGB888_LE:
+      case THUMB_FORMAT_RGB888_LE_90:
+      case THUMB_FORMAT_REC_RGB555_LE:
+      case THUMB_FORMAT_REC_RGB555_LE_90:
+      case THUMB_FORMAT_EXPERIMENTAL_LE:
+        return G_LITTLE_ENDIAN;
+      case THUMB_FORMAT_UYVY_BE:
+      case THUMB_FORMAT_I420_BE:
+      case THUMB_FORMAT_RGB565_BE:
+      case THUMB_FORMAT_RGB565_BE_90:
+      case THUMB_FORMAT_RGB555_BE:
+      case THUMB_FORMAT_RGB555_BE_90:
+      case THUMB_FORMAT_RGB888_BE:
+      case THUMB_FORMAT_RGB888_BE_90:
+      case THUMB_FORMAT_REC_RGB555_BE:
+      case THUMB_FORMAT_REC_RGB555_BE_90:
+      case THUMB_FORMAT_EXPERIMENTAL_BE:
+        return G_BIG_ENDIAN;
+    }
+    g_return_val_if_reached (-1);
+}
+
+guint itdb_thumb_get_rotation (Itdb_Thumb *thumb)
+{
+    return thumb->rotation;
+}
+
+void itdb_thumb_set_rotation (Itdb_Thumb *thumb, guint rotation)
+{
+    thumb->rotation = rotation;
+}
+
+G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs,
+                                          Itdb_Thumb_Ipod_Item *thumb)
+{
+    thumbs->thumbs = g_list_prepend (thumbs->thumbs, thumb);
+}
+
+Itdb_Thumb_Ipod_Item *itdb_thumb_ipod_get_item_by_type (Itdb_Thumb *thumbs,
+                                                        const Itdb_ArtworkFormat *format)
+{
+    GList *gl;
+
+    g_return_val_if_fail (format != NULL, NULL);
+    g_return_val_if_fail (thumbs != NULL, NULL);
+    g_return_val_if_fail (thumbs->data_type == ITDB_THUMB_TYPE_IPOD, NULL);
+
+    for (gl=((Itdb_Thumb_Ipod *)thumbs)->thumbs; gl != NULL; gl=gl->next)
+    {
+	Itdb_Thumb_Ipod_Item *item = gl->data;
+	g_return_val_if_fail (item != NULL, NULL);
+	if (item->format == format)  return item;
+    }
+    return NULL;
+}
+
+/**
+ * itdb_thumb_ipod_get_filename:
+ * @device: an #Itdb_Device
+ * @thumb:  an #Itdb_Thumb_Ipod_Item
+ *
+ * Get filename of thumbnail. If it's a thumbnail on the iPod, return
+ * the full path to the ithmb file. Otherwise return the full path to
+ * the original file.
+ *
+ * Returns: newly allocated string containing the absolute path to the
+ * thumbnail file.
+ */
+gchar *itdb_thumb_ipod_get_filename (Itdb_Device *device, Itdb_Thumb_Ipod_Item *item)
+{
+    gchar *artwork_dir;
+    char *filename = NULL;
+
+    g_return_val_if_fail (device, NULL);
+    g_return_val_if_fail (item, NULL);
+
+
+    if (strlen (item->filename) < 2) {
+        g_print (_("Illegal filename: '%s'.\n"), item->filename);
+        return NULL;
+    }
+
+    if (!device->mountpoint) {
+        g_print (_("Mountpoint not set.\n"));
+        return NULL;
+    }
+    artwork_dir = itdb_get_artwork_dir (device->mountpoint);
+    if (artwork_dir) {
+        filename = itdb_get_path (artwork_dir, item->filename+1);
+        g_free (artwork_dir);
+    }
+    /* FIXME: Hack */
+    if( !filename ) {
+        artwork_dir = itdb_get_photos_thumb_dir (device->mountpoint);
+
+        if (artwork_dir) {
+            const gchar *name_on_disk = strchr (item->filename+1, ':');
+            if (name_on_disk) {
+                filename = itdb_get_path (artwork_dir, name_on_disk + 1);
+            }
+            g_free (artwork_dir);
+        }
+    }
+    return filename;
+}
+
+const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs)
+{
+    return thumbs->thumbs;
+}
+
+#ifdef HAVE_GDKPIXBUF
+/**
+ * itdb_thumb_to_pixbuf_at_size:
+ * @device: an #Itdb_Device
+ * @thumb:  an #Itdb_Thumb
+ * @width:  width of the pixbuf to retrieve, -1 for the biggest
+ *          possible size and 0 for the smallest possible size (with no scaling)
+ * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
+ *          and 0 for the smallest possible size (with no scaling)
+ *
+ * Converts @thumb to a #GdkPixbuf.
+ *
+ * <note>
+ * Since we want to have gdk-pixbuf dependency optional, a generic
+ * gpointer is returned which you have to cast to a #GdkPixbuf using
+ * GDK_PIXBUF() yourself.
+ * </note>
+ *
+ * Returns: a #GdkPixbuf that must be unreffed with gdk_pixbuf_unref()
+ * after use, or NULL if the creation of the gdk-pixbuf failed or if
+ * libgpod was compiled without gdk-pixbuf support.
+ *
+ * Since: 0.7.0
+ */
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+                                       gint width, gint height)
+{
+    GdkPixbuf *pixbuf=NULL;
+
+    switch (thumb->data_type)
+    {
+    case ITDB_THUMB_TYPE_FILE:
+        {
+	    Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+	    if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+	    {   /* scale */
+		pixbuf = gdk_pixbuf_new_from_file_at_size (thumb_file->filename,
+							   width, height,
+							   NULL);
+	    }
+	    else
+	    {   /* don't scale */
+		pixbuf = gdk_pixbuf_new_from_file (thumb_file->filename, NULL);
+	    }
+	    break;
+	}
+    case ITDB_THUMB_TYPE_MEMORY:
+        {
+	    Itdb_Thumb_Memory *thumb_mem = (Itdb_Thumb_Memory *)thumb;
+	    GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
+	    g_return_val_if_fail (loader, FALSE);
+	    if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+	    {
+		gdk_pixbuf_loader_set_size (loader, width, height);
+	    }
+	    gdk_pixbuf_loader_write (loader,
+				     thumb_mem->image_data,
+				     thumb_mem->image_data_len,
+				     NULL);
+	    gdk_pixbuf_loader_close (loader, NULL);
+	    pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+	    if (pixbuf)
+		g_object_ref (pixbuf);
+	    g_object_unref (loader);
+	    break;
+	}
+    case ITDB_THUMB_TYPE_PIXBUF:
+        {
+	    Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf*)thumb;
+	    if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+	    {
+		pixbuf = gdk_pixbuf_scale_simple (thumb_pixbuf->pixbuf,
+						  width, height,
+						  GDK_INTERP_BILINEAR);
+	    }
+	    else
+	    {
+		pixbuf = g_object_ref (thumb_pixbuf->pixbuf);
+	    }
+	    break;
+	}
+    case ITDB_THUMB_TYPE_IPOD:
+        {
+	    Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
+	    const GList *thumb;
+	    Itdb_Thumb_Ipod_Item *chosen;
+	    gint w=width;
+	    gint h=height;
+
+	    if ((width == -1) || (height == -1))
+	    {   /* choose the largest available thumbnail */
+		w = G_MAXINT;
+	    h = G_MAXINT;
+	    }
+
+	    if (device == NULL) {
+		/* device is needed to get the ipod mountpoint */
+		return NULL;
+	    }
+	    chosen = NULL;
+	    for (thumb = itdb_thumb_ipod_get_thumbs (thumb_ipod);
+		 thumb != NULL;
+		 thumb = thumb->next) {
+		Itdb_Thumb_Ipod_Item *item = (Itdb_Thumb_Ipod_Item*)thumb->data;
+		if (chosen == NULL)
+		{   /* make sure we select *something* */
+		    chosen = item;
+		}
+		if ((chosen->width > w) && (chosen->height > h))
+		{   /* try to find a thumb in size between the chosen and
+		       the current one */
+		    if ((item->width >= w) && (item->height >= h))
+		    {
+			if ((item->width < chosen->width) || (item->height < chosen->height))
+			{
+			    chosen = item;
+			}
+		    }
+		}
+		if ((chosen->width < w) || (chosen->height < h))
+		{   /* try to find something bigger */
+		    if ((item->width > chosen->width) || (item->height > chosen->height))
+		    {
+			chosen = item;
+		    }
+		}
+	    }
+	    if (chosen != NULL)
+	    {
+		GdkPixbuf *pix = itdb_thumb_ipod_item_to_pixbuf (device, chosen);
+		if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+		{   /* scale */
+		    gdouble scalex = (gdouble)width/chosen->width;
+		    gdouble scaley = (gdouble)height/chosen->height;
+		    gdouble scale = MIN (scalex, scaley);
+		    pixbuf = gdk_pixbuf_scale_simple (pix,
+						      chosen->width*scale,
+						      chosen->height*scale,
+						      GDK_INTERP_BILINEAR);
+		    g_object_unref (pix);
+		}
+		else
+		{   /* don't scale */
+		    pixbuf = pix;
+		}
+	    }
+	    break;
+	}
+    case ITDB_THUMB_TYPE_INVALID:
+	g_return_val_if_reached (NULL);
+    } /* switch (...) */
+
+    return pixbuf;
+}
+
+static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *device,
+                                          Itdb_Thumb_Ipod *thumb)
+{
+        const GList *items;
+        GList *pixbufs = NULL;
+
+        g_return_val_if_fail (thumb != NULL, NULL);
+        g_return_val_if_fail (thumb->parent.data_type == ITDB_THUMB_TYPE_IPOD, NULL);
+
+        for (items = itdb_thumb_ipod_get_thumbs (thumb);
+             items != NULL;
+             items = items->next) {
+            GdkPixbuf *pixbuf;
+            pixbuf = itdb_thumb_ipod_item_to_pixbuf (device, items->data);
+            if (pixbuf != NULL) {
+                pixbufs = g_list_prepend (pixbufs, pixbuf);
+            }
+        }
+
+        return pixbufs;
+}
+
+/**
+ * itdb_thumb_to_pixbufs:
+ * @device: an #Itdb_Device
+ * @thumb:  an #Itdb_Thumb
+ *
+ * Converts @thumb to a #GList of #GdkPixbuf. The returned #GList will
+ * generally contain only 1 element, the full-size pixbuf associated with
+ * @thumb, but when the artwork has been read from the ipod and hasn't been
+ * modified from the library, then the returned #GList will contain several
+ * #GdkPixbuf corresponding to the various thumbnail sizes that were
+ * written to the iPod database.
+ *
+ * Returns: a #GList of #GdkPixbuf which are associated with @thumb, NULL
+ * if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+ * support. The #GdkPixbuf must be unreffed with gdk_pixbuf_unref() after use
+ * and the #GList must be freed with g_list_free().
+ *
+ * Since: 0.7.0
+ */
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb)
+{
+    GList *pixbufs = NULL;
+    GdkPixbuf *pixbuf;
+
+    switch (thumb->data_type) {
+    case ITDB_THUMB_TYPE_IPOD:
+        pixbufs = itdb_thumb_ipod_to_pixbufs (device, (Itdb_Thumb_Ipod *)thumb);
+        break;
+    case ITDB_THUMB_TYPE_FILE:
+    case ITDB_THUMB_TYPE_MEMORY:
+    case ITDB_THUMB_TYPE_PIXBUF:
+        pixbuf = itdb_thumb_to_pixbuf_at_size (device, thumb, -1, -1);
+        pixbufs = g_list_append (pixbufs, pixbuf);
+        break;
+    case ITDB_THUMB_TYPE_INVALID:
+        g_assert_not_reached ();
+    }
+
+    return pixbufs;
+}
+#else
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+                                       gint width, gint height)
+{
+    return NULL;
+}
+
+
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb)
+{
+    return NULL;
+}
+#endif

Copied: libgpod/trunk/src/itdb_thumb.h (from rev 340, libgpod/branches/upstream/current/src/itdb_thumb.h)
===================================================================
--- libgpod/trunk/src/itdb_thumb.h	                        (rev 0)
+++ libgpod/trunk/src/itdb_thumb.h	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,131 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|                2007 Christophe Fergeau <teuf at gnome org>
+|
+|  The code contained in this file 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 file 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 code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+*/
+#ifndef __ITDB_THUMB_H__
+#define __ITDB_THUMB_H__
+
+#include "itdb.h"
+#include "itdb_device.h"
+
+/* Types of thumbnails in Itdb_Image */
+typedef enum {
+    ITDB_THUMB_TYPE_INVALID,
+    ITDB_THUMB_TYPE_FILE,
+    ITDB_THUMB_TYPE_MEMORY,
+    ITDB_THUMB_TYPE_PIXBUF,
+    ITDB_THUMB_TYPE_IPOD
+} ItdbThumbDataType;
+
+/* The Itdb_Thumb structure can represent two slightly different
+   thumbnails:
+
+  a) a thumbnail before it's transferred to the iPod.
+
+     offset and size are 0
+
+     width and height, if unequal 0, will indicate the size on the
+     iPod. width and height are set the first time a pixbuf is
+     requested for this thumbnail.
+
+     type is set according to the type this thumbnail represents
+
+     filename point to a 'real' image file OR image_data and
+     image_data_len are set.
+
+  b) a thumbnail (big or small) stored on a database in the iPod.  In
+     these cases, id corresponds to the ID originally used in the
+     database, filename points to a .ithmb file on the iPod
+ */
+
+/**
+ * Itdb_Thumb:
+ * @data_type: The type of data (file, memory, pixbuf, ipod, etc.)
+ * @rotation:  Angle by which the image is rotated counterclockwise
+ *
+ * This is an opaque structure representing a thumbnail to be
+ * transferred to the ipod or read from the ipod.
+ *
+ * Since: 0.3.0
+ */
+struct _Itdb_Thumb {
+    ItdbThumbDataType data_type;
+    guint rotation;
+};
+
+struct _Itdb_Thumb_File {
+    struct _Itdb_Thumb parent;
+    gchar *filename;
+};
+typedef struct _Itdb_Thumb_File Itdb_Thumb_File;
+
+struct _Itdb_Thumb_Memory {
+    struct _Itdb_Thumb parent;
+    guchar  *image_data;      /* holds the thumbnail data of
+				 non-transfered thumbnails when
+				 filename == NULL */
+    gsize   image_data_len;   /* length of data */
+};
+typedef struct _Itdb_Thumb_Memory Itdb_Thumb_Memory;
+
+struct _Itdb_Thumb_Pixbuf {
+    struct _Itdb_Thumb parent;
+    gpointer pixbuf;
+};
+typedef struct _Itdb_Thumb_Pixbuf Itdb_Thumb_Pixbuf;
+
+struct _Itdb_Thumb_Ipod {
+    struct _Itdb_Thumb parent;
+    GList *thumbs;
+};
+typedef struct _Itdb_Thumb_Ipod Itdb_Thumb_Ipod;
+
+struct _Itdb_Thumb_Ipod_Item {
+    const Itdb_ArtworkFormat *format;
+    gchar   *filename;
+    guint32 offset;
+    guint32 size;
+    gint16  width;
+    gint16  height;
+    gint16  horizontal_padding;
+    gint16  vertical_padding;
+};
+typedef struct _Itdb_Thumb_Ipod_Item Itdb_Thumb_Ipod_Item;
+
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_file (const gchar *filename);
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_data (const guchar *data,
+                                                      gsize len);
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf);
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat *format);
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void);
+G_GNUC_INTERNAL void itdb_thumb_set_rotation (Itdb_Thumb *thumb,
+                                              guint rotation);
+G_GNUC_INTERNAL guint itdb_thumb_get_rotation (Itdb_Thumb *thumb);
+G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs,
+                                          Itdb_Thumb_Ipod_Item *thumb);
+G_GNUC_INTERNAL const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs);
+G_GNUC_INTERNAL char *itdb_thumb_ipod_get_filename (Itdb_Device *device, Itdb_Thumb_Ipod_Item *thumb);
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_ipod_get_item_by_type (Itdb_Thumb *thumbs,
+                                                        const Itdb_ArtworkFormat *format);
+G_GNUC_INTERNAL gpointer
+itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                Itdb_Thumb_Ipod_Item *item);
+#endif

Modified: libgpod/trunk/src/itdb_track.c
===================================================================
--- libgpod/trunk/src/itdb_track.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/itdb_track.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -23,66 +23,49 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_track.c 1718 2007-10-05 19:20:01Z teuf $
+|  $Id: itdb_track.c 2159 2008-12-08 01:16:58Z tmzullinger $
 */
 
 #include <config.h>
 
 #include "itdb_private.h"
 #include "itdb_device.h"
+#include "itdb_thumb.h"
 #include <string.h>
 
-static gboolean is_video_ipod (Itdb_Device *device) 
-{
-    const Itdb_IpodInfo *info;
-
-    g_return_val_if_fail (device, FALSE);
-
-    info = itdb_device_get_ipod_info (device);
-
-    if (!info) return FALSE;
-
-    if ((info->ipod_model == ITDB_IPOD_MODEL_VIDEO_WHITE) ||
-	(info->ipod_model == ITDB_IPOD_MODEL_VIDEO_BLACK))
-	return TRUE;
-    else
-	return FALSE;
-}
-
-
 /**
  * itdb_track_new:
- * 
- * Creates an empty #Itdb_Track 
  *
- * Return Value: the new #Itdb_Track, free it with itdb_track_free() when no
+ * Creates an empty #Itdb_Track
+ *
+ * Returns: the new #Itdb_Track, free it with itdb_track_free() when no
  * longer needed
- **/
+ */
 Itdb_Track *itdb_track_new (void)
 {
     Itdb_Track *track = g_new0 (Itdb_Track, 1);
 
     track->artwork = itdb_artwork_new ();
+    track->chapterdata = itdb_chapterdata_new ();
 
     track->visible = 1;
     return track;
 }
 
-/* Attempt to set some of the unknowns to reasonable defaults */
-static void itdb_track_set_defaults (Itdb_Track *tr)
+static gboolean haystack (gchar *filetype, gchar **desclist)
 {
-    auto gboolean haystack (gchar *filetype, gchar **desclist);
-    gboolean haystack (gchar *filetype, gchar **desclist)
+    gchar **dlp;
+    if (!filetype || !desclist) return FALSE;
+    for (dlp=desclist; *dlp; ++dlp)
     {
-	gchar **dlp;
-	if (!filetype || !desclist) return FALSE;
-	for (dlp=desclist; *dlp; ++dlp)
-	{
 	    if (strstr (filetype, *dlp)) return TRUE;
-	}
-	return FALSE;
     }
+    return FALSE;
+}
 
+/* Attempt to set some of the unknowns to reasonable defaults */
+static void itdb_track_set_defaults (Itdb_Track *tr)
+{
     gchar *mp3_desc[] = {"MPEG", "MP3", "mpeg", "mp3", NULL};
     gchar *mp4_desc[] = {"AAC", "MP4", "aac", "mp4", NULL};
     gchar *audible_subdesc[] = {"Audible", "audible", "Book", "book", NULL};
@@ -159,7 +142,7 @@
 	    tr->unk144 = 0x0000;  /* default value */
 	}
     }
-    if (is_video_ipod (tr->itdb->device))
+    if (itdb_device_supports_video (tr->itdb->device))
     {
 	/* The unk208 field seems to denote whether the file is a
 	   video or not.  It seems that it must be set to 0x00000002
@@ -209,20 +192,18 @@
     }
     if (tr->dbid2 == 0)  tr->dbid2 = tr->dbid;
 }
-    
 
-
 /**
  * itdb_track_add:
- * @itdb: an #Itdb_iTunesDB
- * @track: an #Itdb_Track
- * @pos: position of the track to add
- * 
+ * @itdb:   an #Itdb_iTunesDB
+ * @track:  an #Itdb_Track
+ * @pos:    position of the track to add
+ *
  * Adds @track to @itdb->tracks at position @pos (or at the end if pos
  * is -1). The application is responsible to also add it to the master
- * playlist. The @itdb gets ownership of the @track and will take care of 
+ * playlist. The @itdb gets ownership of the @track and will take care of
  * freeing the memory it uses when it's no longer necessary.
- **/
+ */
 void itdb_track_add (Itdb_iTunesDB *itdb, Itdb_Track *track, gint32 pos)
 {
     g_return_if_fail (itdb);
@@ -240,8 +221,8 @@
  * itdb_track_free:
  * @track: an #Itdb_Track
  *
- * Frees the memory used by @track 
- **/
+ * Frees the memory used by @track
+ */
 void itdb_track_free (Itdb_Track *track)
 {
     g_return_if_fail (track);
@@ -272,7 +253,7 @@
     g_free (track->sort_composer);
     g_free (track->sort_tvshow);
 
-    g_free (track->chapterdata_raw);
+    itdb_chapterdata_free (track->chapterdata);
 
     itdb_artwork_free (track->artwork);
 
@@ -289,7 +270,7 @@
  * Removes @track from the #Itdb_iTunesDB it's associated with, and frees the
  * memory it uses. It doesn't remove the track from the playlists it may have
  * been added to, in particular it won't be removed from the master playlist.
- **/
+ */
 void itdb_track_remove (Itdb_Track *track)
 {
     Itdb_iTunesDB *itdb;
@@ -305,12 +286,12 @@
 /**
  * itdb_track_unlink:
  * @track: an #Itdb_Track
- * 
+ *
  * Removes @track from the #Itdb_iTunesDB it's associated with, but do not free
- * memory. It doesn't remove the track from the playlists it may have been 
+ * memory. It doesn't remove the track from the playlists it may have been
  * added to, in particular it won't be removed from the master playlist.
- * track->itdb is set to NULL.
- **/
+ * @track->itdb is set to NULL.
+ */
 void itdb_track_unlink (Itdb_Track *track)
 {
     Itdb_iTunesDB *itdb;
@@ -329,8 +310,8 @@
  *
  * Duplicates an existing track
  *
- * Return value: a newly allocated #Itdb_Track 
- **/
+ * Returns: a newly allocated #Itdb_Track
+ */
 Itdb_Track *itdb_track_duplicate (Itdb_Track *tr)
 {
     Itdb_Track *tr_dup;
@@ -372,15 +353,12 @@
 
 
     /* Copy chapterdata */
-    if (tr->chapterdata_raw)
-    {
-	tr_dup->chapterdata_raw = g_new (gchar, tr->chapterdata_raw_length);
-	memcpy (tr_dup->chapterdata_raw, tr->chapterdata_raw,
-		tr->chapterdata_raw_length);
-    }
+    tr_dup->chapterdata = itdb_chapterdata_duplicate (tr->chapterdata);
 
     /* Copy thumbnail data */
-    tr_dup->artwork = itdb_artwork_duplicate (tr->artwork);
+    if (tr->artwork != NULL) {
+        tr_dup->artwork = itdb_artwork_duplicate (tr->artwork);
+    }
 
     /* Copy userdata */
     if (tr->userdata && tr->userdata_duplicate)
@@ -399,66 +377,34 @@
                                                     gpointer *pixbuf,
 						    gint rotation,
 						    GError **error)
-{					     
-    /* FIXME: this looks like it would work, but the problem is that
-     * gtkpod calls this function mostly with tracks that are not yet
-     * part of an iTunesDB. This means only the SMALL and LARGE thumbs
-     * are being added.
-     *
-     * One solution would be to add all kinds of cover thumbs and weed
-     * out the ones not supported when the ArtworkDB is written.
-     *
-     * Suggestions welcome!
-     */
-
+{
     gboolean result = FALSE;
-    ItdbThumbType thumbtypes[] =
-	{ ITDB_THUMB_COVER_SMALL,
-	  ITDB_THUMB_COVER_LARGE,
-	  ITDB_THUMB_COVER_XLARGE,
-	  ITDB_THUMB_COVER_MEDIUM,
-	  ITDB_THUMB_COVER_SMEDIUM,
-	  ITDB_THUMB_COVER_XSMALL,
-	  -1 };
-    ItdbThumbType *thumbtype;
-    const Itdb_ArtworkFormat *formats=NULL;
 
     g_return_val_if_fail (track, FALSE);
     g_return_val_if_fail (filename || image_data || pixbuf, FALSE);
 
-    if (track->itdb && track->itdb->device)
-    {
-	formats = itdb_device_get_artwork_formats (track->itdb->device);
-    }
-
     itdb_artwork_remove_thumbnails (track->artwork);
+    /* clear artwork id */
+    track->artwork->id = 0;
 
-    for (thumbtype=thumbtypes; *thumbtype!=-1; ++thumbtype)
+    if (filename)
     {
-	if (filename)
-	{
-	    result = itdb_artwork_add_thumbnail (track->artwork,
-						 *thumbtype,
-						 filename, rotation, error);
-	}
-	if (image_data)
-	{
-	    result = itdb_artwork_add_thumbnail_from_data (track->artwork,
-							   *thumbtype,
-							   image_data,
-							   image_data_len,
-							   rotation, error);
-	}
-	if (pixbuf)
-	{
-	    result = itdb_artwork_add_thumbnail_from_pixbuf (track->artwork,
-							     *thumbtype,
-							     pixbuf, rotation,
-							     error);
-        }
-	if (result == FALSE)
-	    break;  /* for (thumbtype=...) */
+        result = itdb_artwork_set_thumbnail (track->artwork, filename,
+                                             rotation, error);
     }
+    if (image_data)
+    {
+        result = itdb_artwork_set_thumbnail_from_data (track->artwork,
+                                                       image_data,
+                                                       image_data_len,
+                                                       rotation, error);
+    }
+    if (pixbuf)
+    {
+        result = itdb_artwork_set_thumbnail_from_pixbuf (track->artwork,
+                                                         pixbuf, rotation,
+                                                         error);
+    }
 
     if (result == TRUE)
     {
@@ -483,19 +429,20 @@
     return result;
 }
 
-
 /**
  * itdb_track_set_thumbnails:
- * @track: an #Itdb_Track
+ * @track:    an #Itdb_Track
  * @filename: image file to use as a thumbnail
  *
  * Uses the image contained in @filename to generate iPod thumbnails. The image
  * can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
- * will only be generated when necessary, ie when itdb_save() or a similar 
+ * will only be generated when necessary, i.e. when itdb_save() or a similar
  * function is called.
  *
- * Return value: TRUE if the thumbnail could be added, FALSE otherwise.
- **/
+ * Returns: TRUE if the thumbnail could be added, FALSE otherwise.
+ *
+ * Since: 0.3.0
+ */
 gboolean itdb_track_set_thumbnails (Itdb_Track *track,
 				    const gchar *filename)
 {
@@ -506,23 +453,22 @@
 					       0, NULL);
 }
 
-
-
-
 /**
  * itdb_track_set_thumbnails_from_data:
- * @track: an #Itdb_Track
- * @image_data: data used to create the thumbnail (the raw contents of
- *              an image file)
+ * @track:          an #Itdb_Track
+ * @image_data:     data used to create the thumbnail (the raw contents of
+ *                  an image file)
  * @image_data_len: length of above data block
  *
  * Uses @image_data to generate iPod thumbnails. The image can be in
  * any format supported by gdk-pixbuf. To save memory, the thumbnails
- * will only be generated when necessary, ie when itdb_save() or a
+ * will only be generated when necessary, i.e. when itdb_save() or a
  * similar function is called.
  *
- * Return value: TRUE if the thumbnail could be added, FALSE otherwise.
- **/
+ * Returns: TRUE if the thumbnail could be added, FALSE otherwise.
+ *
+ * Since: 0.4.0
+ */
 gboolean itdb_track_set_thumbnails_from_data (Itdb_Track *track,
 					      const guchar *image_data,
 					      gsize image_data_len)
@@ -537,15 +483,17 @@
 
 /**
  * itdb_track_set_thumbnails_from_pixbuf:
- * @track: an #Itdb_Track
+ * @track:  an #Itdb_Track
  * @pixbuf: a #GdkPixbuf used to generate the thumbnail
  *
  * Uses @pixbuf to generate iPod thumbnails. To save memory, the thumbnails
- * will only be generated when necessary, ie when itdb_save() or a
+ * will only be generated when necessary, i.e. when itdb_save() or a
  * similar function is called.
  *
- * Return value: TRUE if the thumbnail could be added, FALSE otherwise.
- **/
+ * Returns: TRUE if the thumbnail could be added, FALSE otherwise.
+ *
+ * Since: 0.5.0
+ */
 gboolean itdb_track_set_thumbnails_from_pixbuf (Itdb_Track *track,
                                                 gpointer pixbuf)
 {
@@ -556,41 +504,45 @@
                                                pixbuf, 0, NULL);
 }
 
-
 /**
  * itdb_track_remove_thumbnails:
  * @track: an #Itdb_Track
- * 
+ *
  * Removes the thumbnails associated with @track
- **/
+ *
+ * Since: 0.3.0
+ */
 void itdb_track_remove_thumbnails (Itdb_Track *track)
 {
     g_return_if_fail (track);
     itdb_artwork_remove_thumbnails (track->artwork);
     track->artwork_size = 0;
     track->artwork_count = 0;
+    track->mhii_link = 0;
     /* indicate no artwork is present */
     track->has_artwork = 0x02;
 }
 
-
 /**
  * itdb_track_by_id:
  * @itdb: an #Itdb_iTunesDB
- * @id: ID of the track to look for
+ * @id:   ID of the track to look for
  *
- * Looks up a track using its ID in @itdb. 
+ * Looks up a track using its ID in @itdb.
+ *
  * Looking up tracks by ID is not really a good idea because the IDs
  * are created by itdb just before export. The functions are here
  * because they are needed during import of the iTunesDB which is
  * referencing tracks by IDs.
- * This function is very slow (linear in the number of tracks contained in the 
- * database). If you need to lookup many IDs use itdb_track_id_tree_create(), 
- * itdb_track_id_tree_destroy(), and itdb_track_id_tree_by_id().
  *
- * Return value: #Itdb_Track with the ID @id or NULL if the ID cannot be
- * found. 
- **/
+ * This function is very slow (linear in the number of tracks
+ * contained in the database). If you need to lookup many IDs use
+ * itdb_track_id_tree_create(), itdb_track_id_tree_destroy(), and
+ * itdb_track_id_tree_by_id().
+ *
+ * Returns: #Itdb_Track with the ID @id or NULL if the ID cannot be
+ * found.
+ */
 Itdb_Track *itdb_track_by_id (Itdb_iTunesDB *itdb, guint32 id)
 {
     GList *gl;
@@ -614,17 +566,16 @@
     return -1;
 }
 
-
 /**
  * itdb_track_id_tree_create:
  * @itdb: an #Itdb_iTunesDB
  *
  * Creates a balanced-binary tree for quick ID lookup that is used in
- * itdb_track_by_id_tree() function below 
+ * itdb_track_by_id_tree()
  *
- * Return value: a #GTree indexed by track IDs to be freed with 
+ * Returns: a #GTree indexed by track IDs to be freed with
  * itdb_track_id_tree_destroy() when no longer used
- **/
+ */
 GTree *itdb_track_id_tree_create (Itdb_iTunesDB *itdb)
 {
     GTree *idtree;
@@ -647,8 +598,8 @@
  * itdb_track_id_tree_destroy:
  * @idtree: a #GTree
  *
- * Frees the memory used by @idtree 
- **/
+ * Frees the memory used by @idtree
+ */
 void itdb_track_id_tree_destroy (GTree *idtree)
 {
     g_return_if_fail (idtree);
@@ -659,14 +610,14 @@
 /**
  * itdb_track_id_tree_by_id:
  * @idtree: a #GTree created using itdb_track_id_tree_create()
- * @id: the ID of the track to search for
+ * @id:     the ID of the track to search for
  *
- * Lookup an #Itdb_Track by @id using @idtree for faster lookup (compared to
- * itdb_track_by_id)
+ * Lookup an #Itdb_Track by @id using @idtree for faster lookup
+ * (compared to itdb_track_by_id())
  *
- * Return value: the #Itdb_Track whose ID is @id, or NULL if such a track 
+ * Returns: the #Itdb_Track whose ID is @id, or NULL if such a track
  * couldn't be found
- **/
+ */
 Itdb_Track *itdb_track_id_tree_by_id (GTree *idtree, guint32 id)
 {
     g_return_val_if_fail (idtree, NULL);
@@ -674,4 +625,53 @@
     return (Itdb_Track *)g_tree_lookup (idtree, &id);
 }
 
+/**
+ * itdb_track_has_thumbnails:
+ * @track: an #Itdb_Track
+ *
+ * Determine if a @track has thumbnails
+ *
+ * Returns: TRUE if @track has artwork available, FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean itdb_track_has_thumbnails (Itdb_Track *track)
+{
+    g_return_val_if_fail (track != NULL, FALSE);
+    return ((track->artwork) && (track->artwork->thumbnail));
+}
 
+/**
+ * itdb_track_get_thumbnail:
+ * @track:  an #Itdb_Track
+ * @width:  width of the pixbuf to retrieve, -1 for the biggest possible size
+ *          (with no scaling)
+ * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
+ *          (with no scaling)
+ *
+ * Get a thumbnail representing the cover associated with the current track,
+ * scaling it if appropriate. If either height or width is -1, then the biggest
+ * unscaled thumbnail available will be returned.
+ *
+ * Returns: a #GdkPixbuf that must be unreffed when no longer used, NULL
+ * if no artwork could be found or if libgpod is compiled without GdkPixbuf
+ * support
+ *
+ * Since: 0.7.0
+ */
+gpointer itdb_track_get_thumbnail (Itdb_Track *track, gint width, gint height)
+{
+    g_return_val_if_fail (track != NULL, NULL);
+    if (!itdb_track_has_thumbnails (track)) {
+        return NULL;
+    }
+    if (track->itdb != NULL) {
+        return itdb_thumb_to_pixbuf_at_size (track->itdb->device,
+                                             track->artwork->thumbnail,
+                                             width, height);
+    } else {
+        return itdb_thumb_to_pixbuf_at_size (NULL, track->artwork->thumbnail,
+                                             width, height);
+    }
+}
+

Modified: libgpod/trunk/src/ithumb-writer.c
===================================================================
--- libgpod/trunk/src/ithumb-writer.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/src/ithumb-writer.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,5 +1,4 @@
-/*  Time-stamp: <2007-11-04 09:46:51 jcs>
- *
+/*
  *  Copyright (C) 2005 Christophe Fergeau
  *
  *  URL: http://www.gtkpod.org/libgpod.html
@@ -23,7 +22,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
- *  $Id: ithumb-writer.c 1753 2007-11-04 00:48:12Z jcsjcs $
+ *  $Id: ithumb-writer.c 2159 2008-12-08 01:16:58Z tmzullinger $
  */
 
 #include <config.h>
@@ -40,9 +39,12 @@
 #include <locale.h>
 #include <string.h>
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <math.h>
 #include <fcntl.h>
 
 #include <glib/gstdio.h>
@@ -66,6 +68,26 @@
 typedef struct _iThumbWriter iThumbWriter;
 
 
+static guint16 get_RGB_565_pixel (const guchar *pixel, gint byte_order)
+{
+    gint r;
+    gint g;
+    gint b;
+
+    r = pixel[0];
+    g = pixel[1];
+    b = pixel[2];
+
+    r >>= (8 - RED_BITS_565);
+    g >>= (8 - GREEN_BITS_565);
+    b >>= (8 - BLUE_BITS_565);
+    r = (r << RED_SHIFT_565) & RED_MASK_565;
+    g = (g << GREEN_SHIFT_565) & GREEN_MASK_565;
+    b = (b << BLUE_SHIFT_565) & BLUE_MASK_565;
+
+    return get_gint16 (r | g | b, byte_order);
+}
+
 static guint16 *
 pack_RGB_565 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
 	      gint horizontal_padding, gint vertical_padding,
@@ -77,48 +99,103 @@
 	gint channels;
 	gint width;
 	gint height;
-	gint w;
 	gint h;
 	gint byte_order;
+        gint dest_width;
 
 	g_object_get (G_OBJECT (pixbuf), 
 		      "rowstride", &row_stride, "n-channels", &channels,
 		      "height", &height, "width", &width,
 		      "pixels", &pixels, NULL);
-	g_return_val_if_fail ((width <= img_info->width) && (height <= img_info->height), NULL);
-	/* dst_width and dst_height come from a width/height database 
-	 * hardcoded in libipoddevice code, so dst_width * dst_height * 2 can't
-	 * overflow, even on an iPod containing malicious data
-	 */
-	*thumb_size = img_info->width * img_info->height * 2;
+	g_return_val_if_fail (((width + horizontal_padding) <= img_info->width), NULL);
+	g_return_val_if_fail (((height + vertical_padding) <= img_info->height), NULL);
+
+        if ((img_info->align_row_bytes) && ((img_info->width % 2) != 0)) {
+            /* each pixel is 2 bytes, to align rows on 4 bytes boundaries,
+             * width must be a multiple of 2 */
+            dest_width = img_info->width + 1;
+        } else {
+            dest_width = img_info->width;
+        }
+
+	/* Make sure thumb size calculation won't overflow */
+	g_return_val_if_fail (dest_width != 0, NULL);
+	g_return_val_if_fail (dest_width < G_MAXUINT/2, NULL);
+	g_return_val_if_fail (img_info->height < G_MAXUINT/(2*dest_width), NULL);
+	*thumb_size = dest_width * img_info->height * 2;
 	result = g_malloc0 (*thumb_size);
 
 	byte_order = itdb_thumb_get_byteorder (img_info->format);
 
+        for (h = 0; h < vertical_padding; h++) {
+            gint w;
+            gint line = h * dest_width;
+
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_565_pixel (img_info->back_color, 
+                                                      byte_order);
+            }
+            line += (height+vertical_padding)*dest_width;
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_565_pixel (img_info->back_color, 
+                                                      byte_order);
+            }
+        }
+
 	for (h = 0; h < height; h++) {
-	        gint line = (h+vertical_padding)*img_info->width;
-		for (w = 0; w < width; w++) {
-			gint r;
-			gint g;
-			gint b;
+            gint line = (h+vertical_padding)*dest_width;
+            gint w;
+            for (w = 0; w < dest_width; w++) {
+                guint16 packed_pixel;
+                if (w < horizontal_padding) {
+                    packed_pixel = get_RGB_565_pixel (img_info->back_color,
+                                                      byte_order);
+                } else if (w >= horizontal_padding+width) {
+                    packed_pixel = get_RGB_565_pixel (img_info->back_color,
+                                                      byte_order);
+                } else {
+                    guchar *cur_pixel;
 
-			r = pixels[h*row_stride + w*channels];
-			g = pixels[h*row_stride + w*channels + 1]; 
-			b = pixels[h*row_stride + w*channels + 2]; 
-
-			r >>= (8 - RED_BITS_565);
-			g >>= (8 - GREEN_BITS_565);
-			b >>= (8 - BLUE_BITS_565);
-			r = (r << RED_SHIFT_565) & RED_MASK_565;
-			g = (g << GREEN_SHIFT_565) & GREEN_MASK_565;
-			b = (b << BLUE_SHIFT_565) & BLUE_MASK_565;
-			result[line + w + horizontal_padding] =
-			    get_gint16 (r | g | b, byte_order);
-		}
+                    cur_pixel = &pixels[h*row_stride +
+					(w - horizontal_padding)*channels];
+                    packed_pixel = get_RGB_565_pixel (cur_pixel, byte_order);
+                }
+                result[line + w] = packed_pixel;
+            }
 	}
 	return result;
 }
 
+static guint16 get_RGB_555_pixel (const guchar *pixel, gint byte_order, 
+                                  gboolean has_alpha)
+{
+    gint r;
+    gint g;
+    gint b;
+    gint a;
+
+    r = pixel[0];
+    g = pixel[1];
+    b = pixel[2];
+    if (has_alpha) {
+        a = pixel[3];
+    } else {
+        /* I'm not sure if the highest bit really is the alpha channel. 
+         * For now I'm just setting this bit because that's what I have seen. */
+        a = 1;
+    }
+
+    r >>= (8 - RED_BITS_555);
+    g >>= (8 - GREEN_BITS_555);
+    b >>= (8 - BLUE_BITS_555);
+    r = (r << RED_SHIFT_555) & RED_MASK_555;
+    g = (g << GREEN_SHIFT_555) & GREEN_MASK_555;
+    b = (b << BLUE_SHIFT_555) & BLUE_MASK_555;
+    a = (a << ALPHA_SHIFT_555) & ALPHA_MASK_555;
+
+    return get_gint16 (a | r | g | b, byte_order);
+}
+
 static guint16 *
 pack_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
 	      gint horizontal_padding, gint vertical_padding,
@@ -130,55 +207,103 @@
 	gint channels;
 	gint width;
 	gint height;
-	gint w;
 	gint h;
 	gint byte_order;
+        gint dest_width;
 
 	g_object_get (G_OBJECT (pixbuf), 
 		      "rowstride", &row_stride, "n-channels", &channels,
 		      "height", &height, "width", &width,
 		      "pixels", &pixels, NULL);
-	g_return_val_if_fail ((width <= img_info->width) && (height <= img_info->height), NULL);
-	/* dst_width and dst_height come from a width/height database 
-	 * hardcoded in libipoddevice code, so dst_width * dst_height * 2 can't
-	 * overflow, even on an iPod containing malicious data
-	 */
+	g_return_val_if_fail (((width + horizontal_padding) <= img_info->width), NULL);
+	g_return_val_if_fail (((height + vertical_padding) <= img_info->height), NULL);
 
-	*thumb_size = img_info->width * img_info->height * 2;
+        if ((img_info->align_row_bytes) && ((img_info->width % 2) != 0)) {
+            /* each pixel is 2 bytes, to align rows on 4 bytes boundaries,
+             * width must be a multiple of 2 */
+            dest_width = img_info->width + 1;
+        } else {
+            dest_width = img_info->width;
+        }
+
+	/* Make sure thumb size calculation won't overflow */
+	g_return_val_if_fail (dest_width != 0, NULL);
+	g_return_val_if_fail (dest_width < G_MAXUINT/2, NULL);
+	g_return_val_if_fail (img_info->height < G_MAXUINT/(2*dest_width), NULL);
+	*thumb_size = dest_width * img_info->height * 2;
 	result = g_malloc0 (*thumb_size);
 
 	byte_order = itdb_thumb_get_byteorder (img_info->format);
 
+        for (h = 0; h < vertical_padding; h++) {
+            gint w;
+            gint line = h * dest_width;
+
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_555_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+            line += (height+vertical_padding)*dest_width;
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_555_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+        }
+
 	for (h = 0; h < height; h++) {
-	        gint line = (h+vertical_padding)*img_info->width;
-		for (w = 0; w < width; w++) {
-			gint r;
-			gint g;
-			gint b;
-			gint a;
+            gint line = (h+vertical_padding)*dest_width;
+            gint w;
+            for (w = 0; w < dest_width; w++) {
+                guint16 packed_pixel;
+                if (w < horizontal_padding) {
+                    packed_pixel = get_RGB_555_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else if (w >= horizontal_padding+width) {
+                    packed_pixel = get_RGB_555_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else {
+                    guchar *cur_pixel;
 
-			r = pixels[h*row_stride + w*channels];
-			g = pixels[h*row_stride + w*channels + 1]; 
-			b = pixels[h*row_stride + w*channels + 2]; 
-
-			r >>= (8 - RED_BITS_555);
-			g >>= (8 - GREEN_BITS_555);
-			b >>= (8 - BLUE_BITS_555);
-			a = (1 << ALPHA_SHIFT_555) & ALPHA_MASK_555;
-			r = (r << RED_SHIFT_555) & RED_MASK_555;
-			g = (g << GREEN_SHIFT_555) & GREEN_MASK_555;
-			b = (b << BLUE_SHIFT_555) & BLUE_MASK_555;
-			result[line + w + horizontal_padding] =
-			    get_gint16 (a | r | g | b, byte_order);
-			/* I'm not sure if the highest bit really is
-			   the alpha channel. For now I'm just setting
-			   this bit because that's what I have seen. */
-		}
+                    cur_pixel = &pixels[h*row_stride +
+					(w-horizontal_padding)*channels];
+                    packed_pixel = get_RGB_555_pixel (cur_pixel, byte_order,
+                                                      FALSE);
+                }
+                result[line + w] = packed_pixel;
+            }
 	}
 	return result;
 }
 
+static guint16 get_RGB_888_pixel (const guchar *pixel, gint byte_order,
+                                  gboolean has_alpha)
+{
+    gint r;
+    gint g;
+    gint b;
+    gint a;
 
+    r = pixel[0];
+    g = pixel[1];
+    b = pixel[2];
+    if (has_alpha) {
+        a = pixel[3];
+    } else {
+        /* I'm not sure if the highest bit really is the alpha channel. 
+         * For now I'm just setting this bit because that's what I have seen. */
+        a = 0xff; 
+    }
+    r >>= (8 - RED_BITS_888);
+    g >>= (8 - GREEN_BITS_888);
+    b >>= (8 - BLUE_BITS_888);
+    r = (r << RED_SHIFT_888) & RED_MASK_888;
+    g = (g << GREEN_SHIFT_888) & GREEN_MASK_888;
+    b = (b << BLUE_SHIFT_888) & BLUE_MASK_888;
+    a = (a << ALPHA_SHIFT_888) & ALPHA_MASK_888;
+
+    return get_gint32 (a | r | g | b, byte_order);
+}
+
 static guint16 *
 pack_RGB_888 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
 	      gint horizontal_padding, gint vertical_padding,
@@ -190,7 +315,6 @@
 	gint channels;
 	gint width;
 	gint height;
-	gint w;
 	gint h;
 	gint byte_order;
 
@@ -198,41 +322,55 @@
 		      "rowstride", &row_stride, "n-channels", &channels,
 		      "height", &height, "width", &width,
 		      "pixels", &pixels, NULL);
+	g_return_val_if_fail (((width + horizontal_padding) <= img_info->width), NULL);
+	g_return_val_if_fail (((height + vertical_padding) <= img_info->height), NULL);
 	g_return_val_if_fail ((width <= img_info->width) && (height <= img_info->height), NULL);
-	/* dst_width and dst_height come from a width/height database 
-	 * hardcoded in libipoddevice code, so dst_width * dst_height * 2 can't
-	 * overflow, even on an iPod containing malicious data
-	 */
+
+	/* Make sure thumb size calculation won't overflow */
+	g_return_val_if_fail (img_info->width != 0, NULL);
+	g_return_val_if_fail (img_info->width < G_MAXUINT/4, NULL);
+	g_return_val_if_fail (img_info->height < G_MAXUINT/(4*img_info->width), NULL);
 	*thumb_size = img_info->width * img_info->height * 4;
 	result = g_malloc0 (*thumb_size);
 
 	byte_order = itdb_thumb_get_byteorder (img_info->format);
 
+        for (h = 0; h < vertical_padding; h++) {
+            gint w;
+            gint line = h * img_info->width;
+
+            for (w = 0 ; w < img_info->width; w++) {
+                result[line + w] = get_RGB_888_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+            line += (height+vertical_padding)*img_info->width;
+            for (w = 0 ; w < img_info->width; w++) {
+                result[line + w] = get_RGB_888_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+        }
+
 	for (h = 0; h < height; h++) {
-	        gint line = (h+vertical_padding)*img_info->width;
-		for (w = 0; w < width; w++) {
-			guint32 r;
-			guint32 g;
-			guint32 b;
-			guint32 a;
+            gint line = (h+vertical_padding)*img_info->width;
+            gint w;
+            for (w = 0; w < img_info->width; w++) {
+                guint16 packed_pixel;
+                if (w < horizontal_padding) {
+                    packed_pixel = get_RGB_888_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else if (w >= horizontal_padding+width) {
+                    packed_pixel = get_RGB_888_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else {
+                    guchar *cur_pixel;
 
-			r = pixels[h*row_stride + w*channels];
-			g = pixels[h*row_stride + w*channels + 1]; 
-			b = pixels[h*row_stride + w*channels + 2]; 
-
-			r >>= (8 - RED_BITS_888);
-			g >>= (8 - GREEN_BITS_888);
-			b >>= (8 - BLUE_BITS_888);
-			a = (0xff << ALPHA_SHIFT_888) & ALPHA_MASK_888;
-			r = (r << RED_SHIFT_888) & RED_MASK_888;
-			g = (g << GREEN_SHIFT_888) & GREEN_MASK_888;
-			b = (b << BLUE_SHIFT_888) & BLUE_MASK_888;
-			result[line + w + horizontal_padding] =
-			    get_gint32 (a | r | g | b, byte_order);
-			/* I'm not sure if the highest bit really is
-			   the alpha channel. For now I'm just setting
-			   these bits because that's what I have seen. */
-		}
+                    cur_pixel = &pixels[h*row_stride +
+					(w-horizontal_padding)*channels];
+                    packed_pixel = get_RGB_888_pixel (cur_pixel, byte_order,
+                                                      FALSE);
+                }
+                result[line + w] = packed_pixel;
+            }
 	}
 	return (guint16 *)result;
 }
@@ -245,7 +383,12 @@
 
     if (pixels_s == NULL)
     {
+	g_return_val_if_fail (width != 0, NULL);
+	g_return_val_if_fail (width < G_MAXUINT/sizeof (guint16), NULL);
+	g_return_val_if_fail (height < G_MAXUINT/(sizeof (guint16)*width), NULL);
+
 	pixels_s = g_malloc0 (sizeof (guint16)*width*height);
+
     }
 
     if (width == 1)
@@ -289,9 +432,15 @@
 
     if (pixels)
     {
+        gint row_stride;
+        if ((img_info->align_row_bytes) && ((img_info->width % 2) != 0)) {
+            row_stride = img_info->width + 1;
+        } else {
+            row_stride = img_info->width;
+        }
 	deranged_pixels = derange_pixels (NULL, pixels,
 					  img_info->width, img_info->height,
-					  img_info->width);
+					  row_stride);
 	g_free (pixels);
     }
 
@@ -309,7 +458,7 @@
     gint rowstride;
     gint h, z;
     guchar *pixels, *yuvdata;
-    gint yuvsize, halfyuv;
+    guint yuvsize, halfyuv;
     gint ustart, vstart;
 
     g_return_val_if_fail (img_info, NULL);
@@ -332,6 +481,11 @@
 		  "rowstride", &rowstride,
 		  "pixels", &pixels, NULL);
 
+    /* Make sure yuvsize calculation won't overflow */
+    g_return_val_if_fail (height != 0, NULL);
+    g_return_val_if_fail (height < G_MAXUINT/2, NULL);
+    g_return_val_if_fail (width < G_MAXUINT/(2*height), NULL);
+
     halfyuv = width*height;
 
     yuvsize = 2*halfyuv;
@@ -391,7 +545,7 @@
     gint h = 0;
     gint r0, g0, b0, r1, g1, b1, r2, g2, b2, r3, g3, b3;
     gint rowstride;
-    gint yuvsize, halfyuv;
+    guint yuvsize, halfyuv;
     gint alphabit, rgbpx;
     gint exc;
 
@@ -416,6 +570,11 @@
 		  "rowstride", &rowstride,
 		  "pixels", &pixels, NULL);
 
+    /* Make sure yuvsize calculation won't overflow */
+    g_return_val_if_fail (height != 0, NULL);
+    g_return_val_if_fail (height < G_MAXUINT/2, NULL);
+    g_return_val_if_fail (width < G_MAXUINT/(2*height), NULL);
+
     yuvsize = width*2*height;
 
     yuvdata = g_malloc (yuvsize);
@@ -480,10 +639,23 @@
     return yuvdata;
 }
 
+static char *get_ithmb_filename (iThumbWriter *writer)
+{
+    switch (writer->db_type) {
+        case DB_TYPE_ITUNES:
+            return g_strdup_printf (":F%d_%d.ithmb", 
+	        		    writer->img_info->format_id,
+                                    writer->current_file_index);
+        case DB_TYPE_PHOTO:
+            return g_strdup_printf (":Thumbs:F%d_%d.ithmb", 
+	            		    writer->img_info->format_id,
+                                    writer->current_file_index);
+    }
+    g_return_val_if_reached (NULL);
+}
 
-
 static char *
-ipod_image_get_ithmb_filename (const char *mount_point, gint correlation_id, gint index, DbType db_type ) 
+ipod_image_get_ithmb_filename (const char *mount_point, gint format_id, gint index, DbType db_type ) 
 {
 	gchar *artwork_dir = NULL, *filename, *buf;
 
@@ -538,7 +710,7 @@
 	}
 	}
 
-	buf = g_strdup_printf ("F%d_%d.ithmb", correlation_id, index);
+	buf = g_strdup_printf ("F%d_%d.ithmb", format_id, index);
 
 	filename = itdb_get_path (artwork_dir, buf);
 
@@ -554,252 +726,208 @@
 	return filename;
 }
 
+/* If appropriate, rotate thumb->pixbuf by the value specified in
+ * thumb->rotation or thumb->pixbuf's EXIF orientation value. */
+static GdkPixbuf *
+ithumb_writer_handle_rotation (GdkPixbuf *pixbuf, guint *rotation)
+{
+  /* If the caller did not specify a rotation, and there is an orientation header
+     present in the pixbuf (from EXIF), use that to choose a rotation.
+     NOTE: Do this before doing any transforms on the pixbuf, or you will lose
+     the EXIF metadata.
+     List of orientation values: http://sylvana.net/jpegcrop/exif_orientation.html */
+  if (*rotation == 0) {
+    /* In GdkPixbuf 2.12 or above, this returns the EXIF orientation value. */
+    const char* exif_orientation = gdk_pixbuf_get_option(pixbuf, "orientation");
+    if (exif_orientation != NULL) {
+      switch (exif_orientation[0]) {
+	case '3':
+	  *rotation = 180;
+          break;
+	case '6':
+	  *rotation = 270;
+          break;
+	case '8':
+	  *rotation = 90;
+          break;
+	/* '1' means no rotation.  The other four values are all various
+	   transpositions, which are rare in real photos so we don't
+	   implement them. */
+      }
+    }
+  }
 
+  /* Rotate if necessary */
+  if (*rotation != 0)
+  {
+      return gdk_pixbuf_rotate_simple (pixbuf, *rotation);
+  }
+  return g_object_ref (G_OBJECT (pixbuf));
+}
 
-static gboolean
-ithumb_writer_write_thumbnail (iThumbWriter *writer, 
-			       Itdb_Thumb *thumb)
+/* On the iPhone, thumbnails are presented as squares in a grid.
+   In order to fit the grid, they have to be cropped as well as
+   scaled. */
+static GdkPixbuf *
+ithumb_writer_scale_and_crop (GdkPixbuf *input_pixbuf,
+                              gint width, gint height,
+                              gboolean crop)
 {
-    GdkPixbuf *pixbuf = NULL;
-    void *pixels = NULL;
-    gint width, height; /* must be gint -- see comment below */
+    gint input_width, input_height;
+    double width_scale, height_scale;
+    gdouble scale;
+    gint offset_x, offset_y;
+    gint border_width = 0;
 
-    g_return_val_if_fail (writer, FALSE);
-    g_return_val_if_fail (writer->img_info, FALSE);
-    g_return_val_if_fail (thumb, FALSE);
+    GdkPixbuf *output_pixbuf;
 
-    /* Make sure @rotation is valid (0, 90, 180, 270) */
-    thumb->rotation = thumb->rotation % 360;
-    thumb->rotation /= 90;
-    thumb->rotation *= 90;
+    g_object_get (G_OBJECT (input_pixbuf), 
+		  "width", &input_width,
+		  "height", &input_height,
+		  NULL);
 
-    /* If we rotate by 90 or 270 degrees interchange the width and
-     * height */
+    width_scale = (double) width / input_width;
+    height_scale = (double) height / input_height;
 
-    if ((thumb->rotation == 0) || (thumb->rotation == 180))
+    if (!crop)
     {
-	width = writer->img_info->width;
-	height = writer->img_info->height;
-    }
-    else
-    {
-	width = writer->img_info->height;
-	height = writer->img_info->width;
-    }
+      guint scaled_height;
+      guint scaled_width;
 
-    if (thumb->filename)
-    {   /* read image from filename */
-	pixbuf = gdk_pixbuf_new_from_file_at_size (thumb->filename, 
-						   width, height,
-						   NULL);
+      if (width_scale < height_scale) {
+	scaled_width = width;
+	scaled_height = MIN (ceil (input_height*width_scale), height);
+      } else if (width_scale > height_scale) {
+	scaled_width =MIN (ceil (input_width*height), width);
+	scaled_height = height;
+      } else {
+	scaled_width = width;
+	scaled_height = height;
+      }
+	
+      return gdk_pixbuf_scale_simple (input_pixbuf,
+				      scaled_width, scaled_height,
+				      GDK_INTERP_BILINEAR);
+    } else {
+      double scaled_width, scaled_height;
+      /* If we are cropping, we use the max of the two possible scale factors,
+         so that the image is large enough to fill both dimensions. */
+      scale = MAX(width_scale, height_scale);
 
-	g_free (thumb->filename);
-	thumb->filename = NULL;
-    }
-    else if (thumb->image_data)
-    {   /* image data is stored in image_data and image_data_len */
-	GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
-	g_return_val_if_fail (loader, FALSE);
-	gdk_pixbuf_loader_set_size (loader,
-				    width, height);
-	gdk_pixbuf_loader_write (loader,
-				 thumb->image_data,
-				 thumb->image_data_len,
-				 NULL);
-	gdk_pixbuf_loader_close (loader, NULL);
-	pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
-	if (pixbuf)
-	    g_object_ref (pixbuf);
-	g_object_unref (loader);
+      /* In order to crop the image, we shift it either left or up by
+	 a certain amount.  Note that the offset args to gdk_pixbuf_scale are
+	 expressed in terms of the *output* pixbuf, not the input, so we scal the
+	 offsets.  Here we figure out whether this is a vertical or horizontal
+	 offset. */
+      scaled_width = input_width * scale;
+      scaled_height = input_height * scale;
+      offset_x = round((width - scaled_width) / 2);
+      offset_y = round((height - scaled_height) / 2);
 
-	g_free (thumb->image_data);
-	thumb->image_data = NULL;
-	thumb->image_data_len = 0;
-    }
-    else if (thumb->pixbuf)
-    {
-        pixbuf = gdk_pixbuf_scale_simple (GDK_PIXBUF(thumb->pixbuf),
-                                          width, height,
-                                          GDK_INTERP_BILINEAR);
-        g_object_unref (thumb->pixbuf);
-        thumb->pixbuf = NULL;
-    }
+      g_assert(round(scaled_width) == width ||
+	       round(scaled_height) == height);
 
-    if (pixbuf == NULL)
-    {
-	/* This is quite bad... if we just return FALSE the ArtworkDB
-	   gets messed up. */
-	pixbuf = gdk_pixbuf_from_pixdata (&questionmark_pixdata, FALSE, NULL);
+      output_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
+				     width + border_width,
+				     height + border_width);
+      gdk_pixbuf_fill(output_pixbuf, 0xffffffff);
 
-	if (pixbuf)
-	{
-	    GdkPixbuf *pixbuf2;
-	    pixbuf2 = gdk_pixbuf_scale_simple (pixbuf,
-					       writer->img_info->width,
-					       writer->img_info->height,
-					       GDK_INTERP_BILINEAR);
-	    g_object_unref (pixbuf);
-	    pixbuf = pixbuf2;
-	}
-	else
-	{
-	    /* Somethin went wrong. let's insert a red thumbnail */
-	    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
-				     writer->img_info->width,
-				     writer->img_info->height);
-	    gdk_pixbuf_fill (pixbuf, 0xff000000);
-	}
-	/* avoid rotation */
-	thumb->rotation = 0;
-    }
+      gdk_pixbuf_scale (input_pixbuf,
+                        output_pixbuf,
+                        0, 0,			 /* dest x, dest y */
+                        width,                     /* dest width */
+                        height,                    /* dest height */
+                        offset_x, offset_y,        /* offset x, offset y */
+                        scale, scale,	         /* scale x, scale y */
+                        GDK_INTERP_BILINEAR);
 
-    /* Rotate if necessary */
-    if (thumb->rotation != 0)
-    {
-	GdkPixbuf *new_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, thumb->rotation);
-	g_object_unref (pixbuf);
-	pixbuf = new_pixbuf;
-	/* Clean up */
-	thumb->rotation = 0;
+      return output_pixbuf;
     }
+}
 
-    /* !! cannot write directly to &thumb->width/height because
-       g_object_get() returns a gint, but thumb->width/height are
-       gint16 !! */
-    g_object_get (G_OBJECT (pixbuf), 
-		  "width", &width,
-		  "height", &height,
-		  NULL);
+static GdkPixbuf *
+ithumb_writer_handle_pixbuf_transform (iThumbWriter *writer, 
+                                       GdkPixbuf *pixbuf, guint rotation)
+{
+    GdkPixbuf *rotated_pixbuf;
+    GdkPixbuf *scaled_pixbuf;
 
-    switch (thumb->type)
-    {
-    case ITDB_THUMB_PHOTO_LARGE:
-    case ITDB_THUMB_PHOTO_SMALL:
-    case ITDB_THUMB_PHOTO_FULL_SCREEN:
-    case ITDB_THUMB_PHOTO_TV_SCREEN:
-	thumb->filename = g_strdup_printf (":Thumbs:F%d_%d.ithmb", 
-					   writer->img_info->correlation_id,
-					   writer->current_file_index);
-	break;
-    case ITDB_THUMB_COVER_LARGE:
-    case ITDB_THUMB_COVER_SMALL:
-    case ITDB_THUMB_COVER_XLARGE:
-    case ITDB_THUMB_COVER_MEDIUM:
-    case ITDB_THUMB_COVER_SMEDIUM:
-    case ITDB_THUMB_COVER_XSMALL:
-	thumb->filename = g_strdup_printf (":F%d_%d.ithmb", 
-					   writer->img_info->correlation_id,
-					   writer->current_file_index);
-	break;
-    }
+    rotated_pixbuf = ithumb_writer_handle_rotation (pixbuf, &rotation);
 
-    switch (writer->db_type)
-    {
-    case DB_TYPE_PHOTO:
-	thumb->horizontal_padding = (writer->img_info->width - width)/2;
-	thumb->vertical_padding = (writer->img_info->height - height)/2;
-	break;
-    case DB_TYPE_ITUNES:
-	/* IPOD_COVER_LARGE will be centered automatically using
-	   the info in mhni->width/height. Free space around
-	   IPOD_COVER_SMALL will be used to display track
-	   information -> no padding (tested on iPod
-	   Nano). mhni->hor_/ver_padding is working */
-	thumb->horizontal_padding = 0;
-	thumb->vertical_padding = 0;
-	break;
-    default:
-	g_return_val_if_reached (FALSE);
-    }
+    scaled_pixbuf = ithumb_writer_scale_and_crop (rotated_pixbuf,
+						  writer->img_info->width,
+						  writer->img_info->height,
+                                                  writer->img_info->crop);
+    g_object_unref (rotated_pixbuf);
+    rotated_pixbuf = NULL;
 
-    /* The thumbnail width/height is inclusive padding */
-    thumb->width = thumb->horizontal_padding + width;
-    thumb->height = thumb->vertical_padding + height;
-    thumb->offset = writer->cur_offset;
+    return scaled_pixbuf;
+}
 
-    switch (writer->img_info->format)
-    {
-    case THUMB_FORMAT_RGB565_LE_90:
-    case THUMB_FORMAT_RGB565_BE_90:
-	/* FIXME: actually the previous two might require
-	   different treatment (used on iPod Photo for the full
-	   screen photo thumbnail) */
-    case THUMB_FORMAT_RGB565_LE:
-    case THUMB_FORMAT_RGB565_BE:
-	pixels = pack_RGB_565 (pixbuf, writer->img_info,
-			       thumb->horizontal_padding,
-			       thumb->vertical_padding,
-			       &thumb->size);
-	break;
-    case THUMB_FORMAT_RGB555_LE_90:
-    case THUMB_FORMAT_RGB555_BE_90:
-	/* FIXME: actually the previous two might require
-	   different treatment (used on iPod Photo for the full
-	   screen photo thumbnail) */
-    case THUMB_FORMAT_RGB555_LE:
-    case THUMB_FORMAT_RGB555_BE:
-	pixels = pack_RGB_555 (pixbuf, writer->img_info,
-			       thumb->horizontal_padding,
-			       thumb->vertical_padding,
-			       &thumb->size);
-	break;
-    case THUMB_FORMAT_RGB888_LE_90:
-    case THUMB_FORMAT_RGB888_BE_90:
-	/* FIXME: actually the previous two might require
-	   different treatment (used on iPod Photo for the full
-	   screen photo thumbnail) */
-    case THUMB_FORMAT_RGB888_LE:
-    case THUMB_FORMAT_RGB888_BE:
-	pixels = pack_RGB_888 (pixbuf, writer->img_info,
-			       thumb->horizontal_padding,
-			       thumb->vertical_padding,
-			       &thumb->size);
-	break;
-    case THUMB_FORMAT_REC_RGB555_LE_90:
-    case THUMB_FORMAT_REC_RGB555_BE_90:
-	/* FIXME: actually the previous two might require
-	   different treatment (used on iPod Photo for the full
-	   screen photo thumbnail) */
-    case THUMB_FORMAT_REC_RGB555_LE:
-    case THUMB_FORMAT_REC_RGB555_BE:
-	pixels = pack_rec_RGB_555 (pixbuf, writer->img_info,
-				   thumb->horizontal_padding,
-				   thumb->vertical_padding,
-				   &thumb->size);
-	break;
-    case THUMB_FORMAT_EXPERIMENTAL_LE:
-    case THUMB_FORMAT_EXPERIMENTAL_BE:
-	break;
-    case THUMB_FORMAT_UYVY_BE:
-    case THUMB_FORMAT_UYVY_LE:
-	pixels = pack_UYVY (pixbuf, writer->img_info,
-			    thumb->horizontal_padding,
-			    thumb->vertical_padding,
-	                    &thumb->size);
-	break;
-    case THUMB_FORMAT_I420_BE:
-    case THUMB_FORMAT_I420_LE:
-	pixels = pack_I420 (pixbuf, writer->img_info,
-			    thumb->horizontal_padding,
-			    thumb->vertical_padding,
-	                    &thumb->size);
-	break;
+static void *pack_thumbnail (iThumbWriter *writer, Itdb_Thumb_Ipod_Item *thumb,
+                             GdkPixbuf *pixbuf)
+{
+    typedef void *(*PackerFunc)(GdkPixbuf *pixbuf,
+                                const Itdb_ArtworkFormat *img_info,
+                                gint horizontal_padding, gint vertical_padding,
+                                guint32 *thumb_size);
+    struct Packer {
+        ItdbThumbFormat format;
+        PackerFunc packer;
+    };
+    guint i;
+    const struct Packer packers[] = {
+        { THUMB_FORMAT_RGB565_LE_90,     (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB565_BE_90,     (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB565_LE,        (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB565_BE,        (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB555_LE_90,     (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB555_BE_90,     (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB555_LE,        (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB555_BE,        (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB888_LE_90,     (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_RGB888_BE_90,     (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_RGB888_LE,        (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_RGB888_BE,        (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_REC_RGB555_LE_90, (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_REC_RGB555_BE_90, (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_REC_RGB555_LE,    (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_REC_RGB555_BE,    (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_EXPERIMENTAL_LE,  NULL },
+        { THUMB_FORMAT_EXPERIMENTAL_BE,  NULL },
+        { THUMB_FORMAT_UYVY_BE,          (PackerFunc)pack_UYVY },
+        { THUMB_FORMAT_UYVY_LE,          (PackerFunc)pack_UYVY },
+        { THUMB_FORMAT_I420_BE,          (PackerFunc)pack_I420 },
+        { THUMB_FORMAT_I420_LE,          (PackerFunc)pack_I420 }
+    };
+
+    for (i = 0; i < G_N_ELEMENTS (packers); i++) {
+        if (packers[i].format == writer->img_info->format) {
+            break;
+        }
     }
 
+    if ((i == G_N_ELEMENTS (packers)) || (packers[i].packer == NULL)) {
+        return NULL;
+    }
+    return packers[i].packer (pixbuf, writer->img_info,
+                              thumb->horizontal_padding,
+                              thumb->vertical_padding,
+                              &thumb->size);
+}
 
-    g_object_unref (G_OBJECT (pixbuf));
-
+static gboolean write_pixels (iThumbWriter *writer, Itdb_Thumb_Ipod_Item *thumb,
+                              void *pixels)
+{
     if (pixels == NULL)
     {
 	return FALSE;
     }
 
     if (fwrite (pixels, thumb->size, 1, writer->f) != 1) {
-	g_free (pixels);
 	g_print ("Error writing to file: %s\n", strerror (errno));
 	return FALSE;
     }
-    g_free (pixels);
     writer->cur_offset += thumb->size;
 
     if (writer->img_info->padding != 0)
@@ -822,6 +950,136 @@
     return TRUE;
 }
 
+static void set_thumb_padding (iThumbWriter *writer, 
+                               Itdb_Thumb_Ipod_Item *thumb, 
+                               gint width, gint height)
+{
+    switch (writer->db_type)
+    {
+    case DB_TYPE_PHOTO:
+	thumb->horizontal_padding = (writer->img_info->width - width)/2;
+	thumb->vertical_padding = (writer->img_info->height - height)/2;
+	break;
+    case DB_TYPE_ITUNES:
+	thumb->horizontal_padding = 0;
+	thumb->vertical_padding = 0;
+	break;
+    default:
+	g_return_if_reached ();
+    }
+}
+
+static GdkPixbuf *pixbuf_from_image_data (guchar *image_data, gsize len)
+{
+    GdkPixbuf *pixbuf;
+    GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
+    g_return_val_if_fail (loader, FALSE);
+    gdk_pixbuf_loader_write (loader, image_data, len, NULL);
+    gdk_pixbuf_loader_close (loader, NULL);
+    pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+    if (pixbuf)
+        g_object_ref (pixbuf);
+    g_object_unref (loader);
+
+    return pixbuf;
+}
+
+static Itdb_Thumb_Ipod_Item *
+ithumb_writer_write_thumbnail (iThumbWriter *writer, 
+			       Itdb_Thumb *thumb)
+{
+    GdkPixbuf *pixbuf = NULL;
+    void *pixels = NULL;
+    gint width, height; /* must be gint -- see comment below */
+    Itdb_Thumb_Ipod_Item *thumb_ipod;
+    GdkPixbuf *scaled_pixbuf;
+    gboolean result;
+
+    g_return_val_if_fail (writer, NULL);
+    g_return_val_if_fail (writer->img_info, NULL);
+    g_return_val_if_fail (thumb, NULL);
+
+    /* An thumb can start with one of:
+        1. a filename
+        2. raw image data read from a file
+        3. a GdkPixbuf struct
+       In case 1 and 2, we load the relevant data into a GdkPixbuf and proceed
+       with case 3.
+    */
+    if (thumb->data_type == ITDB_THUMB_TYPE_FILE)
+    {   
+        Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+	pixbuf = gdk_pixbuf_new_from_file (thumb_file->filename, NULL);
+    } 
+    else if (thumb->data_type == ITDB_THUMB_TYPE_MEMORY)
+    {  
+        Itdb_Thumb_Memory *thumb_mem = (Itdb_Thumb_Memory *)thumb;
+        pixbuf = pixbuf_from_image_data (thumb_mem->image_data, 
+                                         thumb_mem->image_data_len);
+    }
+    else if (thumb->data_type == ITDB_THUMB_TYPE_PIXBUF)
+    {
+        Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf *)thumb;
+        pixbuf = g_object_ref (G_OBJECT (thumb_pixbuf->pixbuf));
+    }
+
+    if (pixbuf == NULL)
+    {
+	/* This is quite bad... if we just return FALSE the ArtworkDB
+	   gets messed up. */
+	pixbuf = gdk_pixbuf_from_pixdata (&questionmark_pixdata, FALSE, NULL);
+
+	if (!pixbuf)
+	{
+	    /* Somethin went wrong. let's insert a red thumbnail */
+	    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
+				     writer->img_info->width,
+				     writer->img_info->height);
+	    gdk_pixbuf_fill (pixbuf, 0xff000000);
+	}
+	/* avoid rotation */
+        itdb_thumb_set_rotation (thumb, 0);
+    }
+
+    g_assert(pixbuf);
+
+    scaled_pixbuf = ithumb_writer_handle_pixbuf_transform (writer, pixbuf, itdb_thumb_get_rotation (thumb));
+    g_object_unref (pixbuf);
+    pixbuf = NULL;
+
+    /* !! cannot write directly to &thumb->width/height because
+       g_object_get() returns a gint, but thumb->width/height are
+       gint16 !! */
+    g_object_get (G_OBJECT (scaled_pixbuf), 
+		  "width", &width,
+		  "height", &height,
+		  NULL);
+
+    thumb_ipod = itdb_thumb_new_item_from_ipod (writer->img_info);
+    g_assert (thumb_ipod != NULL);
+
+    set_thumb_padding (writer, thumb_ipod, width, height);
+
+    /* The thumbnail width/height is inclusive padding */
+    thumb_ipod->width = thumb_ipod->horizontal_padding + width;
+    thumb_ipod->height = thumb_ipod->vertical_padding + height;
+    thumb_ipod->offset = writer->cur_offset;
+
+    pixels = pack_thumbnail (writer, thumb_ipod, scaled_pixbuf);
+    g_object_unref (G_OBJECT (scaled_pixbuf));
+
+    thumb_ipod->filename = get_ithmb_filename (writer);
+    result = write_pixels (writer, thumb_ipod, pixels);
+    g_free (pixels);
+
+    if (result == FALSE) {
+        itdb_thumb_free ((Itdb_Thumb*)thumb_ipod);
+        return NULL;
+    }
+
+    return thumb_ipod;
+}
+
 static gboolean
 ithumb_writer_update (iThumbWriter *writer)
 {
@@ -840,7 +1098,7 @@
 
 	writer->filename =
 	    ipod_image_get_ithmb_filename (writer->mountpoint, 
-					   writer->img_info->correlation_id,
+					   writer->img_info->format_id,
 					   writer->current_file_index, 
 					   writer->db_type);
 	if (writer->filename == NULL)
@@ -864,22 +1122,24 @@
 
 
 static void
-write_thumbnail (gpointer _writer, gpointer _artwork)
+write_thumbnail (iThumbWriter *writer, 
+                 Itdb_Artwork *artwork, 
+                 Itdb_Thumb_Ipod *thumb_ipod)
 {
-	iThumbWriter *writer = _writer;
-	Itdb_Artwork *artwork = _artwork;
- 	Itdb_Thumb *thumb;
+        g_assert (artwork->thumbnail->data_type != ITDB_THUMB_TYPE_IPOD);
 
-	thumb = itdb_artwork_get_thumb_by_type (artwork,
-						writer->img_info->type);
-
-	/* size == 0 indicates a thumbnail not yet written to the
-	   thumbnail file */
-	if (thumb && (thumb->size == 0))
+	if (artwork->thumbnail)
 	{
 	    /* check if new thumbnail file has to be started */
-	    if (ithumb_writer_update (writer))
-		ithumb_writer_write_thumbnail (writer, thumb);
+	    if (ithumb_writer_update (writer)) {
+                Itdb_Thumb_Ipod_Item *item;
+                item = ithumb_writer_write_thumbnail (writer, 
+                                                      artwork->thumbnail);
+                if (item != NULL) {
+                    itdb_thumb_ipod_add (thumb_ipod, item);
+                }
+
+            }
 	}
 }
 
@@ -928,10 +1188,10 @@
 	return writer;
 }
 
-gint offset_sort (gconstpointer a, gconstpointer b);
-gint offset_sort (gconstpointer a, gconstpointer b)
+static gint offset_sort (gconstpointer a, gconstpointer b);
+static gint offset_sort (gconstpointer a, gconstpointer b)
 {
-    return (-(((Itdb_Thumb *)a)->offset - ((Itdb_Thumb *)b)->offset));
+    return (-(((Itdb_Thumb_Ipod_Item *)a)->offset - ((Itdb_Thumb_Ipod_Item *)b)->offset));
 }
 
 static gboolean ithumb_rearrange_thumbnail_file (gpointer _key,
@@ -966,7 +1226,7 @@
     /* check if all thumbnails have the same size */
     for (gl=thumbs; gl; gl=gl->next)
     {
-	Itdb_Thumb *img = gl->data;
+	Itdb_Thumb_Ipod_Item *img = gl->data;
 
 	if (size == 0)
 	    size = img->size;
@@ -1018,7 +1278,7 @@
     /* check each thumbnail slot */
     for (offset=0; gl && (offset<statbuf.st_size); offset+=size)
     {
-	Itdb_Thumb *thumb = gl->data;
+	Itdb_Thumb_Ipod_Item *thumb = gl->data;
 	g_return_val_if_fail (thumb, FALSE);
 
 	/* Try to find a thumbnail that uses this slot */
@@ -1038,7 +1298,7 @@
 	    /* did not find a thumbnail with matching offset -> copy
 	       data from last slot (== first element) */
 	    GList *first_gl = g_list_first (thumbs);
-	    Itdb_Thumb *first_thumb = first_gl->data;
+	    Itdb_Thumb_Ipod_Item *first_thumb = first_gl->data;
 	    guint32 first_offset;
 
 	    g_return_val_if_fail (first_thumb, FALSE);
@@ -1123,7 +1383,7 @@
 
    To avoid the need to read large amounts from the iPod and back, or
    have to large files exist on the iPod (reading from the original
-   thumbnail fail and writing to the new thumbnail file), the
+   thumbnail file and writing to the new thumbnail file), the
    modifications are done in place.
 
    It is assumed that all thumbnails have the same data size. If not,
@@ -1131,7 +1391,7 @@
 
    If a thumbnail has been removed, a slot in the file is opened. This
    slot is filled by copying data from the end of the file and
-   adjusting the corresponding Itdb_Image offset pointer. When all
+   adjusting the corresponding Itdb_Thumb offset pointer. When all
    slots are filled, the file is truncated to the new length.
 */
 static gboolean
@@ -1165,46 +1425,62 @@
 	case DB_TYPE_ITUNES:
 		for (gl=db_get_itunesdb(db)->tracks; gl; gl=gl->next)
 		{
-			Itdb_Thumb *thumb;
-			Itdb_Track *track = gl->data;
+		        Itdb_Thumb *thumb;
+                        Itdb_Track *track = gl->data;
+
 			g_return_val_if_fail (track, FALSE);
-
-			thumb = itdb_artwork_get_thumb_by_type (track->artwork,
-					info->type);
-			if (thumb && thumb->filename && (thumb->size != 0))
-			{
-				filename = itdb_thumb_get_filename (
+			g_return_val_if_fail (track->artwork, FALSE);
+			thumb = track->artwork->thumbnail;
+                        if (!itdb_track_has_thumbnails (track)) {
+			    /* skip: track has no thumbnails */
+                            continue;
+                        }
+			if (track->artwork->dbid == 0) {
+			    /* skip: sparse artwork, has already been
+			       written */
+			    continue;
+			}
+                        if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
+                            Itdb_Thumb_Ipod_Item *item;
+                            item = itdb_thumb_ipod_get_item_by_type (thumb,
+                                                                     info);
+                            if (item) {
+				filename = itdb_thumb_ipod_get_filename (
 				        db_get_device(db),
-				        thumb);
+				        item);
 				if (filename)
 				{
 					thumbs = g_hash_table_lookup (filenamehash, filename);
-					thumbs = g_list_append (thumbs, thumb);
+					thumbs = g_list_append (thumbs, item);
 					g_hash_table_insert (filenamehash, filename, thumbs);
 				}
-			}
-		}
+                            }
+                        }
+                }
 		break;
     case DB_TYPE_PHOTO:
 	for (gl=db_get_photodb(db)->photos; gl; gl=gl->next)
 	{
-		Itdb_Thumb *thumb;
 		Itdb_Artwork *artwork = gl->data;
-
-		thumb = itdb_artwork_get_thumb_by_type (artwork,
-				info->type);
-		if (thumb && thumb->filename && (thumb->size != 0))
-		{
-			filename = itdb_thumb_get_filename (
-			        db_get_device (db),
-			        thumb);
+		Itdb_Thumb *thumb = artwork->thumbnail;
+                if (thumb == NULL) {
+                    continue;
+                }
+                if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
+                    Itdb_Thumb_Ipod_Item *item;
+                    item = itdb_thumb_ipod_get_item_by_type (thumb, info);
+                    if (item) 
+                    {
+			filename = itdb_thumb_ipod_get_filename (
+			        db_get_device (db), item);
 			if (filename)
 			{
 				thumbs = g_hash_table_lookup (filenamehash, filename);
-				thumbs = g_list_append (thumbs, thumb);
+				thumbs = g_list_append (thumbs, item);
 				g_hash_table_insert (filenamehash, filename, thumbs);
 			}
-		}
+                    } 
+                }
 	}
 	break;
     default:
@@ -1217,7 +1493,7 @@
     for (i=0; i<50; ++i)
     {
 	filename = ipod_image_get_ithmb_filename (mountpoint,
-						  info->correlation_id,
+						  info->format_id,
 						  i,
 						  db->db_type);
 	if (g_file_test (filename, G_FILE_TEST_EXISTS))
@@ -1254,9 +1530,9 @@
 {
 #ifdef HAVE_GDKPIXBUF
 	GList *writers;
-	GList *it;
 	Itdb_Device *device;
-	const Itdb_ArtworkFormat *format;
+        GList *formats;
+        GList *it;
 	const gchar *mount_point;
 
 	g_return_val_if_fail (db, -1);
@@ -1269,27 +1545,29 @@
 	if (mount_point == NULL)
 	    return -1;
 	
-	format = itdb_device_get_artwork_formats (device);
-	if (format == NULL) {
-		return -1;
-	}
+        formats = NULL;
+        switch (db->db_type) {
+        case DB_TYPE_ITUNES:
+            formats = itdb_device_get_cover_art_formats(db_get_device(db));
+            break;
+	case DB_TYPE_PHOTO:
+            formats = itdb_device_get_photo_formats(db_get_device(db));
+            break;
+        }
 	writers = NULL;
-	while (format->type != -1) {
+	for (it = formats; it != NULL; it = it->next) {
 		iThumbWriter *writer;
+                const Itdb_ArtworkFormat *format;
 
-		if (itdb_thumb_type_is_valid_for_db (format->type, db->db_type))
-		{
-		    ithmb_rearrange_existing_thumbnails (db, format );
-		    writer = ithumb_writer_new (mount_point, 
-						format,
-						db->db_type, 
-						device->byte_order);
-		    if (writer != NULL) {
-			writers = g_list_prepend (writers, writer);
-		    }
+                format = (const Itdb_ArtworkFormat *)it->data;
+                ithmb_rearrange_existing_thumbnails (db, format);
+                writer = ithumb_writer_new (mount_point, format,
+                                            db->db_type, device->byte_order);
+                if (writer != NULL) {
+                        writers = g_list_prepend (writers, writer);
 		}
-		format++;
 	}
+	g_list_free (formats);
 	if (writers == NULL) {
 		return -1;
 	}
@@ -1297,21 +1575,54 @@
 	case DB_TYPE_ITUNES:
 		for (it = db_get_itunesdb(db)->tracks; it != NULL; it = it->next) {
 			Itdb_Track *track;
+                        Itdb_Thumb_Ipod *thumb_ipod;
+                        ItdbThumbDataType type;
 
 			track = it->data;
 			g_return_val_if_fail (track, -1);
-
-			g_list_foreach (writers, write_thumbnail, track->artwork);
+                        if (!itdb_track_has_thumbnails (track)) {
+                            continue;
+                        }
+			if (track->artwork->dbid == 0) {
+			    /* Use sparse artwork -- already written
+			       elsewhere */
+			    continue;
+			}
+                        type = track->artwork->thumbnail->data_type;
+                        if (type != ITDB_THUMB_TYPE_IPOD) {
+                            GList *itw;
+                            thumb_ipod = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+                            for (itw = writers; itw != NULL; itw = itw->next) {
+                                write_thumbnail (itw->data,
+                                                 track->artwork,
+                                                 thumb_ipod);
+                            }
+                            itdb_thumb_free (track->artwork->thumbnail);
+                            track->artwork->thumbnail = (Itdb_Thumb *)thumb_ipod;
+                        }
 		}
 		break;
 	case DB_TYPE_PHOTO:
 		for (it = db_get_photodb(db)->photos; it != NULL; it = it->next) {
 			Itdb_Artwork *photo;
+                        Itdb_Thumb_Ipod *thumb_ipod;
+                        ItdbThumbDataType type;
 
 			photo = it->data;
 			g_return_val_if_fail (photo, -1);
-
-			g_list_foreach (writers, write_thumbnail, photo);
+                        if (photo->thumbnail == NULL) {
+                            continue;
+                        }
+                        type = photo->thumbnail->data_type;
+                        if (type != ITDB_THUMB_TYPE_IPOD) {
+			    GList *itw;
+                            thumb_ipod = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+                            for (itw = writers; itw != NULL; itw = itw->next) {
+                                write_thumbnail (itw->data, photo, thumb_ipod);
+                            }
+                            itdb_thumb_free (photo->thumbnail);
+                            photo->thumbnail = (Itdb_Thumb *)thumb_ipod;
+                        }
 		}
 		break;
 	default:

Modified: libgpod/trunk/tests/Makefile.am
===================================================================
--- libgpod/trunk/tests/Makefile.am	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/Makefile.am	2009-01-24 12:10:00 UTC (rev 341)
@@ -37,9 +37,17 @@
 
 test_firewire_id_SOURCES = test-fw-id.c
 
+test_sysinfo_extended_parsing_SOURCES = \
+	test-sysinfo-extended-parsing.c \
+	$(top_srcdir)/src/itdb_plist.c  \
+	$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+
+test_sysinfo_extended_parsing_LDADD =
+
 get_timezone_SOURCES = get-timezone.c
 
 noinst_PROGRAMS=test-itdb test-ls test-checksum test-firewire-id \
+		test-sysinfo-extended-parsing			 \
 	        $(TESTTHUMBS) $(TESTTAGLIB) $(TESTMISC)
 
 INCLUDES=$(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"

Modified: libgpod/trunk/tests/Makefile.in
===================================================================
--- libgpod/trunk/tests/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -14,15 +14,11 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +34,8 @@
 host_triplet = @host@
 noinst_PROGRAMS = test-itdb$(EXEEXT) test-ls$(EXEEXT) \
 	test-checksum$(EXEEXT) test-firewire-id$(EXEEXT) \
-	$(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
+	test-sysinfo-extended-parsing$(EXEEXT) $(am__EXEEXT_1) \
+	$(am__EXEEXT_2) $(am__EXEEXT_3)
 subdir = tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -80,6 +77,9 @@
 @HAVE_GDKPIXBUF_TRUE@	test_photos-test-photos.$(OBJEXT)
 test_photos_OBJECTS = $(am_test_photos_OBJECTS)
 test_photos_LDADD = $(LDADD)
+test_photos_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_photos_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am__test_rebuild_db_SOURCES_DIST = test-rebuild-db.cc
 @HAVE_TAGLIB_TRUE at am_test_rebuild_db_OBJECTS =  \
 @HAVE_TAGLIB_TRUE@	test_rebuild_db-test-rebuild-db.$(OBJEXT)
@@ -87,44 +87,65 @@
 am__DEPENDENCIES_1 =
 @HAVE_TAGLIB_TRUE at test_rebuild_db_DEPENDENCIES =  \
 @HAVE_TAGLIB_TRUE@	$(am__DEPENDENCIES_1)
+test_rebuild_db_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_test_sysinfo_extended_parsing_OBJECTS =  \
+	test-sysinfo-extended-parsing.$(OBJEXT) itdb_plist.$(OBJEXT) \
+	itdb_sysinfo_extended_parser.$(OBJEXT)
+test_sysinfo_extended_parsing_OBJECTS =  \
+	$(am_test_sysinfo_extended_parsing_OBJECTS)
+test_sysinfo_extended_parsing_DEPENDENCIES =
 am__test_thumbnails_SOURCES_DIST = test-covers.c
 @HAVE_GDKPIXBUF_TRUE at am_test_thumbnails_OBJECTS =  \
 @HAVE_GDKPIXBUF_TRUE@	test_thumbnails-test-covers.$(OBJEXT)
 test_thumbnails_OBJECTS = $(am_test_thumbnails_OBJECTS)
 test_thumbnails_LDADD = $(LDADD)
+test_thumbnails_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_thumbnails_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am__test_write_thumbnails_SOURCES_DIST = test-write-covers.c
 @HAVE_GDKPIXBUF_TRUE at am_test_write_thumbnails_OBJECTS = test_write_thumbnails-test-write-covers.$(OBJEXT)
 test_write_thumbnails_OBJECTS = $(am_test_write_thumbnails_OBJECTS)
 test_write_thumbnails_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+test_write_thumbnails_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(test_write_thumbnails_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
-	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(get_timezone_SOURCES) $(test_checksum_SOURCES) \
 	$(test_firewire_id_SOURCES) $(test_init_ipod_SOURCES) \
 	$(test_itdb_SOURCES) $(test_ls_SOURCES) $(test_photos_SOURCES) \
-	$(test_rebuild_db_SOURCES) $(test_thumbnails_SOURCES) \
-	$(test_write_thumbnails_SOURCES)
+	$(test_rebuild_db_SOURCES) \
+	$(test_sysinfo_extended_parsing_SOURCES) \
+	$(test_thumbnails_SOURCES) $(test_write_thumbnails_SOURCES)
 DIST_SOURCES = $(get_timezone_SOURCES) $(test_checksum_SOURCES) \
 	$(test_firewire_id_SOURCES) $(test_init_ipod_SOURCES) \
 	$(test_itdb_SOURCES) $(test_ls_SOURCES) \
 	$(am__test_photos_SOURCES_DIST) \
 	$(am__test_rebuild_db_SOURCES_DIST) \
+	$(test_sysinfo_extended_parsing_SOURCES) \
 	$(am__test_thumbnails_SOURCES_DIST) \
 	$(am__test_write_thumbnails_SOURCES_DIST)
 ETAGS = etags
@@ -133,8 +154,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -161,35 +180,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -230,15 +238,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = $(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -274,13 +284,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -292,6 +302,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -323,8 +334,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 @HAVE_GDKPIXBUF_FALSE at TESTTHUMBS = 
 @HAVE_GDKPIXBUF_TRUE at TESTTHUMBS = test-thumbnails test-write-thumbnails test-photos get-timezone 
 @HAVE_GDKPIXBUF_TRUE at test_thumbnails_SOURCES = test-covers.c
@@ -347,6 +361,12 @@
 test_init_ipod_LDADD = 
 test_checksum_SOURCES = test-checksum.c
 test_firewire_id_SOURCES = test-fw-id.c
+test_sysinfo_extended_parsing_SOURCES = \
+	test-sysinfo-extended-parsing.c \
+	$(top_srcdir)/src/itdb_plist.c  \
+	$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+
+test_sysinfo_extended_parsing_LDADD = 
 get_timezone_SOURCES = get-timezone.c
 INCLUDES = $(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
 all: all-am
@@ -391,34 +411,37 @@
 	done
 get-timezone$(EXEEXT): $(get_timezone_OBJECTS) $(get_timezone_DEPENDENCIES) 
 	@rm -f get-timezone$(EXEEXT)
-	$(LINK) $(get_timezone_LDFLAGS) $(get_timezone_OBJECTS) $(get_timezone_LDADD) $(LIBS)
+	$(LINK) $(get_timezone_OBJECTS) $(get_timezone_LDADD) $(LIBS)
 test-checksum$(EXEEXT): $(test_checksum_OBJECTS) $(test_checksum_DEPENDENCIES) 
 	@rm -f test-checksum$(EXEEXT)
-	$(LINK) $(test_checksum_LDFLAGS) $(test_checksum_OBJECTS) $(test_checksum_LDADD) $(LIBS)
+	$(LINK) $(test_checksum_OBJECTS) $(test_checksum_LDADD) $(LIBS)
 test-firewire-id$(EXEEXT): $(test_firewire_id_OBJECTS) $(test_firewire_id_DEPENDENCIES) 
 	@rm -f test-firewire-id$(EXEEXT)
-	$(LINK) $(test_firewire_id_LDFLAGS) $(test_firewire_id_OBJECTS) $(test_firewire_id_LDADD) $(LIBS)
+	$(LINK) $(test_firewire_id_OBJECTS) $(test_firewire_id_LDADD) $(LIBS)
 test-init-ipod$(EXEEXT): $(test_init_ipod_OBJECTS) $(test_init_ipod_DEPENDENCIES) 
 	@rm -f test-init-ipod$(EXEEXT)
-	$(LINK) $(test_init_ipod_LDFLAGS) $(test_init_ipod_OBJECTS) $(test_init_ipod_LDADD) $(LIBS)
+	$(LINK) $(test_init_ipod_OBJECTS) $(test_init_ipod_LDADD) $(LIBS)
 test-itdb$(EXEEXT): $(test_itdb_OBJECTS) $(test_itdb_DEPENDENCIES) 
 	@rm -f test-itdb$(EXEEXT)
-	$(LINK) $(test_itdb_LDFLAGS) $(test_itdb_OBJECTS) $(test_itdb_LDADD) $(LIBS)
+	$(LINK) $(test_itdb_OBJECTS) $(test_itdb_LDADD) $(LIBS)
 test-ls$(EXEEXT): $(test_ls_OBJECTS) $(test_ls_DEPENDENCIES) 
 	@rm -f test-ls$(EXEEXT)
-	$(LINK) $(test_ls_LDFLAGS) $(test_ls_OBJECTS) $(test_ls_LDADD) $(LIBS)
+	$(LINK) $(test_ls_OBJECTS) $(test_ls_LDADD) $(LIBS)
 test-photos$(EXEEXT): $(test_photos_OBJECTS) $(test_photos_DEPENDENCIES) 
 	@rm -f test-photos$(EXEEXT)
-	$(LINK) $(test_photos_LDFLAGS) $(test_photos_OBJECTS) $(test_photos_LDADD) $(LIBS)
+	$(test_photos_LINK) $(test_photos_OBJECTS) $(test_photos_LDADD) $(LIBS)
 test-rebuild-db$(EXEEXT): $(test_rebuild_db_OBJECTS) $(test_rebuild_db_DEPENDENCIES) 
 	@rm -f test-rebuild-db$(EXEEXT)
-	$(CXXLINK) $(test_rebuild_db_LDFLAGS) $(test_rebuild_db_OBJECTS) $(test_rebuild_db_LDADD) $(LIBS)
+	$(test_rebuild_db_LINK) $(test_rebuild_db_OBJECTS) $(test_rebuild_db_LDADD) $(LIBS)
+test-sysinfo-extended-parsing$(EXEEXT): $(test_sysinfo_extended_parsing_OBJECTS) $(test_sysinfo_extended_parsing_DEPENDENCIES) 
+	@rm -f test-sysinfo-extended-parsing$(EXEEXT)
+	$(LINK) $(test_sysinfo_extended_parsing_OBJECTS) $(test_sysinfo_extended_parsing_LDADD) $(LIBS)
 test-thumbnails$(EXEEXT): $(test_thumbnails_OBJECTS) $(test_thumbnails_DEPENDENCIES) 
 	@rm -f test-thumbnails$(EXEEXT)
-	$(LINK) $(test_thumbnails_LDFLAGS) $(test_thumbnails_OBJECTS) $(test_thumbnails_LDADD) $(LIBS)
+	$(test_thumbnails_LINK) $(test_thumbnails_OBJECTS) $(test_thumbnails_LDADD) $(LIBS)
 test-write-thumbnails$(EXEEXT): $(test_write_thumbnails_OBJECTS) $(test_write_thumbnails_DEPENDENCIES) 
 	@rm -f test-write-thumbnails$(EXEEXT)
-	$(LINK) $(test_write_thumbnails_LDFLAGS) $(test_write_thumbnails_OBJECTS) $(test_write_thumbnails_LDADD) $(LIBS)
+	$(test_write_thumbnails_LINK) $(test_write_thumbnails_OBJECTS) $(test_write_thumbnails_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -428,109 +451,140 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/get-timezone.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_plist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_sysinfo_extended_parser.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-checksum.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-fw-id.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-init-ipod.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-ls.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-sysinfo-extended-parsing.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_photos-test-photos.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_thumbnails-test-covers.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_write_thumbnails-test-write-covers.Po at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 test_photos-test-photos.o: test-photos.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.o -MD -MP -MF "$(DEPDIR)/test_photos-test-photos.Tpo" -c -o test_photos-test-photos.o `test -f 'test-photos.c' || echo '$(srcdir)/'`test-photos.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/test_photos-test-photos.Tpo" "$(DEPDIR)/test_photos-test-photos.Po"; else rm -f "$(DEPDIR)/test_photos-test-photos.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.o -MD -MP -MF $(DEPDIR)/test_photos-test-photos.Tpo -c -o test_photos-test-photos.o `test -f 'test-photos.c' || echo '$(srcdir)/'`test-photos.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_photos-test-photos.Tpo $(DEPDIR)/test_photos-test-photos.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -c -o test_photos-test-photos.o `test -f 'test-photos.c' || echo '$(srcdir)/'`test-photos.c
 
 test_photos-test-photos.obj: test-photos.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.obj -MD -MP -MF "$(DEPDIR)/test_photos-test-photos.Tpo" -c -o test_photos-test-photos.obj `if test -f 'test-photos.c'; then $(CYGPATH_W) 'test-photos.c'; else $(CYGPATH_W) '$(srcdir)/test-photos.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/test_photos-test-photos.Tpo" "$(DEPDIR)/test_photos-test-photos.Po"; else rm -f "$(DEPDIR)/test_photos-test-photos.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.obj -MD -MP -MF $(DEPDIR)/test_photos-test-photos.Tpo -c -o test_photos-test-photos.obj `if test -f 'test-photos.c'; then $(CYGPATH_W) 'test-photos.c'; else $(CYGPATH_W) '$(srcdir)/test-photos.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_photos-test-photos.Tpo $(DEPDIR)/test_photos-test-photos.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -c -o test_photos-test-photos.obj `if test -f 'test-photos.c'; then $(CYGPATH_W) 'test-photos.c'; else $(CYGPATH_W) '$(srcdir)/test-photos.c'; fi`
 
+itdb_plist.o: $(top_srcdir)/src/itdb_plist.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_plist.o -MD -MP -MF $(DEPDIR)/itdb_plist.Tpo -c -o itdb_plist.o `test -f '$(top_srcdir)/src/itdb_plist.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_plist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_plist.Tpo $(DEPDIR)/itdb_plist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_plist.c' object='itdb_plist.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_plist.o `test -f '$(top_srcdir)/src/itdb_plist.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_plist.c
+
+itdb_plist.obj: $(top_srcdir)/src/itdb_plist.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_plist.obj -MD -MP -MF $(DEPDIR)/itdb_plist.Tpo -c -o itdb_plist.obj `if test -f '$(top_srcdir)/src/itdb_plist.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_plist.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_plist.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_plist.Tpo $(DEPDIR)/itdb_plist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_plist.c' object='itdb_plist.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_plist.obj `if test -f '$(top_srcdir)/src/itdb_plist.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_plist.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_plist.c'; fi`
+
+itdb_sysinfo_extended_parser.o: $(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_sysinfo_extended_parser.o -MD -MP -MF $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo -c -o itdb_sysinfo_extended_parser.o `test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo $(DEPDIR)/itdb_sysinfo_extended_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' object='itdb_sysinfo_extended_parser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_sysinfo_extended_parser.o `test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+
+itdb_sysinfo_extended_parser.obj: $(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_sysinfo_extended_parser.obj -MD -MP -MF $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo -c -o itdb_sysinfo_extended_parser.obj `if test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo $(DEPDIR)/itdb_sysinfo_extended_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' object='itdb_sysinfo_extended_parser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_sysinfo_extended_parser.obj `if test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; fi`
+
 test_thumbnails-test-covers.o: test-covers.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.o -MD -MP -MF "$(DEPDIR)/test_thumbnails-test-covers.Tpo" -c -o test_thumbnails-test-covers.o `test -f 'test-covers.c' || echo '$(srcdir)/'`test-covers.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo" "$(DEPDIR)/test_thumbnails-test-covers.Po"; else rm -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.o -MD -MP -MF $(DEPDIR)/test_thumbnails-test-covers.Tpo -c -o test_thumbnails-test-covers.o `test -f 'test-covers.c' || echo '$(srcdir)/'`test-covers.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_thumbnails-test-covers.Tpo $(DEPDIR)/test_thumbnails-test-covers.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -c -o test_thumbnails-test-covers.o `test -f 'test-covers.c' || echo '$(srcdir)/'`test-covers.c
 
 test_thumbnails-test-covers.obj: test-covers.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.obj -MD -MP -MF "$(DEPDIR)/test_thumbnails-test-covers.Tpo" -c -o test_thumbnails-test-covers.obj `if test -f 'test-covers.c'; then $(CYGPATH_W) 'test-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-covers.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo" "$(DEPDIR)/test_thumbnails-test-covers.Po"; else rm -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.obj -MD -MP -MF $(DEPDIR)/test_thumbnails-test-covers.Tpo -c -o test_thumbnails-test-covers.obj `if test -f 'test-covers.c'; then $(CYGPATH_W) 'test-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-covers.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_thumbnails-test-covers.Tpo $(DEPDIR)/test_thumbnails-test-covers.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -c -o test_thumbnails-test-covers.obj `if test -f 'test-covers.c'; then $(CYGPATH_W) 'test-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-covers.c'; fi`
 
 test_write_thumbnails-test-write-covers.o: test-write-covers.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.o -MD -MP -MF "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo" -c -o test_write_thumbnails-test-write-covers.o `test -f 'test-write-covers.c' || echo '$(srcdir)/'`test-write-covers.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo" "$(DEPDIR)/test_write_thumbnails-test-write-covers.Po"; else rm -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.o -MD -MP -MF $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo -c -o test_write_thumbnails-test-write-covers.o `test -f 'test-write-covers.c' || echo '$(srcdir)/'`test-write-covers.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo $(DEPDIR)/test_write_thumbnails-test-write-covers.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -c -o test_write_thumbnails-test-write-covers.o `test -f 'test-write-covers.c' || echo '$(srcdir)/'`test-write-covers.c
 
 test_write_thumbnails-test-write-covers.obj: test-write-covers.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.obj -MD -MP -MF "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo" -c -o test_write_thumbnails-test-write-covers.obj `if test -f 'test-write-covers.c'; then $(CYGPATH_W) 'test-write-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-write-covers.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo" "$(DEPDIR)/test_write_thumbnails-test-write-covers.Po"; else rm -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.obj -MD -MP -MF $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo -c -o test_write_thumbnails-test-write-covers.obj `if test -f 'test-write-covers.c'; then $(CYGPATH_W) 'test-write-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-write-covers.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo $(DEPDIR)/test_write_thumbnails-test-write-covers.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -c -o test_write_thumbnails-test-write-covers.obj `if test -f 'test-write-covers.c'; then $(CYGPATH_W) 'test-write-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-write-covers.c'; fi`
 
 .cc.o:
- at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
- at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .cc.lo:
- at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
 
 test_rebuild_db-test-rebuild-db.o: test-rebuild-db.cc
- at am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.o -MD -MP -MF "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo" -c -o test_rebuild_db-test-rebuild-db.o `test -f 'test-rebuild-db.cc' || echo '$(srcdir)/'`test-rebuild-db.cc; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo" "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po"; else rm -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.o -MD -MP -MF $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo -c -o test_rebuild_db-test-rebuild-db.o `test -f 'test-rebuild-db.cc' || echo '$(srcdir)/'`test-rebuild-db.cc
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo $(DEPDIR)/test_rebuild_db-test-rebuild-db.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -c -o test_rebuild_db-test-rebuild-db.o `test -f 'test-rebuild-db.cc' || echo '$(srcdir)/'`test-rebuild-db.cc
 
 test_rebuild_db-test-rebuild-db.obj: test-rebuild-db.cc
- at am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.obj -MD -MP -MF "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo" -c -o test_rebuild_db-test-rebuild-db.obj `if test -f 'test-rebuild-db.cc'; then $(CYGPATH_W) 'test-rebuild-db.cc'; else $(CYGPATH_W) '$(srcdir)/test-rebuild-db.cc'; fi`; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo" "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po"; else rm -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.obj -MD -MP -MF $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo -c -o test_rebuild_db-test-rebuild-db.obj `if test -f 'test-rebuild-db.cc'; then $(CYGPATH_W) 'test-rebuild-db.cc'; else $(CYGPATH_W) '$(srcdir)/test-rebuild-db.cc'; fi`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo $(DEPDIR)/test_rebuild_db-test-rebuild-db.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -c -o test_rebuild_db-test-rebuild-db.obj `if test -f 'test-rebuild-db.cc'; then $(CYGPATH_W) 'test-rebuild-db.cc'; else $(CYGPATH_W) '$(srcdir)/test-rebuild-db.cc'; fi`
@@ -541,17 +595,13 @@
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -563,8 +613,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -574,13 +624,12 @@
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -594,22 +643,21 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -657,7 +705,7 @@
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -671,12 +719,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -697,19 +753,22 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
+.MAKE: install-am install-strip
+
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags 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-exec \
-	install-exec-am install-info install-info-am install-man \
+	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-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
 
 # 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.

Modified: libgpod/trunk/tests/get-timezone.c
===================================================================
--- libgpod/trunk/tests/get-timezone.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/get-timezone.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -16,16 +16,12 @@
 #include <errno.h>
 #include <stdio.h>
 #include <itdb.h>
+#include <itdb_device.h>
 
 int main (int argc, char **argv)
 {
     char *mountpoint;
-    char *device_dir;
-    char *prefs_filename;
-    FILE *f;
-    int result;
-    gint32 timezone;
-    const int GMT_OFFSET = 0x19;
+    Itdb_Device *device;
 
     if (argc >= 2) {
         mountpoint = argv[1];
@@ -34,49 +30,10 @@
         return -1;
     }
 
-    device_dir = itdb_get_device_dir (mountpoint);
-    if (device_dir == NULL) {
-        g_print ("No iPod mounted at %s\n", mountpoint);
-        return -1;
-    }
-    prefs_filename = itdb_get_path (device_dir, "Preferences");
-    g_free (device_dir);
+    device = itdb_device_new ();
+    itdb_device_set_mountpoint (device, mountpoint);
 
-    f = fopen (prefs_filename, "r");
-    if (f == NULL) {
-        g_print ("Couldn't open %s: %s\n", prefs_filename, g_strerror (errno));
-        g_free (prefs_filename);
-        return -1;
-    }
+    g_print ("Timezone: UTC%+d\n", device->timezone_shift/3600);
 
-    result = fseek (f, 0xB10, SEEK_SET);
-    if (result != 0) {
-        g_print ("Couldn't seek in %s: %s\n", prefs_filename,
-                 g_strerror (errno));
-        fclose (f);
-        g_free (prefs_filename);
-        return -1;
-    }
-
-    result = fread (&timezone, sizeof (timezone), 1, f);
-    if (result != 1) {
-        g_print ("Couldn't read from %s: %s\n", prefs_filename,
-                 g_strerror (errno));
-        fclose (f);
-        g_free (prefs_filename);
-    }
-
-    fclose (f);
-    g_free (prefs_filename);
-
-    timezone = GINT32_FROM_LE (timezone);
-    timezone -= GMT_OFFSET;
-
-    g_print ("Timezone: UTC%+d", timezone >> 1);
-    if (timezone & 1) {
-        g_print (" DST");
-    }
-    g_print ("\n");
-
     return 0;
 }

Modified: libgpod/trunk/tests/itdb_main.c
===================================================================
--- libgpod/trunk/tests/itdb_main.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/itdb_main.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -22,7 +22,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_main.c,v 1.3 2005/09/23 16:59:34 jcsjcs Exp $
+|  $Id: itdb_main.c 1100 2005-09-23 16:59:34Z jcsjcs $
 */
 /*
  * Initial main.c file generated by Glade. Edit as required.

Modified: libgpod/trunk/tests/test-covers.c
===================================================================
--- libgpod/trunk/tests/test-covers.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/test-covers.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -30,43 +30,55 @@
 
 #include <locale.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
+#include "itdb_thumb.h"
 
-
 static void
-save_itdb_thumb (Itdb_iTunesDB *itdb, Itdb_Thumb *thumb, const char *filename)
+save_itdb_thumb (Itdb_Track *track, GdkPixbuf *pixbuf, guint id)
 {
-	GdkPixbuf *pixbuf;
-	
-	pixbuf = itdb_thumb_get_gdk_pixbuf (itdb->device, thumb);
-	if (pixbuf != NULL) {
-		gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL);
-		gdk_pixbuf_unref (pixbuf);
-/*		g_print ("Saved %s\n", filename); */
-	}
+        char *filename;
+        gint width;
+        gint height;
+
+        g_object_get (G_OBJECT (pixbuf),
+                      "width", &width,
+                      "height", &height,
+                      NULL);
+        filename = g_strdup_printf ("%03d_%s-%s-%s-%xx%x-%016"G_GINT64_MODIFIER"x.png",
+                                    id,
+                                    track->artist, track->album, 
+                                    track->title, width, height,
+                                    track->dbid);
+        if (filename == NULL) {
+                return;
+        }
+        g_print ("  %s\n", filename);
+        gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL);
+        gdk_pixbuf_unref (pixbuf);
+        /*		g_print ("Saved %s\n", filename); */
+        g_free (filename);
 }
+
 static void
 save_song_thumbnails (Itdb_Track *song)
 {
-        static gint count = 0;
-	GList *it;
-	for (it = song->artwork->thumbnails; it != NULL; it = it->next) {
-		Itdb_Thumb *thumb;
-		gchar *filename;
+        static guint count = 0;
+        GList *it;
+        GList *thumbs;
+        if (song->artwork->thumbnail == NULL) {
+            return;
+        }
+        thumbs = itdb_thumb_to_pixbufs (song->itdb->device,
+                                        song->artwork->thumbnail);
+	for (it = thumbs; it != NULL; it = it->next) {
+                GdkPixbuf *pixbuf;
 
-		thumb = (Itdb_Thumb *)it->data;
-		g_return_if_fail (thumb);
+		pixbuf = GDK_PIXBUF (it->data);
+		g_return_if_fail (pixbuf);
 
-		filename = NULL;
-		filename = g_strdup_printf ("%03d_%s-%s-%s-%d-%016"G_GINT64_MODIFIER"x.png",
-					    count++,
-					    song->artist, song->album, 
-					    song->title, thumb->type, 
-					    song->dbid);
-		if (filename != NULL) {
-			save_itdb_thumb (song->itdb, thumb, filename);
-			g_free (filename);
-		}
+                save_itdb_thumb (song, pixbuf, count);
+                count++;
 	}
+        g_list_free (thumbs);
 }
 
 
@@ -74,11 +86,16 @@
 save_thumbnails (Itdb_iTunesDB *db)
 {
 	GList *it;
+	gint count = 0;
 
 	for (it = db->tracks; it != NULL; it = it->next) {
 		Itdb_Track *song;
 		
 		song = (Itdb_Track *)it->data;
+		g_print ("Track %d (%016"G_GINT64_MODIFIER"x) %s-%s-%s (%08x)\n",
+			 count++, song->dbid,
+			 song->artist, song->album,
+			 song->title, song->mhii_link);
 		save_song_thumbnails (song);
 	}
 }

Modified: libgpod/trunk/tests/test-fw-id.c
===================================================================
--- libgpod/trunk/tests/test-fw-id.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/test-fw-id.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -31,6 +31,8 @@
 #include <time.h>
 #include <libintl.h>
 
+#include <glib-object.h>
+
 #include "itdb.h"
 #include "itdb_device.h"
 
@@ -45,6 +47,8 @@
         return 1;
 
     }
+ 
+    g_type_init ();
 
     device = itdb_device_new ();
     if (device == NULL) {

Modified: libgpod/trunk/tests/test-init-ipod.c
===================================================================
--- libgpod/trunk/tests/test-init-ipod.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/test-init-ipod.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -19,7 +19,7 @@
  *
  * This product is not supported/written/published by Apple!
  *
- * $Id: test-init-ipod.c,v 1.4 2006/10/02 13:17:58 jcsjcs Exp $
+ * $Id: test-init-ipod.c 1326 2006-10-02 13:17:58Z jcsjcs $
  *
  */
 

Modified: libgpod/trunk/tests/test-ls.c
===================================================================
--- libgpod/trunk/tests/test-ls.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/test-ls.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -48,7 +48,7 @@
 
         if (track->recent_playcount != 0) {
             char date[30];
-            time_t track_time = itdb_time_mac_to_host (track->time_played);
+            time_t track_time = track->time_played;
 
             g_print ("%s - %s - %s:\n",
                      track->artist, track->album, track->title);
@@ -70,7 +70,9 @@
 display_track (Itdb_Track *track, const char *prefix) 
 {
     g_print ("%s%s - %s - %s\n", prefix,  
-	     track->artist, track->album, track->title);
+	     track->artist ? track->artist : "(null)",
+	     track->album ? track->album : "(null)",
+	     track->title ? track->title : "(null)");
     g_print ("%s\t%s\n", prefix, track->ipod_path);
 }
 

Modified: libgpod/trunk/tests/test-photos.c
===================================================================
--- libgpod/trunk/tests/test-photos.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/test-photos.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -18,7 +18,7 @@
  *
  * This product is not supported/written/published by Apple!
  *
- * $Id: test-photos.c,v 1.13 2007/05/07 11:42:09 jcsjcs Exp $
+ * $Id: test-photos.c 2070 2008-07-29 20:11:37Z teuf $
  *
  */
 
@@ -31,6 +31,8 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <glib/gi18n-lib.h>
 
+#include "itdb_thumb.h"
+
 static void usage (int argc, char **argv)
 {
 /*    gchar *name = argv[0];*/
@@ -60,40 +62,31 @@
 }
 
 static void
-save_itdb_thumb (Itdb_PhotoDB *itdb, Itdb_Thumb *thumb,
-		 const gchar *filename)
-{
-	GdkPixbuf *pixbuf;
-	
-	pixbuf = itdb_thumb_get_gdk_pixbuf (itdb->device, thumb);
-
-	if (pixbuf != NULL) {
-		gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL);
-		gdk_pixbuf_unref (pixbuf);
-	}
-}
-
-static void
 dump_thumbs (Itdb_PhotoDB *db, Itdb_Artwork *artwork,
 	     const gchar *album_name, const gchar *dir)
 {
 	GList *it;
 	gint i = 0;
+        GList *thumbnails;
 
-	for (it = artwork->thumbnails; it != NULL; it = it->next, i++) {
-		Itdb_Thumb *thumb;
+        thumbnails = itdb_thumb_to_pixbufs (db->device, artwork->thumbnail);
+	for (it = thumbnails; it != NULL; it = it->next, i++) {
 		gchar *filename, *path;
+                GdkPixbuf *pixbuf;
 
-		thumb = (Itdb_Thumb *)it->data;
-		g_return_if_fail (thumb);
+                pixbuf = GDK_PIXBUF (it->data);
 
+		g_return_if_fail (pixbuf);
+
 		filename = g_strdup_printf ("%s-%d-%d.png",
 					    album_name, artwork->id, i );
 		path = g_build_filename (dir, filename, NULL);
 		g_free (filename);
-		save_itdb_thumb (db, thumb, path);
+		gdk_pixbuf_save (pixbuf, path, "png", NULL, NULL);
+		gdk_pixbuf_unref (pixbuf);
 		g_free (path);
 	}
+        g_list_free (thumbnails);
 }
 
 static void

Modified: libgpod/trunk/tests/test-rebuild-db.cc
===================================================================
--- libgpod/trunk/tests/test-rebuild-db.cc	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tests/test-rebuild-db.cc	2009-01-24 12:10:00 UTC (rev 341)
@@ -25,6 +25,7 @@
 #endif
 
 #include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <typeinfo>

Copied: libgpod/trunk/tests/test-sysinfo-extended-parsing.c (from rev 340, libgpod/branches/upstream/current/tests/test-sysinfo-extended-parsing.c)
===================================================================
--- libgpod/trunk/tests/test-sysinfo-extended-parsing.c	                        (rev 0)
+++ libgpod/trunk/tests/test-sysinfo-extended-parsing.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -0,0 +1,24 @@
+#include "itdb_sysinfo_extended_parser.h"
+
+#include <glib.h>
+#include <glib-object.h>
+
+int main (int argc, char **argv)
+{
+    SysInfoIpodProperties *props;
+    GError *error = NULL;
+    if (argc != 2)
+        return(1);
+
+    g_type_init ();
+    props = itdb_sysinfo_extended_parse (argv[1], &error);
+    if (props == NULL) {
+        g_print ("Couldn't parse %s: %s\n", argv[1], error->message);
+    }
+    itdb_sysinfo_properties_dump (props);
+    itdb_sysinfo_properties_free (props);
+    props = NULL;
+
+    return 0;
+}
+

Modified: libgpod/trunk/tools/Makefile.in
===================================================================
--- libgpod/trunk/tools/Makefile.in	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tools/Makefile.in	2009-01-24 12:10:00 UTC (rev 341)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in 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.
@@ -15,15 +15,11 @@
 @SET_MAKE@
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -66,6 +62,10 @@
 @HAVE_SGUTILS_TRUE at ipod_read_sysinfo_extended_DEPENDENCIES =  \
 @HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 @HAVE_SGUTILS_TRUE@	$(top_builddir)/src/libgpod.la
+ipod_read_sysinfo_extended_LINK = $(LIBTOOL) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 am__libgpod_callout_SOURCES_DIST = hal-callout.c ipod-scsi-inquiry.c
 @HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at am_libgpod_callout_OBJECTS = libgpod_callout-hal-callout.$(OBJEXT) \
 @HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	libgpod_callout-ipod-scsi-inquiry.$(OBJEXT)
@@ -74,17 +74,21 @@
 @HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) \
 @HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) \
 @HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(top_builddir)/src/libgpod.la
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+libgpod_callout_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgpod_callout_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(ipod_read_sysinfo_extended_SOURCES) \
 	$(libgpod_callout_SOURCES)
 DIST_SOURCES = $(am__ipod_read_sysinfo_extended_SOURCES_DIST) \
@@ -103,8 +107,6 @@
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -131,35 +133,24 @@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
-GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
-GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
+GTKDOC_CHECK = @GTKDOC_CHECK@
 HALCALLOUTSDIR = @HALCALLOUTSDIR@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
-HAVE_GDKPIXBUF_FALSE = @HAVE_GDKPIXBUF_FALSE@
-HAVE_GDKPIXBUF_TRUE = @HAVE_GDKPIXBUF_TRUE@
-HAVE_HAL_FALSE = @HAVE_HAL_FALSE@
-HAVE_HAL_TRUE = @HAVE_HAL_TRUE@
-HAVE_PYGOBJECT_FALSE = @HAVE_PYGOBJECT_FALSE@
-HAVE_PYGOBJECT_TRUE = @HAVE_PYGOBJECT_TRUE@
-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
-HAVE_SGUTILS_FALSE = @HAVE_SGUTILS_FALSE@
-HAVE_SGUTILS_TRUE = @HAVE_SGUTILS_TRUE@
-HAVE_TAGLIB_FALSE = @HAVE_TAGLIB_FALSE@
-HAVE_TAGLIB_TRUE = @HAVE_TAGLIB_TRUE@
 HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -200,15 +191,17 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -244,13 +237,13 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -262,6 +255,7 @@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -293,8 +287,11 @@
 pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 @HAVE_SGUTILS_TRUE at ipod_read_sysinfo_extended_SOURCES = \
 @HAVE_SGUTILS_TRUE@	read-sysinfoextended-sgutils.c	\
 @HAVE_SGUTILS_TRUE@	ipod-scsi-inquiry.c
@@ -346,15 +343,15 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
 	  if test -f $$p \
 	     || test -f $$p1 \
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
 
@@ -374,15 +371,15 @@
 	done
 install-halPROGRAMS: $(hal_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(haldir)" || $(mkdir_p) "$(DESTDIR)$(haldir)"
+	test -z "$(haldir)" || $(MKDIR_P) "$(DESTDIR)$(haldir)"
 	@list='$(hal_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
 	  if test -f $$p \
 	     || test -f $$p1 \
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(halPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(haldir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(halPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(haldir)/$$f" || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(halPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(haldir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(halPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(haldir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
 
@@ -402,10 +399,10 @@
 	done
 ipod-read-sysinfo-extended$(EXEEXT): $(ipod_read_sysinfo_extended_OBJECTS) $(ipod_read_sysinfo_extended_DEPENDENCIES) 
 	@rm -f ipod-read-sysinfo-extended$(EXEEXT)
-	$(LINK) $(ipod_read_sysinfo_extended_LDFLAGS) $(ipod_read_sysinfo_extended_OBJECTS) $(ipod_read_sysinfo_extended_LDADD) $(LIBS)
+	$(ipod_read_sysinfo_extended_LINK) $(ipod_read_sysinfo_extended_OBJECTS) $(ipod_read_sysinfo_extended_LDADD) $(LIBS)
 libgpod-callout$(EXEEXT): $(libgpod_callout_OBJECTS) $(libgpod_callout_DEPENDENCIES) 
 	@rm -f libgpod-callout$(EXEEXT)
-	$(LINK) $(libgpod_callout_LDFLAGS) $(libgpod_callout_OBJECTS) $(libgpod_callout_LDADD) $(LIBS)
+	$(libgpod_callout_LINK) $(libgpod_callout_OBJECTS) $(libgpod_callout_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -419,78 +416,78 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Po at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o: read-sysinfoextended-sgutils.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o -MD -MP -MF "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo" -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o `test -f 'read-sysinfoextended-sgutils.c' || echo '$(srcdir)/'`read-sysinfoextended-sgutils.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo" "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po"; else rm -f "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o `test -f 'read-sysinfoextended-sgutils.c' || echo '$(srcdir)/'`read-sysinfoextended-sgutils.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='read-sysinfoextended-sgutils.c' object='ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o `test -f 'read-sysinfoextended-sgutils.c' || echo '$(srcdir)/'`read-sysinfoextended-sgutils.c
 
 ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj: read-sysinfoextended-sgutils.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj -MD -MP -MF "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo" -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj `if test -f 'read-sysinfoextended-sgutils.c'; then $(CYGPATH_W) 'read-sysinfoextended-sgutils.c'; else $(CYGPATH_W) '$(srcdir)/read-sysinfoextended-sgutils.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo" "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po"; else rm -f "$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj `if test -f 'read-sysinfoextended-sgutils.c'; then $(CYGPATH_W) 'read-sysinfoextended-sgutils.c'; else $(CYGPATH_W) '$(srcdir)/read-sysinfoextended-sgutils.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='read-sysinfoextended-sgutils.c' object='ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj `if test -f 'read-sysinfoextended-sgutils.c'; then $(CYGPATH_W) 'read-sysinfoextended-sgutils.c'; else $(CYGPATH_W) '$(srcdir)/read-sysinfoextended-sgutils.c'; fi`
 
 ipod_read_sysinfo_extended-ipod-scsi-inquiry.o: ipod-scsi-inquiry.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-ipod-scsi-inquiry.o -MD -MP -MF "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo" -c -o ipod_read_sysinfo_extended-ipod-scsi-inquiry.o `test -f 'ipod-scsi-inquiry.c' || echo '$(srcdir)/'`ipod-scsi-inquiry.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo" "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Po"; else rm -f "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-ipod-scsi-inquiry.o -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo -c -o ipod_read_sysinfo_extended-ipod-scsi-inquiry.o `test -f 'ipod-scsi-inquiry.c' || echo '$(srcdir)/'`ipod-scsi-inquiry.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi-inquiry.c' object='ipod_read_sysinfo_extended-ipod-scsi-inquiry.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-ipod-scsi-inquiry.o `test -f 'ipod-scsi-inquiry.c' || echo '$(srcdir)/'`ipod-scsi-inquiry.c
 
 ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj: ipod-scsi-inquiry.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj -MD -MP -MF "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo" -c -o ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj `if test -f 'ipod-scsi-inquiry.c'; then $(CYGPATH_W) 'ipod-scsi-inquiry.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi-inquiry.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo" "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Po"; else rm -f "$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo -c -o ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj `if test -f 'ipod-scsi-inquiry.c'; then $(CYGPATH_W) 'ipod-scsi-inquiry.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi-inquiry.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi-inquiry.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi-inquiry.c' object='ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-ipod-scsi-inquiry.obj `if test -f 'ipod-scsi-inquiry.c'; then $(CYGPATH_W) 'ipod-scsi-inquiry.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi-inquiry.c'; fi`
 
 libgpod_callout-hal-callout.o: hal-callout.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-hal-callout.o -MD -MP -MF "$(DEPDIR)/libgpod_callout-hal-callout.Tpo" -c -o libgpod_callout-hal-callout.o `test -f 'hal-callout.c' || echo '$(srcdir)/'`hal-callout.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libgpod_callout-hal-callout.Tpo" "$(DEPDIR)/libgpod_callout-hal-callout.Po"; else rm -f "$(DEPDIR)/libgpod_callout-hal-callout.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-hal-callout.o -MD -MP -MF $(DEPDIR)/libgpod_callout-hal-callout.Tpo -c -o libgpod_callout-hal-callout.o `test -f 'hal-callout.c' || echo '$(srcdir)/'`hal-callout.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-hal-callout.Tpo $(DEPDIR)/libgpod_callout-hal-callout.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hal-callout.c' object='libgpod_callout-hal-callout.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-hal-callout.o `test -f 'hal-callout.c' || echo '$(srcdir)/'`hal-callout.c
 
 libgpod_callout-hal-callout.obj: hal-callout.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-hal-callout.obj -MD -MP -MF "$(DEPDIR)/libgpod_callout-hal-callout.Tpo" -c -o libgpod_callout-hal-callout.obj `if test -f 'hal-callout.c'; then $(CYGPATH_W) 'hal-callout.c'; else $(CYGPATH_W) '$(srcdir)/hal-callout.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libgpod_callout-hal-callout.Tpo" "$(DEPDIR)/libgpod_callout-hal-callout.Po"; else rm -f "$(DEPDIR)/libgpod_callout-hal-callout.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-hal-callout.obj -MD -MP -MF $(DEPDIR)/libgpod_callout-hal-callout.Tpo -c -o libgpod_callout-hal-callout.obj `if test -f 'hal-callout.c'; then $(CYGPATH_W) 'hal-callout.c'; else $(CYGPATH_W) '$(srcdir)/hal-callout.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-hal-callout.Tpo $(DEPDIR)/libgpod_callout-hal-callout.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hal-callout.c' object='libgpod_callout-hal-callout.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-hal-callout.obj `if test -f 'hal-callout.c'; then $(CYGPATH_W) 'hal-callout.c'; else $(CYGPATH_W) '$(srcdir)/hal-callout.c'; fi`
 
 libgpod_callout-ipod-scsi-inquiry.o: ipod-scsi-inquiry.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-ipod-scsi-inquiry.o -MD -MP -MF "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo" -c -o libgpod_callout-ipod-scsi-inquiry.o `test -f 'ipod-scsi-inquiry.c' || echo '$(srcdir)/'`ipod-scsi-inquiry.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo" "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Po"; else rm -f "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-ipod-scsi-inquiry.o -MD -MP -MF $(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo -c -o libgpod_callout-ipod-scsi-inquiry.o `test -f 'ipod-scsi-inquiry.c' || echo '$(srcdir)/'`ipod-scsi-inquiry.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo $(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi-inquiry.c' object='libgpod_callout-ipod-scsi-inquiry.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-ipod-scsi-inquiry.o `test -f 'ipod-scsi-inquiry.c' || echo '$(srcdir)/'`ipod-scsi-inquiry.c
 
 libgpod_callout-ipod-scsi-inquiry.obj: ipod-scsi-inquiry.c
- at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-ipod-scsi-inquiry.obj -MD -MP -MF "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo" -c -o libgpod_callout-ipod-scsi-inquiry.obj `if test -f 'ipod-scsi-inquiry.c'; then $(CYGPATH_W) 'ipod-scsi-inquiry.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi-inquiry.c'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo" "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Po"; else rm -f "$(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-ipod-scsi-inquiry.obj -MD -MP -MF $(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo -c -o libgpod_callout-ipod-scsi-inquiry.obj `if test -f 'ipod-scsi-inquiry.c'; then $(CYGPATH_W) 'ipod-scsi-inquiry.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi-inquiry.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Tpo $(DEPDIR)/libgpod_callout-ipod-scsi-inquiry.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi-inquiry.c' object='libgpod_callout-ipod-scsi-inquiry.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-ipod-scsi-inquiry.obj `if test -f 'ipod-scsi-inquiry.c'; then $(CYGPATH_W) 'ipod-scsi-inquiry.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi-inquiry.c'; fi`
@@ -500,13 +497,9 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 install-fdiDATA: $(fdi_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(fdidir)" || $(mkdir_p) "$(DESTDIR)$(fdidir)"
+	test -z "$(fdidir)" || $(MKDIR_P) "$(DESTDIR)$(fdidir)"
 	@list='$(fdi_DATA)'; for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  f=$(am__strip_dir) \
@@ -527,8 +520,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -540,8 +533,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -551,13 +544,12 @@
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -571,22 +563,21 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -602,7 +593,7 @@
 all-am: Makefile $(PROGRAMS) $(DATA)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(haldir)" "$(DESTDIR)$(fdidir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -637,7 +628,7 @@
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -651,12 +642,20 @@
 
 install-data-am: install-fdiDATA install-halPROGRAMS
 
+install-dvi: install-dvi-am
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -678,21 +677,25 @@
 ps-am:
 
 uninstall-am: uninstall-binPROGRAMS uninstall-fdiDATA \
-	uninstall-halPROGRAMS uninstall-info-am
+	uninstall-halPROGRAMS
 
+.MAKE: install-am install-strip
+
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-halPROGRAMS clean-libtool ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
 	install install-am install-binPROGRAMS install-data \
-	install-data-am install-exec install-exec-am install-fdiDATA \
-	install-halPROGRAMS install-info install-info-am install-man \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-fdiDATA uninstall-halPROGRAMS \
-	uninstall-info-am
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-fdiDATA install-halPROGRAMS \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-fdiDATA \
+	uninstall-halPROGRAMS
 
 # 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.

Modified: libgpod/trunk/tools/hal-callout.c
===================================================================
--- libgpod/trunk/tools/hal-callout.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tools/hal-callout.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -32,6 +32,9 @@
 #endif
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #include <sys/mount.h>
 #include <itdb.h>
 #include <itdb_device.h>

Modified: libgpod/trunk/tools/ipod-scsi-inquiry.c
===================================================================
--- libgpod/trunk/tools/ipod-scsi-inquiry.c	2009-01-24 10:34:12 UTC (rev 340)
+++ libgpod/trunk/tools/ipod-scsi-inquiry.c	2009-01-24 12:10:00 UTC (rev 341)
@@ -30,6 +30,7 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <string.h>
 #include <unistd.h>
 #include <scsi/sg_cmds.h>




More information about the Pkg-gtkpod-devel mailing list