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

Frank Lichtenheld djpig at alioth.debian.org
Thu Jan 25 11:46:40 CET 2007


Author: djpig
Date: 2007-01-25 11:46:30 +0100 (Thu, 25 Jan 2007)
New Revision: 168

Added:
   libgpod/trunk/TROUBLESHOOTING
   libgpod/trunk/bindings/python/README
   libgpod/trunk/bindings/python/README.in
   libgpod/trunk/bindings/python/gpod.i.in
   libgpod/trunk/bindings/python/gpod_doc.i.in
   libgpod/trunk/bindings/python/gtkdoc-to-swig.xsl
   libgpod/trunk/docs/reference/html/itunesdb.html
   libgpod/trunk/docs/reference/html/libgpod-Photo-database.html
   libgpod/trunk/docs/reference/html/libgpod-Smart-Playlists.html
   libgpod/trunk/docs/reference/html/photodb.html
   libgpod/trunk/docs/reference/tmpl/photodb.sgml
   libgpod/trunk/docs/reference/xml/photodb.xml
   libgpod/trunk/m4/gtk-doc.m4
   libgpod/trunk/m4/intltool.m4
   libgpod/trunk/py-compile
   libgpod/trunk/src/pixmaps.c
   libgpod/trunk/src/pixmaps.h
Removed:
   libgpod/trunk/TODO
   libgpod/trunk/bindings/python/gpod.i
   libgpod/trunk/docs/reference/html/ch02.html
Modified:
   libgpod/trunk/ChangeLog
   libgpod/trunk/Makefile.am
   libgpod/trunk/Makefile.in
   libgpod/trunk/README
   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/__init__.py
   libgpod/trunk/bindings/python/examples/Makefile.in
   libgpod/trunk/bindings/python/examples/create_mp3_tags_from_itdb.py
   libgpod/trunk/bindings/python/gtkpod.py
   libgpod/trunk/bindings/python/ipod.py
   libgpod/trunk/compile
   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/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-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/libgpod-docs.xml
   libgpod/trunk/docs/reference/libgpod-sections.txt
   libgpod/trunk/docs/reference/tmpl/Internal.sgml
   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/playlists.sgml
   libgpod/trunk/docs/reference/tmpl/smart-playlists.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/playlists.xml
   libgpod/trunk/docs/reference/xml/smart-playlists.xml
   libgpod/trunk/docs/reference/xml/track.xml
   libgpod/trunk/install-sh
   libgpod/trunk/m4/Makefile.in
   libgpod/trunk/missing
   libgpod/trunk/mkinstalldirs
   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/sv.po
   libgpod/trunk/src/Makefile.am
   libgpod/trunk/src/Makefile.in
   libgpod/trunk/src/db-artwork-debug.c
   libgpod/trunk/src/db-artwork-parser.c
   libgpod/trunk/src/db-artwork-writer.c
   libgpod/trunk/src/db-itunes-parser.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/test-init-ipod.c
   libgpod/trunk/tests/test-photos.c
Log:
Merge 0.4.2 to trunk


Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/ChangeLog	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,3 +1,411 @@
+2007-01-15  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: bumped version to 0.4.2 for release
+
+	* po/sv.po: updated Swedish catalog -- thanks to Stefan Asserhall
+
+	* po/ja.po: updated Japanese catalog -- thanks to Kentaro Fukuchi
+
+	* po/de.po: updated German catalog
+
+	* .cvsignore
+	  po/.cvsignore
+	  tests/.cvsignore: updated with additional files to ignore.
+
+	* bindings/.cvsignore:
+	  bindings/python/.cvsignore
+	  bindings/python/examples/.cvsignore
+	  bindings/python/docs/.cvsignore
+	  docs/.cvsignore
+	  docs/reference/.cvsignore
+	  m4/.cvsignore: created new ignore files
+
+	* tests/test-photos.c: change "error" to "warning" in warning
+	  message.
+
+	* INSTALL_CVS:
+	  TROUBLESHOOTING: short note about the python packages required to
+	  build the python bindings.
+
+	* Makefile.am: added TROUBLESHOOTING to EXTRA_DIST
+
+2007-01-15  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* Makefile.am
+	  bindings/python/Makefile.am
+	  bindings/python/__init__.py
+	  bindings/python/gpod.i.in
+	  bindings/python/gpod_doc.i.in
+	  bindings/python/gtkdoc-to-swig.xsl
+	  bindings/python/gtkpod.py
+	  bindings/python/ipod.py: add builtin documentation to the python
+	  bindings using the gtk-docs for all of the wrapped libgpod
+	  functions (with much help from Nicolas Piper)
+
+	* bindings/python/gtkpod.py: fix encoding issue in
+	  write_pair() (Nicolas Piper)
+	  handle gtkpod extended info files with either md5_hash or
+	  sha1_hash fields (Nicolas Piper)
+
+	* bindings/python/ipod.py: ensure the db object doesn't get
+	  garbage collected at the wrong time (Nicolas Piper)
+
+2007-01-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-photos.c:
+	  src/itdb_photoalbum.c: fixed two typos in message strings.
+
+	* po/es.po: updated Spanish catalog -- thanks to Alejandro Lamas
+	  Daviña
+
+	* po/*.po: run 'make update-po'
+
+	* src/itdb_itunesdb.c: added instructions on how to add new string
+	  fields like 'tvepisode', 'tvshow' without forgetting half of the
+	  places that need to be touched.
+
+2007-01-13  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/Makefile.am: don't include any swig built
+	  files in the tarballs.
+	  s/SWIG_SOURCES/SWIG_INTERFACES/ to avoid a warning from
+	  automake about unused sources.
+
+	* src/itdb_itunesdb.c: add a few more MHOD types that Jorg
+	  suggested
+
+        * src/itdb_track.c: add more tv show fixes from Mario Rossi.
+	  add missing albumartist and keywords pointed out by Jorg.
+
+2007-01-12  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: TV shows patch from Mario Rossi
+
+	* bindings/python/Makefile.am: fix more make distcheck issues
+
+2007-01-11  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* README
+	  docs/reference/libgpod-docs.xml
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/artwork.sgml
+	  docs/reference/tmpl/device.sgml
+	  docs/reference/tmpl/itunesdb-db.sgml
+	  docs/reference/tmpl/itunesdb-lowlevel.sgml
+	  docs/reference/tmpl/photodb.sgml
+	  docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_photoalbum.c: Add PhotoDB functions to the docs.
+	  Incorporate usage overviews from README into the docs.
+	  Fix a few doc comments to allow gtk-doc to parse them.
+
+2007-01-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* bindings/python/Makefile.am: correct 'make dist' failure (patch
+	  by Todd Zullinger)
+
+	* docs/reference/libgpod-docs.xml
+          docs/reference/libgpod-sections.txt
+          docs/reference/tmpl/Internal.sgml
+          docs/reference/tmpl/artwork.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/playlists.sgml
+          docs/reference/tmpl/smart-playlists.sgml
+          docs/reference/tmpl/track.sgml
+          src/itdb.h
+          src/itdb_device.c
+          src/itdb_itunesdb.c
+          src/itdb_photoalbum.c: applied Todd Zullinger's patch fixing
+	  warnings when building the documentation.
+
+2007-01-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/pixmaps.c
+	  src/pixmaps.h: New files containing last-resort pixmap in case
+	  thumbnail/photo could not be added. Will not produce code
+	  if the gdk-pixubf library is not present.
+
+	* src/ithumb-writer.c: use above pixmap instead of red canvas.
+
+	* src/Makefile.am: added pixmaps.[ch]
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c: added tvshow, tvepisode, tvnetwork,
+	  albumartist, keywords, reseved to Itdb_Track. 'reserved' can
+	  later be used to support 'Artist, The'.
+
+2007-01-08  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* README: updated information about photo support
+
+	* po/fr.po: updated French catalog (thanks to Eric Lassauge)
+
+	* src/itdb.h: added 2 pointers for future extension to
+	  Itdb_Playlist (MHOD100).
+
+2007-01-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/Makefile.am: cleanup
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c: renamed unk156 to skipcount and unk160 to
+	  last_skipped.
+	  Added unk244, gapless_data, unk252, gapless_track_flag,
+	  gapless_album_flag, recent_skipcount.
+	  Added handling of skipcount and last_skipped to playount file
+	  handling.
+
+	* src/itdb_private.h: added skipcount and last_skipped to struct
+	  playcount.
+
+2007-01-04  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* configure.ac
+	  gnome-autogen.sh
+	  bindings/python/Makefile.am
+	  docs/reference/libgpod-overrides.txt
+	  docs/reference/Makefile.am: fix make distcheck, minor automake
+	  cleanups.
+
+	* bindings/python/gpod.i
+	  bindings/python/gpod.i.in: rename gpod.i -> gpod.i.in.  it is now
+	  generated by autoconf.
+
+2006-11-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c (ithumb_writer_write_thumbnail): handle
+	  corrupted image data in a way that does not crash libgpod nor
+	  causes the ArtworkDB or PhotoDB to be corrupted. Currently a
+	  completely red pixmap is created as a substitute. Somewhat more
+	  artistic than I am may want to create a "corrupted image data"
+	  pixmap we can imbed into the code.
+
+	* src/itdb_artwork.c (itdb_thumb_get_gdk_pixbuf): fix failed
+	  assertion when image data is illegal.
+
+2006-11-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	  src/itdb_photoalbum.c (itdb_photodb_add_photo,
+	  itdb_photodb_add_photo_from_data,
+	  itdb_photodb_photoalbum_add_photo): add 'position' where photo
+	  should be inserted.
+
+	* tests/test-photos.c: implemented new API (append at the end).
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c: removed mhodcount and libmhodcount from
+	  Itdb_Playlist as these are only used internally and reset during
+	  syncing.
+
+2006-11-23  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* When adding photos to the iPod the user may or may not want to
+	  rotate the picture shown on the iPod screen, for example
+	  deending on EXIF rotation value. This can now be achieved by
+	  passing a new parameter 'rotation' to itdb_photodb_add_photo()
+	  or itdb_photodb_add_photo_from_data(). (Valid values: 0, 90, 180,
+	  270, rotation is counter-clockwise). These two functions now
+	  also accept a GError pointer. As a consequence Itdb_Thumb had to
+	  be extended with a field for the rotation value and
+	  itdb_artwork_add_thumbnail have been extended to accept
+	  @rotation and @error as well.
+
+	  The actual rotation is carried out in
+	  ithumb-writer.c/ithumb_writer_write_thumbnail() using
+	  gdk_pixbuf_rotate_simple() and require gdk-pixbuf V2.6 or
+	  higher.
+
+	  In contrast, itdb_track_set_thumbnails() and
+	  itdb_track_set_thumbnails_from_data have been left unchanged,
+	  even though they could be extended to accept @rotation and
+	  @error easily. Please let me know if this is wanted.
+
+	* configure.ac
+	  src/itdb.h
+	  src/itdb_artwork.c
+	  src/itdb_photoalbum.c
+	  src/itdb_track.c
+	  src/ithumb-writer.c: implemented changes outlined above.
+
+	* tests/test-photos.c: added @rotation and @error to the
+	  itdb_photodb_add_photo() call.
+
+2006-11-12  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* ithumb-writer.c (itdb_write_ithumb_files):
+	  ITDB_THUMB_PHOTO_TV_SCREEN type thumbnails were not "rearranged"
+	  (i.e. deleted photos were not removed).
+
+	  (ipod_image_get_ithmb_filename, ithmb_writer_write_thumbnail):
+	  changed "F%u04_%d.ithmb" to "F%d_%d.ithmb" as this format string
+	  is used by the iPod.
+
+	  NEW: start new thumbnail file F%d_2/3/4... if the size of the
+	  current thumbnail file is larger than ITHUMB_MAX_SIZE (currently
+	  500 MB). Existing thumbnail files with a length larger than this
+	  will NOT be truncated. Patches are welcome (probably add code at
+	  the end of ithumb_rearrange_thumbnail_file()) :-) 
+
+	* itdb_artwork.c: added support for UYVY format for iPod Video and
+	  iPod Photo TV output. Code adapted from the GPixPod project.
+
+	  (itdb_thumb_get_byteorder): return the byte order for the
+	  current thumbnail (internal function).
+
+	* itdb_device.[hc]: added thumbnail storage format to the
+	  Itdb_ArtworkFormat image information. Currently the following
+	  are defined:
+	    THUMB_FORMAT_UYVY
+	    THUMB_FORMAT_RGB565_LE
+	    THUMB_FORMAT_RGB565_BE
+	    THUMB_FORMAT_RGB565_BE_90
+	    THUMB_FORMAT_RGB565_LE_90
+	  THUMB_FORMAT_RGB565_LE_90 does not appear to be used by any iPod
+	  model. THUMB_FORMAT_RGB565_BE_90 is used for full screen iPod
+	  Photo photos but currently is handeled the same as
+	  THUMB_FORMAT_RGB565_BE pending input from iPod Photo users.
+
+	* ithumb-writer.c: added support for UYVY format for iPod Video and
+	  iPod Photo TV output. Code adapted from the GPixPod project.
+
+2006-11-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h: Itdb_Artwork:
+	  - added unk028, unk036 and rating
+	  - added digitized_data timestamp
+	  - changed creation_date from gint32 to guint32
+
+	* db-itunes-parser.h:
+	  db-artwork-debug.c: MhiiHeader:
+	  - renamed unknown5 to rating
+	  - renamed digitised_date to digitized_date for conformity
+
+	* db-artwork-writer.c (write_mhli): sanity check to avoid access
+	  of NULL pointer.
+	  (write_mhii): write unk028, rating, unk036, digitized_data
+
+	* db-artwork_parser.c (parse_mhii):
+	  - parse unk028, rating, unk036, digitized data.
+	  - unified reading of DB_TYPE_PHOTO and DB_TYPE_ITUNES, got rid
+	    of parse_mhod() and parse_mhni().
+
+
+	
+2006-11-08  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h:
+	  itdb_itunesdb.c:
+	  itdb_track.c:
+	  renamed some formerly unknown Itdb_Track entries and added
+	  comments:
+	   - unk184->pregap
+	   - samplecount: guint32 -> guint64.
+	   - unk192->(removed)
+	   - unk200->postgap
+	   - unk208->mediatype
+	   - unk212->season_nr
+	   - unk216->episode_nr
+
+2006-10-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_photoalbum.c: fixed typo (Libarary -> Library).
+
+	* configure.ac, src/Makefile.am: new soname versioning
+	  scheme. Thanks to Todd Zullinger and Frank Lichtenheld.
+
+2006-10-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	Major rework of picture support.
+	
+	* src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb.h,
+	  src/db-itunes-parser.h: renamed 'master' to 'album_type' in
+	  MhbaHeader and Itdb_PhotoAlbum.
+
+	* src/db-artwork-parser.c, src/db-artwork-writer.c,
+	  src/itdb_photoalbum.c: Itdb_Photoalbum->members are now pointers
+	  to the corresponding Itdb_Artwork instead of image_ids.
+
+	* src/itdb_photoalbum.c: album_ids and image_ids are set just
+	  before writing the PhotoDB in itdb_photodb_write().
+
+	* src/itdb_photoalbum.c: new interface, basically use as follows:
+
+	  itdb_photodb_parse():
+	    Read an existing PhotoDB.
+
+          itdb_photodb_create():
+            Create a new Itdb_PhotoDB structure. The Photo Library Album is
+	    (first album) is created automatically.
+
+          itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+	    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.
+
+	  itdb_photodb_photoalbum_craete():
+	    Create and add a new photoalbum.
+
+	  itdb_photodb_photoalbum_add_photo():
+	    Add a photo (Itdb_Artwork) to an existing photoalbum.
+
+	  itdb_photodb_photoalbum_remove():
+	    Remove an existing photoalbum. Pictures can be kept in the
+	    Photo Library or automatically removed as well.
+
+	  itdb_photodb_remove_photo():
+	    Remove a photo either from a photoalbum or completely from the
+	    database.
+
+	  itdb_photodb_write():
+	    Write out your PhotoDB.
+
+	  itdb_photodb_free():
+	    Free all memory taken by the PhotoDB.
+
+	  itdb_photodb_photoalbum_by_name():
+	    Find the first photoalbum with a given name.
+
+        * src/itdb_playlist.c (itdb_playlist_add, itdb_playlist_add_track):
+	  src/itdb_track.c (itdb_track_add): simplify code by using
+	  g_list_insert().
+
+	* tests/test-photos.c: change to new interface, add new commands
+	  'list' to list photo IDs in the database, 'remove' to remove IDs
+	  from an album or the iPod, or remove entire photoalbums from the
+	  iPod.
+
+	* src/db-itunes-parser.h: added comments to _MhbaHeader definition.
+
+	Added additional functionality for photo albums
+
+	* src/db-artwork-parser.c
+	  src/db-artwork-writer.c
+	  src/db-itunes-parser.c:
+	  src/itdb.h: added additional fields to MhbaHeader and
+	  Itdb_PhotoAlbum (playmusic, repeat, random, show_titles,
+	  transition_direction, slide duration, transition_duration,
+	  unk024, unk028, unk044, unk048, song_id. These fields are read
+	  and written from the PhotoDB now. Also corrected error for
+	  "album type" which was read and written as int32 even though it
+	  was a int8. Removed num_images from Itdb_PhotoAlbum -- instead
+	  count images at time of writing.
+	
+2006-10-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/Makefile.am
+	  tests/test-init-ipod.c: fix compilation error when building with
+	  --disable-gdk-pixbuf. Thanks to David Philippi and Christophe
+	  Fergeau.
+
+2006-09-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/sv.po: updated version by Stefan Asserhall
+
 2006-09-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
 
 	* po/es.po: updated version by Alejandro Lamas Daviña
@@ -4,6 +412,8 @@
 
 	* configure.ac: bumped to 0.4.0 for release
 
+	* configure.ac: bumped to 0.4.1 as new CVS version
+
 2006-09-23  Jorg Schuler <jcsjcs at users.sourceforge.net>
 
 	* src/itdb.h: explain 'checked' field in Itdb_Track declaration

Modified: libgpod/trunk/Makefile.am
===================================================================
--- libgpod/trunk/Makefile.am	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/Makefile.am	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-SUBDIRS=src bindings tests po m4 docs
+SUBDIRS=src tests po m4 docs bindings 
 
 # build documentation when doing a distcheck.
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
@@ -7,6 +7,7 @@
 pkgconfig_DATA = libgpod-1.0.pc
 
 EXTRA_DIST =                    \
+	TROUBLESHOOTING		\
         intltool-merge.in       \
         intltool-update.in      \
         intltool-extract.in     \

Modified: libgpod/trunk/Makefile.in
===================================================================
--- libgpod/trunk/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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.
@@ -21,7 +21,6 @@
 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
@@ -35,7 +34,56 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = libgpod-1.0.pc
+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
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +168,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -178,6 +224,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +251,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -216,65 +265,60 @@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-SUBDIRS = src bindings tests po m4 docs
+SUBDIRS = src tests po m4 docs bindings 
 
 # build documentation when doing a distcheck.
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libgpod-1.0.pc
-
 EXTRA_DIST = \
+	TROUBLESHOOTING		\
         intltool-merge.in       \
         intltool-update.in      \
         intltool-extract.in     \
         libgpod-1.0.pc.in
 
-
 DISTCLEANFILES = \
         intltool-extract        \
         intltool-merge          \
         intltool-update
 
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = libgpod-1.0.pc
-DIST_SOURCES =
-DATA = $(pkgconfig_DATA)
-
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \
-	COPYING ChangeLog INSTALL Makefile.am NEWS TODO aclocal.m4 \
-	compile config.guess config.h.in config.sub configure \
-	configure.ac depcomp install-sh libgpod-1.0.pc.in ltmain.sh \
-	missing mkinstalldirs
-DIST_SUBDIRS = $(SUBDIRS)
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+am--refresh:
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
 
-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 	cd $(srcdir) && $(AUTOCONF)
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac 
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 
 config.h: stamp-h1
@@ -286,14 +330,14 @@
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
-
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
 	cd $(top_srcdir) && $(AUTOHEADER)
-	touch $(srcdir)/config.h.in
+	rm -f stamp-h1
+	touch $@
 
 distclean-hdr:
 	-rm -f config.h stamp-h1
-libgpod-1.0.pc: $(top_builddir)/config.status libgpod-1.0.pc.in
+libgpod-1.0.pc: $(top_builddir)/config.status $(srcdir)/libgpod-1.0.pc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 
 mostlyclean-libtool:
@@ -305,23 +349,22 @@
 distclean-libtool:
 	-rm -f libtool
 uninstall-info-am:
-pkgconfigDATA_INSTALL = $(INSTALL_DATA)
 install-pkgconfigDATA: $(pkgconfig_DATA)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(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="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f"; \
-	  $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f; \
+	  f=$(am__strip_dir) \
+	  echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
 	done
 
 uninstall-pkgconfigDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pkgconfig_DATA)'; for p in $$list; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(pkgconfigdir)/$$f"; \
-	  rm -f $(DESTDIR)$(pkgconfigdir)/$$f; \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
 	done
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -331,7 +374,13 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -343,7 +392,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -351,7 +400,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	case "$@" in \
 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -372,7 +427,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -383,14 +438,6 @@
 	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -399,19 +446,22 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
-	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
+	  empty_fix=.; \
 	else \
 	  include_option=--include; \
+	  empty_fix=; \
 	fi; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && \
+	    test ! -f $$subdir/TAGS || \
 	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
@@ -421,10 +471,11 @@
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -447,24 +498,11 @@
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = .
-distdir = $(PACKAGE)-$(VERSION)
-
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
 	mkdir $(distdir)
-	$(mkinstalldirs) $(distdir)/. $(distdir)/docs/reference $(distdir)/po
+	$(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 \
@@ -476,7 +514,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -491,15 +529,17 @@
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
 	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
 	    (cd $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -510,19 +550,46 @@
 	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r $(distdir)
 dist-gzip: distdir
-	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
 
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
 dist dist-all: distdir
-	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
 distcheck: dist
-	$(am__remove_distdir)
-	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
 	chmod -R a-w $(distdir); chmod a+w $(distdir)
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
@@ -542,19 +609,20 @@
 	        distuninstallcheck \
 	  && chmod -R a-w "$$dc_install_base" \
 	  && ({ \
-	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
 	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
 	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
 	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
-	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
 	$(am__remove_distdir)
-	@echo "$(distdir).tar.gz is ready for distribution" | \
-	  sed 'h;s/./=/g;p;x;p;x'
+	@(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;}'
 distuninstallcheck:
 	@cd $(distuninstallcheck_dir) \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -578,8 +646,9 @@
 all-am: Makefile $(DATA) config.h
 installdirs: installdirs-recursive
 installdirs-am:
-	$(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
-
+	for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
 install: install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
@@ -599,7 +668,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
@@ -612,13 +681,15 @@
 distclean: distclean-recursive
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
 
 dvi: dvi-recursive
 
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
 info-am:
@@ -655,25 +726,22 @@
 
 uninstall-info: uninstall-info-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive dist dist-all dist-gzip distcheck distclean \
+.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 dvi-recursive info info-am \
-	info-recursive install install-am install-data install-data-am \
-	install-data-recursive install-exec install-exec-am \
-	install-exec-recursive install-info install-info-am \
-	install-info-recursive install-man install-pkgconfigDATA \
-	install-recursive install-strip installcheck installcheck-am \
-	installdirs installdirs-am installdirs-recursive \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
-	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+	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 \
-	uninstall-info-recursive uninstall-pkgconfigDATA \
-	uninstall-recursive
+	uninstall-pkgconfigDATA
 
 # 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/README
===================================================================
--- libgpod/trunk/README	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/README	2007-01-25 10:46:30 UTC (rev 168)
@@ -13,8 +13,9 @@
 answer).
 
 ----------------------------------------------------------------------
-Quick HOWTO use libgpod
 
+Quick HOWTO use libgpod for audio
+
 itdb_parse(): read the iTunesDB and ArtbookDB
 itdb_write(): write the iTunesDB and ArtbookDB
 
@@ -82,58 +83,60 @@
 Jörg Schuler (jcsjcs at users dot sourceforge dot net)
 
 ----------------------------------------------------------------------
-Note about photo databases:
 
-First thing, there are 2 different artwork databases on the iPod
-Photo/Color, the ArtworkDB file which stores information about cover art
-(thumbnails) for the songs stored on the iPod, and the Photo Database
-which is used to store random photos not associated with songs on the
-iPod. 
+Quick HOWTO use libgpod for photos
 
-The main target I had in mind when writing artwork support was cover art
-thumbnails for songs. The parsing code should be reusable for generic
-Photo Database support, but there are probably some tweaks to do, and
-some stuff isn't handled, for example Photo Albums (roughtly equivalent
-to a playlist) which aren't used in the ArtworkDB (they are only
-useful/meaningful in the Photo Database)
+   itdb_photodb_parse():
+       Read an existing PhotoDB.
 
-Even though the cover art data is stored in a separate file (ArtworkDB),
-it's intrisically linked with a song in the iTunesDB files through the
-'dbid' 64 bit field in the mhit iTunesDB records (it's meant to be
-displayed along when the song is being played, so it makes sense to
-associate them).
+   itdb_photodb_create():
+       Create a new Itdb_PhotoDB structure. The Photo Library Album is
+       (first album) is created automatically.
 
-What ipod_parse_photo_db is to parse this ArtworkDB file to gather info
-about the song thumbnails. It then fills the 'thumbnails' field in
-Itdb_Track which is a list of Itdb_Image. The Itdb_Image structure
-contains a few basic information about the image (I'll let you check its
-definition in itdb.h for more details), but it doesn't store the pixel
-data since this is stored separately, and I feared loading all the cover
-thumbnails automatically would be too memory hungry. So an
-itdb_image_get_rgb_data function is provided to trigger the load of the
-pixel data when it's useful.
+   itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+       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.
 
-The 2 test programs I added are meant to be small samples of how this
-stuff works, one of them parses the ArtworkDB and outputs all the
-thumbnails it finds in /tmp as .png files, the other one is used to
-randomly associate images as thumbnails to all songs in the database,
-it's meant to show how to write thumbnails. If you add support for that
-to gtkpod, be aware that currently adding cover thumbnails to a few
-songs on an iPod which already has cover thumbnails assigned to some
-other songs is not something that is tranparently handled, ie you'll
-need to add code either to libgpod or to gtkpod to make that work
-properly.
+   itdb_photodb_photoalbum_create():
+       Create and add a new photoalbum.
 
-As for Photo Database handling (which is not dealt with currently), I
-agree it doesn't make sense to associate its parsing with an
-Itdb_ItunesDB object, and that a 'parallel' api mimicking somewhat the
-Track/Playlist stuff with Photo/Album entities would need to be
-designed, but I didn't work on that since, and I probably won't short
-term.
+   itdb_photodb_photoalbum_add_photo():
+       Add a photo (Itdb_Artwork) to an existing photoalbum.
 
-People wanting more info can find lots of details on
-http://ipodlinux.org/ITunesDB#Artwork_Database
+   itdb_photodb_photoalbum_remove():
+       Remove an existing photoalbum. Pictures can be kept in the
+       Photo Library or automatically removed as well.
 
-I hope that's helpful,
+   itdb_photodb_remove_photo():
+       Remove a photo either from a photoalbum or completely from the database.
 
-Christophe
+   itdb_photodb_write():
+       Write out your PhotoDB.
+
+   itdb_photodb_free():
+       Free all memory taken by the PhotoDB.
+
+   itdb_photodb_photoalbum_by_name():
+       Find the first photoalbum with a given name or the Photo
+       Library Album if called with no name.
+
+
+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 (db->device, "ModelNumStr", model);
+
+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).
+
+Have a look at the following test-photos test program in the tests/
+subdirectory for an example of how to use the interface.
+
+
+Jörg Schuler (jcsjcs at users dot sourceforge dot net)
+
+----------------------------------------------------------------------

Deleted: libgpod/trunk/TODO
===================================================================
--- libgpod/trunk/TODO	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/TODO	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,18 +0,0 @@
-mremap not available under MacOS
-
-> I spoke too soon, I found a replacement rather quickly: realloc
-> 
-> So the code in the function that uses mremap now reads:
-> 
->     //new_address = mremap (buffer->mmap->mmap_area, buffer->mmap- 
-> >size,
->                   //buffer->mmap->size + IPOD_MMAP_SIZE, 0);
->     new_address = realloc(buffer->mmap->mmap_area, buffer->mmap->size +
->                           IPOD_MMAP_SIZE);
-
-I wouldn't expect that to do the right thing, ie stuff written to the
-realloc'ed zone will probably not end up being written to the on-disk
-file. Implementing mremap as a combination of munmap + mmap when it's
-not available will probably be much better
-
-Christophe

Copied: libgpod/trunk/TROUBLESHOOTING (from rev 167, libgpod/branches/upstream/current/TROUBLESHOOTING)

Modified: libgpod/trunk/aclocal.m4
===================================================================
--- libgpod/trunk/aclocal.m4	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/aclocal.m4	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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.
@@ -11,893 +11,408 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-
-# Copyright 1996, 1997, 2000, 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_PREREQ([2.52])
-
-# serial 6
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                            -*- Autoconf -*-
-
-# 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.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 10
-
-AC_PREREQ([2.54])
-
-# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
-# the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[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])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright 2002  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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# 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.7"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.7.9])])
-
-# Helper functions for option handling.                    -*- Autoconf -*-
-
-# Copyright 2001, 2002  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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 #
-# Check to make sure that the build environment is sane.
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
 #
-
-# Copyright 1996, 1997, 2000, 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-#  -*- Autoconf -*-
-
-
-# Copyright 1997, 1999, 2000, 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# 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
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
 #
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper at cygnus.com>, 1995, 1996
 #
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
+# Modified to never use included libintl. 
+# Owen Taylor <otaylor at redhat.com>, 12/15/1998
 #
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
+# Major rework to remove unused code
+# Owen Taylor <otaylor at redhat.com>, 12/11/2002
 #
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
+# Added better handling of ALL_LINGUAS from GNU gettext version 
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 #
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-# Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-
-# Copyright 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# AM_PROG_INSTALL_STRIP
-
-# Copyright 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-#                                                          -*- Autoconf -*-
-# Copyright (C) 2003  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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# serial 5						-*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003  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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
-# 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,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+# Modified to require ngettext
+# Matthias Clasen <mclasen at redhat.com> 08/06/2004
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
 
-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], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+dnl
+dnl We go to great lengths to make sure that aclocal won't 
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
 
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+  [AC_CHECK_HEADERS([locale.h])
+    if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES, 1,
+        [Define if your <locale.h> file defines LC_MESSAGES.])
+    fi
+  fi])
 
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
 	break
       fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       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/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
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
     fi
   done
-
-  cd ..
-  rm -rf conftest.dir
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
 else
-  am_cv_$1_dependencies_compiler_type=none
+  AC_MSG_RESULT(no)
 fi
+AC_SUBST($1)dnl
 ])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
 
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+  dnl NLS is obligatory
+  [USE_NLS=yes
+    AC_SUBST(USE_NLS)
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+    gt_cv_have_gettext=no
 
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking Speeds up one-time builds
-  --enable-dependency-tracking  Do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
+    AC_CHECK_HEADER(libintl.h,
+     [gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
 
-# Generate code to set up dependency tracking.   -*- Autoconf -*-
+      #
+      # First check in libc
+      #
+      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+        [AC_TRY_LINK([
+#include <libintl.h>
+],
+         [return !ngettext ("","", 1)],
+	  gt_cv_func_ngettext_libc=yes,
+          gt_cv_func_ngettext_libc=no)
+        ])
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+        	[AC_TRY_LINK([
+#include <libintl.h>
+],
+	          [return !dgettext ("","")],
+		  gt_cv_func_dgettext_libc=yes,
+	          gt_cv_func_dgettext_libc=no)
+        	])
+      fi
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        AC_CHECK_FUNCS(bind_textdomain_codeset)
+      fi
 
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+        
+        AC_CHECK_LIB(intl, bindtextdomain,
+	    [AC_CHECK_LIB(intl, ngettext,
+		    [AC_CHECK_LIB(intl, dgettext,
+			          gt_cv_func_dgettext_libintl=yes)])])
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
+	  AC_MSG_RESULT([])
+  	  AC_CHECK_LIB(intl, ngettext,
+          	[AC_CHECK_LIB(intl, dcgettext,
+		       [gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv],
+			:,-liconv)],
+		:,-liconv)
+        fi
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          AC_CHECK_FUNCS(bind_textdomain_codeset)
+          LIBS="$glib_save_LIBS"
 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
 
-#serial 2
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+  
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+  
+      if test "$gt_cv_have_gettext" = "yes"; then
+	AC_DEFINE(HAVE_GETTEXT,1,
+	  [Define if the GNU gettext() function is already present or preinstalled.])
+	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+	  AC_CHECK_FUNCS(dcgettext)
+	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr],
+	    [CATOBJEXT=.gmo 
+             DATADIRNAME=share],
+	    [case $host in
+	    *-*-solaris*)
+	    dnl On Solaris, if bind_textdomain_codeset is in libc,
+	    dnl GNU format message catalog is always supported,
+            dnl since both are added to the libc all together.
+	    dnl Hence, we'd like to go with DATADIRNAME=share and
+	    dnl and CATOBJEXT=.gmo in this case.
+            AC_CHECK_FUNC(bind_textdomain_codeset,
+	      [CATOBJEXT=.gmo 
+               DATADIRNAME=share],
+	      [CATOBJEXT=.mo
+               DATADIRNAME=lib])
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac])
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+    ])
 
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # 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
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
-  # Extract the definition of DEP_FILES from the Makefile without
-  # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
-  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
-  # We invoke sed twice because it is the simplest approach to
-  # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
-    /^DEP_FILES = .*\\\\$/ {
-      s/^DEP_FILES = //
-      :loop
-	s/\\\\$//
-	p
-	n
-	/\\\\$/ b loop
-      p
-    }
-    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+    if test "$gt_cv_have_gettext" = "yes" ; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [always defined to indicate that i18n is enabled])
+    fi
 
+    dnl Test whether we really found GNU xgettext.
+    if test "$XGETTEXT" != ":"; then
+      dnl If it is not GNU xgettext we define it as : so that the
+      dnl Makefiles still can work.
+      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        AC_MSG_RESULT(
+	  [found xgettext program is not GNU xgettext; ignore it])
+        XGETTEXT=":"
+      fi
+    fi
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+    # We need to process the po/ directory.
+    POSUB=po
 
-# Check to see how 'make' treats includes.	-*- Autoconf -*-
+    AC_OUTPUT_COMMANDS(
+      [case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac])
 
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.in.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(DATADIRNAME)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INSTOBJEXT)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(PO_IN_DATADIR_TRUE)
+    AC_SUBST(PO_IN_DATADIR_FALSE)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+  ])
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation 
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by 
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   
+   GLIB_LC_MESSAGES
+   GLIB_WITH_NLS
 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
 
-# serial 2
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
    fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
 
-# AM_CONDITIONAL                                              -*- Autoconf -*-
+   dnl Generate list of files to be processed by xgettext which will
+   dnl be included in po/Makefile.
+   test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+  ])
 
-# Copyright 1997, 2000, 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 5
-
-AC_PREREQ(2.52)
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[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])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+  localedir=`eval echo "${libdir}/locale"`
 else
-  $1_TRUE='#'
-  $1_FALSE=
+  localedir=`eval echo "${datadir}/locale"`
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+  [Define the location where the catalogs will be installed])
+])
 
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_in,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
 
-# Copyright 1996, 1998, 2000, 2001, 2002  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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode enable make rules and dependencies not useful
-                          (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
 # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
@@ -7267,188 +6782,6 @@
 AC_MSG_RESULT([$SED])
 ])
 
-
-dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 35 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL],
-[AC_PREREQ([2.50])dnl
-
-case "$am__api_version" in
-    1.[01234])
-	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
-    ;;
-    *)
-    ;;
-esac
-
-if test -n "$1"; then
-    AC_MSG_CHECKING(for intltool >= $1)
-
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
-    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
-    ]
-    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
-fi
-
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-AC_SUBST(INTLTOOL_DESKTOP_RULE)
-AC_SUBST(INTLTOOL_DIRECTORY_RULE)
-AC_SUBST(INTLTOOL_KEYS_RULE)
-AC_SUBST(INTLTOOL_PROP_RULE)
-AC_SUBST(INTLTOOL_OAF_RULE)
-AC_SUBST(INTLTOOL_PONG_RULE)
-AC_SUBST(INTLTOOL_SERVER_RULE)
-AC_SUBST(INTLTOOL_SHEET_RULE)
-AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
-AC_SUBST(INTLTOOL_UI_RULE)
-AC_SUBST(INTLTOOL_XAM_RULE)
-AC_SUBST(INTLTOOL_KBD_RULE)
-AC_SUBST(INTLTOOL_XML_RULE)
-AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-AC_SUBST(INTLTOOL_CAVES_RULE)
-AC_SUBST(INTLTOOL_SCHEMAS_RULE)
-AC_SUBST(INTLTOOL_THEME_RULE)
-AC_SUBST(INTLTOOL_SERVICE_RULE)
-
-# 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')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
-if test -z "$INTLTOOL_PERL"; then
-   AC_MSG_ERROR([perl not found; required for intltool])
-fi
-if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
-   AC_MSG_ERROR([perl 5.x required for intltool])
-fi
-if test "x$2" != "xno-xml"; then
-   AC_MSG_CHECKING([for XML::Parser])
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       AC_MSG_RESULT([ok])
-   else
-       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-   fi
-fi
-
-AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
-AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
-AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-AC_SUBST(ALL_LINGUAS)
-    
-IT_PO_SUBDIR([po])
-
-dnl The following is very similar to
-dnl
-dnl	AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl  - the *.in files are in ac_aux_dir,
-dnl  - if the file haven't changed upon reconfigure, it's not touched,
-dnl  - the evaluation of the third parameter enables a hack which computes
-dnl    the actual value of $libdir,
-dnl  - the user sees "executing intltool commands", instead of
-dnl    "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
-  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
-      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
-      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
-      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
-      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
-      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
-      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
-	< ${ac_aux_dir}/${file}.in > ${file}.out
-  if cmp -s ${file} ${file}.out 2>/dev/null; then
-    rm -f ${file}.out
-  else
-    mv -f ${file}.out ${file}
-  fi
-  chmod ugo+x ${file}
-  chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
-
-])
-
-
-# IT_PO_SUBDIR(DIRNAME)
-# ---------------------
-# All po subdirs have to be declared with this macro; the subdir "po" is
-# declared by IT_PROG_INTLTOOL.
-#
-AC_DEFUN([IT_PO_SUBDIR],
-[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
-dnl
-dnl The following CONFIG_COMMANDS should be exetuted at the very end
-dnl of config.status.
-AC_CONFIG_COMMANDS_PRE([
-  AC_CONFIG_COMMANDS([$1/stamp-it], [
-    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
-    >"$1/stamp-it.tmp"
-    [sed '/^#/d
-	 s/^[[].*] *//
-	 /^[ 	]*$/d
-	'"s|^|	$ac_top_srcdir/|" \
-      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
-    ]
-    if test ! -f "$1/Makefile"; then
-      AC_MSG_ERROR([$1/Makefile is not ready.])
-    fi
-    mv "$1/Makefile" "$1/Makefile.tmp"
-    [sed '/^POTFILES =/,/[^\\]$/ {
-		/^POTFILES =/!d
-		r $1/POTFILES
-	  }
-	 ' "$1/Makefile.tmp" >"$1/Makefile"]
-    rm -f "$1/Makefile.tmp"
-    mv "$1/stamp-it.tmp" "$1/stamp-it"
-  ])
-])dnl
-])
-
-
-# deprecated macros
-AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
-# A hint is needed for aclocal from Automake <= 1.9.4:
-# AC_DEFUN([AC_PROG_INTLTOOL], ...)
-
-
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 # 
 # Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
@@ -7607,654 +6940,753 @@
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
-# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 #
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
+# 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_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# 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"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it 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_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# This file can be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
+# 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper at cygnus.com>, 1995, 1996
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
-# Modified to never use included libintl. 
-# Owen Taylor <otaylor at redhat.com>, 12/15/1998
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
-# Major rework to remove unused code
-# Owen Taylor <otaylor at redhat.com>, 12/11/2002
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
 #
-# Added better handling of ALL_LINGUAS from GNU gettext version 
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
 #
-# Modified to require ngettext
-# Matthias Clasen <mclasen at redhat.com> 08/06/2004
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
 #
-# We need this here as well, since someone might use autoconf-2.5x
-# to configure GLib then an older version to configure a package
-# using AM_GLIB_GNU_GETTEXT
-AC_PREREQ(2.53)
+# 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.
 
-dnl
-dnl We go to great lengths to make sure that aclocal won't 
-dnl try to pull in the installed version of these macros
-dnl when running aclocal in the glib directory.
-dnl
-m4_copy([AC_DEFUN],[glib_DEFUN])
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
-dnl
-dnl At the end, if we're not within glib, we'll define the public
-dnl definitions in terms of our private definitions.
-dnl
+# serial 7
 
-# GLIB_LC_MESSAGES
-#--------------------
-glib_DEFUN([GLIB_LC_MESSAGES],
-  [AC_CHECK_HEADERS([locale.h])
-    if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1,
-        [Define if your <locale.h> file defines LC_MESSAGES.])
-    fi
-  fi])
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[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])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-# GLIB_PATH_PROG_WITH_TEST
-#----------------------------
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-	ac_cv_path_$1="$ac_dir/$ac_word"
+
+# Copyright (C) 1999, 2000, 2001, 2002, 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 8
+
+# 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,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+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], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
 	break
       fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       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/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
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
     fi
   done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-  ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
+
+  cd ..
+  rm -rf conftest.dir
 else
-  AC_MSG_RESULT(no)
+  am_cv_$1_dependencies_compiler_type=none
 fi
-AC_SUBST($1)dnl
 ])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-# GLIB_WITH_NLS
-#-----------------
-glib_DEFUN([GLIB_WITH_NLS],
-  dnl NLS is obligatory
-  [USE_NLS=yes
-    AC_SUBST(USE_NLS)
 
-    gt_cv_have_gettext=no
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
 
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
 
-    AC_CHECK_HEADER(libintl.h,
-     [gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
 
-      #
-      # First check in libc
-      #
-      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
-        [AC_TRY_LINK([
-#include <libintl.h>
-],
-         [return !ngettext ("","", 1)],
-	  gt_cv_func_ngettext_libc=yes,
-          gt_cv_func_ngettext_libc=no)
-        ])
-  
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
-        	[AC_TRY_LINK([
-#include <libintl.h>
-],
-	          [return !dgettext ("","")],
-		  gt_cv_func_dgettext_libc=yes,
-	          gt_cv_func_dgettext_libc=no)
-        	])
-      fi
-  
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-        AC_CHECK_FUNCS(bind_textdomain_codeset)
-      fi
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-	 || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-        
-        AC_CHECK_LIB(intl, bindtextdomain,
-	    [AC_CHECK_LIB(intl, ngettext,
-		    [AC_CHECK_LIB(intl, dgettext,
-			          gt_cv_func_dgettext_libintl=yes)])])
+# Copyright (C) 1999, 2000, 2001, 2002, 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.
 
-	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
-	  AC_MSG_RESULT([])
-  	  AC_CHECK_LIB(intl, ngettext,
-          	[AC_CHECK_LIB(intl, dcgettext,
-		       [gt_cv_func_dgettext_libintl=yes
-			libintl_extra_libs=-liconv],
-			:,-liconv)],
-		:,-liconv)
-        fi
+#serial 3
 
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-          AC_CHECK_FUNCS(bind_textdomain_codeset)
-          LIBS="$glib_save_LIBS"
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # 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
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
 
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
-  
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
-  
-      if test "$gt_cv_have_gettext" = "yes"; then
-	AC_DEFINE(HAVE_GETTEXT,1,
-	  [Define if the GNU gettext() function is already present or preinstalled.])
-	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-	if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-	  AC_CHECK_FUNCS(dcgettext)
-	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-			 return _nl_msg_cat_cntr],
-	    [CATOBJEXT=.gmo 
-             DATADIRNAME=share],
-	    [case $host in
-	    *-*-solaris*)
-	    dnl On Solaris, if bind_textdomain_codeset is in libc,
-	    dnl GNU format message catalog is always supported,
-            dnl since both are added to the libc all together.
-	    dnl Hence, we'd like to go with DATADIRNAME=share and
-	    dnl and CATOBJEXT=.gmo in this case.
-            AC_CHECK_FUNC(bind_textdomain_codeset,
-	      [CATOBJEXT=.gmo 
-               DATADIRNAME=share],
-	      [CATOBJEXT=.mo
-               DATADIRNAME=lib])
-	    ;;
-	    *)
-	    CATOBJEXT=.mo
-            DATADIRNAME=lib
-	    ;;
-	    esac])
-          LIBS="$glib_save_LIBS"
-	  INSTOBJEXT=.mo
-	else
-	  gt_cv_have_gettext=no
-	fi
-      fi
-    ])
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-    if test "$gt_cv_have_gettext" = "yes" ; then
-      AC_DEFINE(ENABLE_NLS, 1,
-        [always defined to indicate that i18n is enabled])
-    fi
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 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.
 
-    dnl Test whether we really found GNU xgettext.
-    if test "$XGETTEXT" != ":"; then
-      dnl If it is not GNU xgettext we define it as : so that the
-      dnl Makefiles still can work.
-      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        AC_MSG_RESULT(
-	  [found xgettext program is not GNU xgettext; ignore it])
-        XGETTEXT=":"
-      fi
-    fi
+# serial 8
 
-    # We need to process the po/ directory.
-    POSUB=po
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-    AC_OUTPUT_COMMANDS(
-      [case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac])
+# Do all the work for Automake.                             -*- Autoconf -*-
 
-    dnl These rules are solely for the distribution goal.  While doing this
-    dnl we only have to keep exactly one list of the available catalogs
-    dnl in configure.in.
-    for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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.
 
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(CATALOGS)
-    AC_SUBST(CATOBJEXT)
-    AC_SUBST(DATADIRNAME)
-    AC_SUBST(GMOFILES)
-    AC_SUBST(INSTOBJEXT)
-    AC_SUBST(INTLLIBS)
-    AC_SUBST(PO_IN_DATADIR_TRUE)
-    AC_SUBST(PO_IN_DATADIR_FALSE)
-    AC_SUBST(POFILES)
-    AC_SUBST(POSUB)
-  ])
+# serial 12
 
-# AM_GLIB_GNU_GETTEXT
-# -------------------
-# Do checks necessary for use of gettext. If a suitable implementation 
-# of gettext is found in either in libintl or in the C library,
-# it will set INTLLIBS to the libraries needed for use of gettext
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
-# on various variables needed by the Makefile.in.in installed by 
-# glib-gettextize.
-dnl
-glib_DEFUN([GLIB_GNU_GETTEXT],
-  [AC_REQUIRE([AC_PROG_CC])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   
-   GLIB_LC_MESSAGES
-   GLIB_WITH_NLS
+# 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.
 
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
- 	   # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# 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
+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])
+fi
 
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
 
-   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
-   dnl Try to locate is.
-   MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
-   AC_SUBST(MKINSTALLDIRS)
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-   dnl Generate list of files to be processed by xgettext which will
-   dnl be included in po/Makefile.
-   test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	< $srcdir/po/POTFILES.in > po/POTFILES
-  ])
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
-# -------------------------------
-# Define VARIABLE to the location where catalog files will
-# be installed by po/Makefile.
-glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
-[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
-glib_save_prefix="$prefix"
-glib_save_exec_prefix="$exec_prefix"
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-if test "x$CATOBJEXT" = "x.mo" ; then
-  localedir=`eval echo "${libdir}/locale"`
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# 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"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 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 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-  localedir=`eval echo "${datadir}/locale"`
+  am__leading_dot=_
 fi
-prefix="$glib_save_prefix"
-exec_prefix="$glib_save_exec_prefix"
-AC_DEFINE_UNQUOTED($1, "$localedir",
-  [Define the location where the catalogs will be installed])
-])
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-dnl
-dnl Now the definitions that aclocal will find
-dnl
-ifdef(glib_configure_in,[],[
-AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
-AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
-])dnl
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-dnl -*- mode: autoconf -*-
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 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 1
+# serial 4
 
-dnl Usage:
-dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-AC_DEFUN([GTK_DOC_CHECK],
-[
-  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-  dnl for overriding the documentation installation directory
-  AC_ARG_WITH(html-dir,
-    AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
-    [with_html_dir='${datadir}/gtk-doc/html'])
-  HTML_DIR="$with_html_dir"
-  AC_SUBST(HTML_DIR)
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
 
-  dnl enable/disable documentation building
-  AC_ARG_ENABLE(gtk-doc,
-    AC_HELP_STRING([--enable-gtk-doc],
-                   [use gtk-doc to build documentation [default=no]]),,
-    enable_gtk_doc=no)
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
-  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
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-  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
-  fi
+# Copyright (C) 2001, 2002, 2003, 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.
 
-  AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
-  AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
-])
+# serial 3
 
-dnl copied from pygtk
-dnl
-dnl a macro to check for ability to create python extensions
-dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
-dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
-[AC_REQUIRE([AM_PATH_PYTHON])
-AC_MSG_CHECKING(for python development headers)
-dnl deduce PYTHON_INCLUDES
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-if test "$py_prefix" != "$py_exec_prefix"; then
-  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
 fi
-AC_SUBST(PYTHON_INCLUDES)
-dnl check if the headers exist:
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-AC_TRY_CPP([#include <Python.h>],dnl
-[AC_MSG_RESULT(found)
-$1],dnl
-[AC_MSG_RESULT(not found)
-$2])
-CPPFLAGS="$save_CPPFLAGS"
-])
-
-dnl copied and modified from gnome-python
-dnl http://cvs.gnome.org/viewcvs/*checkout*/gnome-python/pygtk/m4/python.m4
-dnl
-dnl AM_CHECK_PYMOD(MODNAME [,VERSION, VERSION_MATCHER [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
-dnl Check if a module of a particular version is visible to python.
-AC_DEFUN([AM_CHECK_PYMOD],
-[AC_REQUIRE([AM_PATH_PYTHON])
-py_mod_var=`echo $1`
-AC_MSG_CHECKING(for python module $1 ifelse([$2],[],,[>= $2]))
-AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
-ifelse([$2],[], [prog="
-import sys
-try:
-        import $1
-except ImportError:
-        sys.exit(1)
-except:
-        sys.exit(0)
-sys.exit(0)"], [prog="
-import sys, string, $1
-curverstr = $3
-# use method from AM_PYTHON_CHECK_VERSION
-minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
-minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
-curver = map(int, string.split(curverstr, '.')) + [[0, 0, 0]]
-curverhex = 0
-for i in xrange(0, 4): curverhex = (curverhex << 8) + curver[[i]]
-if (curverhex >= minverhex):
-        sys.exit(0)
-else:
-        sys.exit(1)
-sys.exit(0)"])
-if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
-  then
-    eval "py_cv_mod_$py_mod_var=yes"
-  else
-    eval "py_cv_mod_$py_mod_var=no"
-  fi
-])
-py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
-if test "x$py_val" != xno; then
-  AC_MSG_RESULT(yes)
-  ifelse([$4], [],, [$4
-])dnl
-else
-  AC_MSG_RESULT(no)
-  ifelse([$5], [],, [$5
-])dnl
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
 fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
 ])
 
-dnl check for python
-AC_DEFUN([LIBGPOD_CHECK_PYTHON],
-[
-    dnl aclocal-1.7 is missing this when version is used in AM_PATH_PYTHON, fudge it
-    am_display_PYTHON=python
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-    AC_ARG_WITH(python,
-        AC_HELP_STRING([--with-python=PATH],
-            [build python bindings [[default=yes]]]),
-        [with_python=$withval],[with_python=yes])
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 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.
 
-    AC_MSG_CHECKING(whether to build python bindings)
-    if test "X$with_python" != Xno; then
-        if test "X$with_python" != Xyes; then
-            PYTHON=$with_python
-        fi
-        with_python=yes
-    fi
-    AC_MSG_RESULT($with_python)
+# serial 4
 
-    if test "X$with_python" == Xyes; then
-        if test -z "$PYTHON"; then
-            AC_PATH_PROG(PYTHON, python)
-        fi
-    
-        if test -n "$PYTHON"; then
-            AM_PATH_PYTHON($PYTHON_MIN_VERSION)
-            AM_CHECK_PYTHON_HEADERS(with_python="yes",with_python="no")
-    
-            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
-                    PYTHON_LDFLAGS="-Wl,-F. -Wl,-F. -bundle"
-                    if $PYTHON -c 'import sys, string; sys.exit(string.find(sys.prefix,"Framework")+1)'; then
-                        :
-                    else
-                        PYTHON_LDFLAGS="$PYTHON_LDFLAGS -framework Python"
-                    fi
-                else
-                    PYTHON_LDFLAGS="-shared"
-                fi
-                AC_SUBST(PYTHON_LDFLAGS)
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
 
-                dnl check for eyeD3 module >= $PYTHON_EYED3_MIN_VERSION
-                AM_CHECK_PYMOD(eyeD3,$PYTHON_EYED3_MIN_VERSION,eyeD3.eyeD3Version,,with_python=no)
 
-                dnl check for swig
-                if test "X$with_python" == Xyes; then
-                    AC_PROG_SWIG($SWIG_MIN_VERSION)
-                    with_python="$has_swig"
-                fi
-            fi
-        else
-            AC_MSG_WARN(python not found.  try --with-python=/path/to/python)
-            with_python="no"
-        fi
-    fi
-    AM_CONDITIONAL(HAVE_PYTHON, test x$with_python = xyes)
-])dnl
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# 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
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
 
+# Copyright (C) 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.
 
+# 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.)
+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])])
 
-# Copyright 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Helper functions for option handling.                     -*- Autoconf -*-
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# Copyright (C) 2001, 2002, 2003, 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.
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# serial 3
 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# AM_PATH_PYTHON([MINIMUM-VERSION])
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 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.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
 # Adds support for distributing Python modules and packages.  To
 # install modules, copy them to $(pythondir), using the python_PYTHON
 # automake variable.  To install a package with the same name as the
 # automake package, install to $(pkgpythondir), or use the
 # pkgpython_PYTHON automake variable.
-
+#
 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
 # locations to install python extension modules (shared libraries).
 # Another macro is required to find the appropriate flags to compile
 # extension modules.
-
+#
 # If your package is configured with a different prefix to python,
 # users will have to add the install directory to the PYTHONPATH
 # environment variable, or create a .pth file (see the python
 # documentation for details).
-
+#
 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
 # cause an error if the version of python installed on the system
 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
 # numbers and dots only.
-
 AC_DEFUN([AM_PATH_PYTHON],
  [
   dnl Find a Python interpreter.  Python versions prior to 1.5 are not
   dnl supported because the default installation locations changed from
   dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
   dnl in 1.5.
-  m4_define([_AM_PYTHON_INTERPRETER_LIST],
-	    [python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0 python1.6 python1.5])
 
   m4_if([$1],[],[
     dnl No version check is needed.
     # Find any Python interpreter.
-    AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
     am_display_PYTHON=python
   ], [
     dnl A version check is needed.
@@ -8264,23 +7696,31 @@
       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
 			      [AC_MSG_RESULT(yes)],
 			      [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
     else
       # Otherwise, try each interpreter until we find one that satisfies
       # VERSION.
       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
 	[am_cv_pathless_PYTHON],[
-	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do
-          if test "$am_cv_pathless_PYTHON" = : ; then
-            AC_MSG_ERROR([no suitable Python interpreter found])
-	  fi
-          AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
-        done])
+	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+	done])
       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
-      AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
       am_display_PYTHON=$am_cv_pathless_PYTHON
     fi
   ])
 
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
   dnl Query Python for its version number.  Getting [:3] seems to be
   dnl the best way to do this; it's what "site.py" does in the standard
   dnl library.
@@ -8340,6 +7780,11 @@
   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
 
   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
 ])
 
 
@@ -8361,23 +7806,12 @@
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
 
-# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
+# Copyright (C) 2001, 2003, 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.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
 # AM_RUN_LOG(COMMAND)
 # -------------------
 # Run COMMAND, save the exit status in ac_status, and log it.
@@ -8389,160 +7823,183 @@
    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    (exit $ac_status); }])
 
-dnl @synopsis AC_PROG_SWIG([major.minor.micro])
-dnl
-dnl This macro searches for a SWIG installation on your system. If
-dnl found you should call SWIG via $(SWIG). You can use the optional
-dnl first argument to check if the version of the available SWIG is
-dnl greater than or equal to the value of the argument. It should have
-dnl the format: N[.N[.N]] (N is a number between 0 and 999. Only the
-dnl first N is mandatory.)
-dnl
-dnl If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks
-dnl that the swig package is this version number or higher.
-dnl
-dnl In configure.in, use as:
-dnl
-dnl             AC_PROG_SWIG(1.3.17)
-dnl             SWIG_ENABLE_CXX
-dnl             SWIG_MULTI_MODULE_SUPPORT
-dnl             SWIG_PYTHON
-dnl
-dnl @category InstalledPackages
-dnl @author Sebastian Huber <sebastian-huber at web.de>
-dnl @author Alan W. Irwin <irwin at beluga.phys.uvic.ca>
-dnl @author Rafael Laboissiere <rafael at laboissiere.net>
-dnl @author Andrew Collier <abcollier at yahoo.com>
-dnl @version 2004-09-20
-dnl @license GPLWithACException
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-AC_DEFUN([AC_PROG_SWIG],[
-        AC_PATH_PROG([SWIG],[swig])
-        if test -z "$SWIG" ; then
-                AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
-                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
-        elif test -n "$1" ; then
-                AC_MSG_CHECKING([for SWIG version])
-                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
-                AC_MSG_RESULT([$swig_version])
-                if test -n "$swig_version" ; then
-                        # Calculate the required version number components
-                        [required=$1]
-                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
-                        if test -z "$required_major" ; then
-                                [required_major=0]
-                        fi
-                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
-                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
-                        if test -z "$required_minor" ; then
-                                [required_minor=0]
-                        fi
-                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
-                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
-                        if test -z "$required_patch" ; then
-                                [required_patch=0]
-                        fi
-                        # Calculate the available version number components
-                        [available=$swig_version]
-                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
-                        if test -z "$available_major" ; then
-                                [available_major=0]
-                        fi
-                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
-                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
-                        if test -z "$available_minor" ; then
-                                [available_minor=0]
-                        fi
-                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
-                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
-                        if test -z "$available_patch" ; then
-                                [available_patch=0]
-                        fi
-                        if test $available_major -ne $required_major \
-                                -o $available_minor -ne $required_minor \
-                                -o $available_patch -lt $required_patch ; then
-                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.  You should look at http://www.swig.org])
-                                SWIG='echo "Error: SWIG version >= $1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
-                                has_swig="no"
-                        else
-                                SWIG_LIB=`$SWIG -swiglib`
-                                has_swig="yes"
-                        fi
-                else
-                        AC_MSG_WARN([cannot determine SWIG version])
-                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
-                        has_swig="no"
-                fi
-        fi
-        AC_SUBST([SWIG_LIB])
-])
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 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.
 
-# SWIG_ENABLE_CXX()
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# Enable SWIG C++ support.  This affects all invocations of $(SWIG).
-AC_DEFUN([SWIG_ENABLE_CXX],[
-        AC_REQUIRE([AC_PROG_SWIG])
-        AC_REQUIRE([AC_PROG_CXX])
-        SWIG="$SWIG -c++"
-])
+# 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.
 
-# SWIG_MULTI_MODULE_SUPPORT()
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 #
-# Enable support for multiple modules.  This effects all invocations
-# of $(SWIG).  You have to link all generated modules against the
-# appropriate SWIG runtime library.  If you want to build Python
-# modules for example, use the SWIG_PYTHON() macro and link the
-# modules against $(SWIG_PYTHON_LIBS).
-#
-AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[
-        AC_REQUIRE([AC_PROG_SWIG])
-        SWIG="$SWIG -noruntime"
-])
+# 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.
 
-# SWIG_PYTHON([use-shadow-classes = {no, yes}])
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
-# and $(SWIG_PYTHON_OPT) output variables.
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
 #
-# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
-# code for Python.  Shadow classes are enabled unless the value of the
-# optional first argument is exactly 'no'.  If you need multi module
-# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use
-# $(SWIG_PYTHON_LIBS) to link against the appropriate library.  It
-# contains the SWIG Python runtime library that is needed by the type
-# check system for example.
-AC_DEFUN([SWIG_PYTHON],[
-        AC_REQUIRE([AC_PROG_SWIG])
-        AC_REQUIRE([AC_PYTHON_DEVEL])
-        test "x$1" != "xno" || swig_shadow=" -noproxy"
-        AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow])
-        AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
-])
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-dnl @synopsis AC_LIB_WAD
-dnl
-dnl This macro searches for installed WAD library.
-dnl
-AC_DEFUN([AC_LIB_WAD],
-[
-        AC_REQUIRE([AC_PYTHON_DEVEL])
-        AC_ARG_ENABLE(wad,
-        AC_HELP_STRING([--enable-wad], [enable wad module]),
-        [
-                case "${enableval}" in
-                        no)     ;;
-                        *)      if test "x${enableval}" = xyes;
-                                then
-                                        check_wad="yes"
-                                fi ;;
-                esac
-        ], [])
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
 
-        if test -n "$check_wad";
-        then
-                AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS)
-                AC_SUBST(WADPY)
-        fi
-])
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
+m4_include([m4/gtk-doc.m4])
+m4_include([m4/intltool.m4])
+m4_include([m4/python.m4])
+m4_include([m4/swig.m4])

Modified: libgpod/trunk/bindings/Makefile.in
===================================================================
--- libgpod/trunk/bindings/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -21,7 +20,6 @@
 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
@@ -35,7 +33,31 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+subdir = bindings
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+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
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +142,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -178,6 +198,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +225,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -217,29 +240,39 @@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 SUBDIRS = python
-subdir = bindings
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
-DIST_SUBDIRS = $(SUBDIRS)
 all: all-recursive
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  bindings/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  bindings/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
 
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -257,7 +290,13 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -269,7 +308,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -277,7 +316,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	case "$@" in \
 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -298,7 +343,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -309,14 +354,6 @@
 	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -325,19 +362,22 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
-	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
+	  empty_fix=.; \
 	else \
 	  include_option=--include; \
+	  empty_fix=; \
 	fi; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && \
+	    test ! -f $$subdir/TAGS || \
 	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
@@ -347,10 +387,11 @@
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -373,11 +414,7 @@
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -390,7 +427,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -405,15 +442,17 @@
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
 	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
 	    (cd $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -423,7 +462,6 @@
 all-am: Makefile
 installdirs: installdirs-recursive
 installdirs-am:
-
 install: install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
@@ -443,7 +481,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -461,6 +499,8 @@
 
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
 info-am:
@@ -495,22 +535,18 @@
 
 uninstall-info: uninstall-info-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-generic clean-libtool clean-recursive ctags \
+.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 \
-	dvi-recursive info info-am info-recursive install install-am \
-	install-data install-data-am install-data-recursive \
-	install-exec install-exec-am install-exec-recursive \
-	install-info install-info-am install-info-recursive install-man \
-	install-recursive install-strip installcheck installcheck-am \
-	installdirs installdirs-am installdirs-recursive \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
-	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am \
-	uninstall-info-recursive uninstall-recursive
+	distclean-recursive 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 \
+	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
 
 # 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	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/Makefile.am	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,45 +1,62 @@
 SUBDIRS = examples
 
-EXTRA_DIST =		\
-	gpod.i 		\
-	ipod.py 	\
-	__init__.py	\
-	gtkpod.py
+EXTRA_DIST =                \
+        README.in           \
+        __init__.py         \
+        gpod.i.in           \
+        gpod_doc.i.in       \
+        gtkdoc-to-swig.xsl  \
+        gtkpod.py           \
+        ipod.py
 
-CLEANFILES =		\
-	*.pyc		\
-	*.pyo		\
-	_gpod.so	\
-	gpod.py		\
-	gpod_wrap.c	\
-	gpod_wrap.o
+CLEANFILES =                \
+        *.pyc               \
+        *.pyo               \
+        _gpod.so            \
+        gpod.py             \
+        gpod_doc.i          \
+        gpod_wrap.*
 
-if HAVE_PYTHON
-MODULE_CFLAGS	= `$(PKG_CONFIG) --cflags $(top_srcdir)/libgpod-1.0.pc` $(PYTHON_INCLUDES)
-MODULE_LIBS	= `$(PKG_CONFIG) --libs $(top_srcdir)/libgpod-1.0.pc` -L$(top_srcdir)/src/.libs
-python_DATA	= gpod.py _gpod.so
+DISTCLEANFILES =            \
+        README              \
+        gpod.i
 
-gpod_wrap.c: gpod.i
-	$(SWIG) -python gpod.i
+README: README.in gpod.i
+	WRAPPER_LIST=`grep 'PyObject\* sw_[^_].*;' gpod.i | awk -F "[ (]" '{ print $$2 }' | sort -u | tr '\n' ' '`; \
+	sed \
+	    -e "s/@WRAPPER_LIST@/$${WRAPPER_LIST}/" \
+	    -e "/^sw_/ s/ $$//" \
+	    -e "/^sw_/ s/ /\n/g" \
+	    $< > $@
 
-gpod.py: gpod.i
-	$(SWIG) -python gpod.i
+if HAVE_PYTHON
+BUILT_SOURCES = gpod_wrap.c
+SWIG_INTERFACES = gpod.i gpod_doc.i
+LIBGPOD_CFLAGS += -fno-strict-aliasing
+INCLUDES = -I$(top_srcdir)/src
 
-gpod_wrap.o: gpod_wrap.c
-	$(CC) $(MODULE_CFLAGS) -c -fpic gpod_wrap.c
+gpoddir = $(pyexecdir)/gpod
+gpod_PYTHON =  __init__.py gtkpod.py ipod.py
+nodist_gpod_PYTHON = gpod.py
+gpod_LTLIBRARIES = _gpod.la
+nodist__gpod_la_SOURCES = gpod_wrap.c
+_gpod_la_CPPFLAGS = $(PYTHON_INCLUDES) $(LIBGPOD_CFLAGS) $(INCLUDES)
+_gpod_la_LDFLAGS = -module -avoid-version
+_gpod_la_LIBADD = $(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la
 
-_gpod.so: gpod_wrap.o
-	$(CC) $(MODULE_LIBS) @PYTHON_LDFLAGS@ gpod_wrap.o -o $@
+gpod_doc.i: $(srcdir)/gpod_doc.i.in $(srcdir)/gtkdoc-to-swig.xsl
+	cat $< > $@
+if ENABLE_GTK_DOC
+	-for xml in $(top_srcdir)/docs/reference/xml/*.xml; do \
+	    xsltproc $(srcdir)/gtkdoc-to-swig.xsl $$xml; \
+	done >> $@
+endif
 
-install-pythonDATA: $(python_DATA)
-	$(mkinstalldirs) $(DESTDIR)$(pythondir)/gpod
-	$(INSTALL_PROGRAM) _gpod.so  $(DESTDIR)$(pythondir)/gpod/_gpod.so
-	$(INSTALL_DATA) *.py         $(DESTDIR)$(pythondir)/gpod/
-	$(PYTHON) -c 'from compileall import compile_dir; compile_dir("$(DESTDIR)$(pythondir)/gpod/", ddir="$(pythondir)/gpod/")'
-	$(PYTHON) -O -c 'from compileall import compile_dir; compile_dir("$(DESTDIR)$(pythondir)/gpod/", ddir="$(pythondir)/gpod/")'
+gpod_wrap.c: $(SWIG_INTERFACES) $(nodist_gpod_PYTHON)
+	$(SWIG) -python $(INCLUDES) -o $@ $<
 
-uninstall-pythonDATA: $(python_DATA)
-	rm -rf $(DESTDIR)$(pythondir)/gpod
+gpod.py: $(SWIG_INTERFACES)
+	$(SWIG) -python -o $@ $<
 
 test:
 	cd tests && python tests.py

Modified: libgpod/trunk/bindings/python/Makefile.in
===================================================================
--- libgpod/trunk/bindings/python/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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.
@@ -21,7 +21,6 @@
 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
@@ -35,7 +34,64 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+ at HAVE_PYTHON_TRUE@am__append_1 = -fno-strict-aliasing
+subdir = bindings/python
+DIST_COMMON = README $(am__gpod_PYTHON_DIST) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/gpod.i.in
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = gpod.i
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)" \
+	"$(DESTDIR)$(gpoddir)"
+gpodLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(gpod_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+ at HAVE_PYTHON_TRUE@_gpod_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ at HAVE_PYTHON_TRUE@	$(top_builddir)/src/libgpod.la
+ at HAVE_PYTHON_TRUE@nodist__gpod_la_OBJECTS = _gpod_la-gpod_wrap.lo
+_gpod_la_OBJECTS = $(nodist__gpod_la_OBJECTS)
+ at HAVE_PYTHON_TRUE@am__gpod_la_rpath = -rpath $(gpoddir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -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)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --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
+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
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +176,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
-LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@ $(am__append_1)
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -178,6 +232,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +259,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -217,51 +274,140 @@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 SUBDIRS = examples
-
 EXTRA_DIST = \
-	gpod.i 		\
-	ipod.py 	\
-	__init__.py	\
-	gtkpod.py
+        README.in           \
+        __init__.py         \
+        gpod.i.in           \
+        gpod_doc.i.in       \
+        gtkdoc-to-swig.xsl  \
+        gtkpod.py           \
+        ipod.py
 
-
 CLEANFILES = \
-	*.pyc		\
-	*.pyo		\
-	_gpod.so	\
-	gpod.py		\
-	gpod_wrap.c	\
-	gpod_wrap.o
+        *.pyc               \
+        *.pyo               \
+        _gpod.so            \
+        gpod.py             \
+        gpod_doc.i          \
+        gpod_wrap.*
 
+DISTCLEANFILES = \
+        README              \
+        gpod.i
 
- at HAVE_PYTHON_TRUE@MODULE_CFLAGS = `$(PKG_CONFIG) --cflags $(top_srcdir)/libgpod-1.0.pc` $(PYTHON_INCLUDES)
- at HAVE_PYTHON_TRUE@MODULE_LIBS = `$(PKG_CONFIG) --libs $(top_srcdir)/libgpod-1.0.pc` -L$(top_srcdir)/src/.libs
- at HAVE_PYTHON_TRUE@python_DATA = gpod.py _gpod.so
-subdir = bindings/python
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DATA = $(python_DATA)
+ at HAVE_PYTHON_TRUE@BUILT_SOURCES = gpod_wrap.c
+ at HAVE_PYTHON_TRUE@SWIG_INTERFACES = gpod.i gpod_doc.i
+ at HAVE_PYTHON_TRUE@INCLUDES = -I$(top_srcdir)/src
+ at HAVE_PYTHON_TRUE@gpoddir = $(pyexecdir)/gpod
+ at HAVE_PYTHON_TRUE@gpod_PYTHON = __init__.py gtkpod.py ipod.py
+ at HAVE_PYTHON_TRUE@nodist_gpod_PYTHON = gpod.py
+ at HAVE_PYTHON_TRUE@gpod_LTLIBRARIES = _gpod.la
+ at HAVE_PYTHON_TRUE@nodist__gpod_la_SOURCES = gpod_wrap.c
+ at HAVE_PYTHON_TRUE@_gpod_la_CPPFLAGS = $(PYTHON_INCLUDES) $(LIBGPOD_CFLAGS) $(INCLUDES)
+ at HAVE_PYTHON_TRUE@_gpod_la_LDFLAGS = -module -avoid-version
+ at HAVE_PYTHON_TRUE@_gpod_la_LIBADD = $(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
-DIST_SUBDIRS = $(SUBDIRS)
-all: all-recursive
-
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  bindings/python/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  bindings/python/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
 
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+gpod.i: $(top_builddir)/config.status $(srcdir)/gpod.i.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-gpodLTLIBRARIES: $(gpod_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	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"; \
+	  else :; fi; \
+	done
+
+uninstall-gpodLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; 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"; \
+	done
+
+clean-gpodLTLIBRARIES:
+	-test -z "$(gpod_LTLIBRARIES)" || rm -f $(gpod_LTLIBRARIES)
+	@list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  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)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gpod_wrap.c' object='_gpod_la-gpod_wrap.lo' libtool=yes @AMDEPBACKSLASH@
+ at 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
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -271,25 +417,63 @@
 distclean-libtool:
 	-rm -f libtool
 uninstall-info-am:
-pythonDATA_INSTALL = $(INSTALL_DATA)
- at HAVE_PYTHON_FALSE@install-pythonDATA: $(python_DATA)
- at HAVE_PYTHON_FALSE@	@$(NORMAL_INSTALL)
- at HAVE_PYTHON_FALSE@	$(mkinstalldirs) $(DESTDIR)$(pythondir)
- at HAVE_PYTHON_FALSE@	@list='$(python_DATA)'; for p in $$list; do \
- at HAVE_PYTHON_FALSE@	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- at HAVE_PYTHON_FALSE@	  f="`echo $$p | sed -e 's|^.*/||'`"; \
- at HAVE_PYTHON_FALSE@	  echo " $(pythonDATA_INSTALL) $$d$$p $(DESTDIR)$(pythondir)/$$f"; \
- at HAVE_PYTHON_FALSE@	  $(pythonDATA_INSTALL) $$d$$p $(DESTDIR)$(pythondir)/$$f; \
- at HAVE_PYTHON_FALSE@	done
+install-gpodPYTHON: $(gpod_PYTHON)
+	@$(NORMAL_INSTALL)
+	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 \
+	    f=$(am__strip_dir) \
+	    dlist="$$dlist $$f"; \
+	    echo " $(gpodPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
+	    $(gpodPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
+	  else :; fi; \
+	done; \
+	if test -n "$$dlist"; then \
+	  if test -z "$(DESTDIR)"; then \
+	    PYTHON=$(PYTHON) $(py_compile) --basedir "$(gpoddir)" $$dlist; \
+	  else \
+	    PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(gpoddir)" $$dlist; \
+	  fi; \
+	else :; fi
 
- at HAVE_PYTHON_FALSE@uninstall-pythonDATA:
- at HAVE_PYTHON_FALSE@	@$(NORMAL_UNINSTALL)
- at HAVE_PYTHON_FALSE@	@list='$(python_DATA)'; for p in $$list; do \
- at HAVE_PYTHON_FALSE@	  f="`echo $$p | sed -e 's|^.*/||'`"; \
- at HAVE_PYTHON_FALSE@	  echo " rm -f $(DESTDIR)$(pythondir)/$$f"; \
- at HAVE_PYTHON_FALSE@	  rm -f $(DESTDIR)$(pythondir)/$$f; \
- at HAVE_PYTHON_FALSE@	done
+uninstall-gpodPYTHON:
+	@$(NORMAL_UNINSTALL)
+	@list='$(gpod_PYTHON)'; dlist=''; for p in $$list; do\
+	  f=$(am__strip_dir) \
+	  rm -f "$(DESTDIR)$(gpoddir)/$$f"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}c"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}o"; \
+	done
+install-nodist_gpodPYTHON: $(nodist_gpod_PYTHON)
+	@$(NORMAL_INSTALL)
+	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 \
+	    f=$(am__strip_dir) \
+	    dlist="$$dlist $$f"; \
+	    echo " $(nodist_gpodPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
+	    $(nodist_gpodPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
+	  else :; fi; \
+	done; \
+	if test -n "$$dlist"; then \
+	  if test -z "$(DESTDIR)"; then \
+	    PYTHON=$(PYTHON) $(py_compile) --basedir "$(gpoddir)" $$dlist; \
+	  else \
+	    PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(gpoddir)" $$dlist; \
+	  fi; \
+	else :; fi
 
+uninstall-nodist_gpodPYTHON:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_gpod_PYTHON)'; dlist=''; for p in $$list; do\
+	  f=$(am__strip_dir) \
+	  rm -f "$(DESTDIR)$(gpoddir)/$$f"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}c"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}o"; \
+	done
+
 # 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,
@@ -297,7 +481,13 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -309,7 +499,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -317,7 +507,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	case "$@" in \
 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -338,7 +534,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -349,14 +545,6 @@
 	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -365,19 +553,22 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
-	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
+	  empty_fix=.; \
 	else \
 	  include_option=--include; \
+	  empty_fix=; \
 	fi; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && \
+	    test ! -f $$subdir/TAGS || \
 	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
@@ -387,10 +578,11 @@
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -413,11 +605,7 @@
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -430,7 +618,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -445,27 +633,32 @@
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
 	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
 	    (cd $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
 	done
 check-am: all-am
-check: check-recursive
-all-am: Makefile $(DATA)
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES)
 installdirs: installdirs-recursive
 installdirs-am:
-	$(mkinstalldirs) $(DESTDIR)$(pythondir)
-
-install: install-recursive
+	for dir in "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
@@ -485,29 +678,36 @@
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
 	@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)
 clean: clean-recursive
 
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-gpodLTLIBRARIES clean-libtool \
+	mostlyclean-am
 
 distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
 
 dvi: dvi-recursive
 
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
 info-am:
 
-install-data-am: install-pythonDATA
+install-data-am: install-gpodLTLIBRARIES install-gpodPYTHON \
+	install-nodist_gpodPYTHON
 
 install-exec-am:
 
@@ -518,12 +718,14 @@
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-recursive
 
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
 
 pdf: pdf-recursive
 
@@ -533,51 +735,49 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-pythonDATA
+uninstall-am: uninstall-gpodLTLIBRARIES uninstall-gpodPYTHON \
+	uninstall-info-am uninstall-nodist_gpodPYTHON
 
 uninstall-info: uninstall-info-recursive
 
-.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 \
-	dvi-recursive info info-am info-recursive install install-am \
-	install-data install-data-am install-data-recursive \
-	install-exec install-exec-am install-exec-recursive \
-	install-info install-info-am install-info-recursive install-man \
-	install-pythonDATA install-recursive install-strip installcheck \
-	installcheck-am installdirs installdirs-am \
-	installdirs-recursive maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
-	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am \
-	uninstall-info-recursive uninstall-pythonDATA \
-	uninstall-recursive
+.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 \
+	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 \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-gpodLTLIBRARIES uninstall-gpodPYTHON \
+	uninstall-info-am uninstall-nodist_gpodPYTHON
 
 
- at HAVE_PYTHON_TRUE@gpod_wrap.c: gpod.i
- at HAVE_PYTHON_TRUE@	$(SWIG) -python gpod.i
+README: README.in gpod.i
+	WRAPPER_LIST=`grep 'PyObject\* sw_[^_].*;' gpod.i | awk -F "[ (]" '{ print $$2 }' | sort -u | tr '\n' ' '`; \
+	sed \
+	    -e "s/@WRAPPER_LIST@/$${WRAPPER_LIST}/" \
+	    -e "/^sw_/ s/ $$//" \
+	    -e "/^sw_/ s/ /\n/g" \
+	    $< > $@
 
- at HAVE_PYTHON_TRUE@gpod.py: gpod.i
- at HAVE_PYTHON_TRUE@	$(SWIG) -python gpod.i
+ at HAVE_PYTHON_TRUE@gpod_doc.i: $(srcdir)/gpod_doc.i.in $(srcdir)/gtkdoc-to-swig.xsl
+ at HAVE_PYTHON_TRUE@	cat $< > $@
+ at ENABLE_GTK_DOC_TRUE@@HAVE_PYTHON_TRUE@	-for xml in $(top_srcdir)/docs/reference/xml/*.xml; do \
+ at ENABLE_GTK_DOC_TRUE@@HAVE_PYTHON_TRUE@	    xsltproc $(srcdir)/gtkdoc-to-swig.xsl $$xml; \
+ at ENABLE_GTK_DOC_TRUE@@HAVE_PYTHON_TRUE@	done >> $@
 
- at HAVE_PYTHON_TRUE@gpod_wrap.o: gpod_wrap.c
- at HAVE_PYTHON_TRUE@	$(CC) $(MODULE_CFLAGS) -c -fpic gpod_wrap.c
+ at HAVE_PYTHON_TRUE@gpod_wrap.c: $(SWIG_INTERFACES) $(nodist_gpod_PYTHON)
+ at HAVE_PYTHON_TRUE@	$(SWIG) -python $(INCLUDES) -o $@ $<
 
- at HAVE_PYTHON_TRUE@_gpod.so: gpod_wrap.o
- at HAVE_PYTHON_TRUE@	$(CC) $(MODULE_LIBS) @PYTHON_LDFLAGS@ gpod_wrap.o -o $@
+ at HAVE_PYTHON_TRUE@gpod.py: $(SWIG_INTERFACES)
+ at HAVE_PYTHON_TRUE@	$(SWIG) -python -o $@ $<
 
- at HAVE_PYTHON_TRUE@install-pythonDATA: $(python_DATA)
- at HAVE_PYTHON_TRUE@	$(mkinstalldirs) $(DESTDIR)$(pythondir)/gpod
- at HAVE_PYTHON_TRUE@	$(INSTALL_PROGRAM) _gpod.so  $(DESTDIR)$(pythondir)/gpod/_gpod.so
- at HAVE_PYTHON_TRUE@	$(INSTALL_DATA) *.py         $(DESTDIR)$(pythondir)/gpod/
- at HAVE_PYTHON_TRUE@	$(PYTHON) -c 'from compileall import compile_dir; compile_dir("$(DESTDIR)$(pythondir)/gpod/", ddir="$(pythondir)/gpod/")'
- at HAVE_PYTHON_TRUE@	$(PYTHON) -O -c 'from compileall import compile_dir; compile_dir("$(DESTDIR)$(pythondir)/gpod/", ddir="$(pythondir)/gpod/")'
-
- at HAVE_PYTHON_TRUE@uninstall-pythonDATA: $(python_DATA)
- at HAVE_PYTHON_TRUE@	rm -rf $(DESTDIR)$(pythondir)/gpod
-
 @HAVE_PYTHON_TRUE at test:
 @HAVE_PYTHON_TRUE@	cd tests && python tests.py
 # Tell versions [3.59,3.63) of GNU make to not export all variables.

Copied: libgpod/trunk/bindings/python/README (from rev 167, libgpod/branches/upstream/current/bindings/python/README)

Copied: libgpod/trunk/bindings/python/README.in (from rev 167, libgpod/branches/upstream/current/bindings/python/README.in)

Modified: libgpod/trunk/bindings/python/__init__.py
===================================================================
--- libgpod/trunk/bindings/python/__init__.py	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/__init__.py	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,3 +1,10 @@
+"""Manage tracks and playlists on an iPod.
+
+The gpod module allows you to add and remove tracks, create and edit
+playlists, and other iPod tasks.
+
+"""
+
 from gpod import *
 from ipod import *
 
@@ -3,3 +10,2 @@
 __all__ = ["DatabaseException", "TrackException",
            "Database","Track","Playlist"]
-

Modified: libgpod/trunk/bindings/python/examples/Makefile.in
===================================================================
--- libgpod/trunk/bindings/python/examples/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/examples/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -21,7 +20,6 @@
 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
@@ -35,7 +33,22 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+subdir = bindings/python/examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +133,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -178,6 +189,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +216,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -221,22 +235,39 @@
              play_with_ipod_api.py create_mp3_tags_from_itdb.py \
              play_with_smart_playlists.py
 
-subdir = bindings/python/examples
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  bindings/python/examples/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  bindings/python/examples/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
 
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -252,11 +283,7 @@
 ctags: CTAGS
 CTAGS:
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ../../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -269,7 +296,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -287,7 +314,6 @@
 check-am: all-am
 check: check-am
 all-am: Makefile
-
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -308,7 +334,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -325,6 +351,8 @@
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
@@ -359,10 +387,10 @@
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-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 \
-	installcheck-am installdirs maintainer-clean \
+	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 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

Modified: libgpod/trunk/bindings/python/examples/create_mp3_tags_from_itdb.py
===================================================================
--- libgpod/trunk/bindings/python/examples/create_mp3_tags_from_itdb.py	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/examples/create_mp3_tags_from_itdb.py	2007-01-25 10:46:30 UTC (rev 168)
@@ -32,7 +32,7 @@
 import eyeD3
 
 # please specify your iPod mountpoint here..
-IPOD_MOUNT = '/media/ipod/'
+IPOD_MOUNT = '/mnt/ipod/'
 
 itdb = gpod.itdb_parse( IPOD_MOUNT, None)
 

Deleted: libgpod/trunk/bindings/python/gpod.i
===================================================================
--- libgpod/trunk/bindings/python/gpod.i	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/gpod.i	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,283 +0,0 @@
-/* File : gpod.i */
-
-/*
- Copyright (C) 2005 Nick Piper <nick-gtkpod at nickpiper co uk>
- 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
-
- $Id: gpod.i,v 1.15 2006/05/17 08:26:11 nicholas Exp $
-
-Please send any fixes, improvements or suggestions to
-<nick-gtkpod at nickpiper co uk>.
-
-*/
-
-%module gpod
-%{
-#include "../../src/db-artwork-debug.h" 
-#include "../../src/db-artwork-parser.h" 
-#include "../../src/db-image-parser.h" 
-#include "../../src/db-itunes-parser.h" 
-#include "../../src/db-parse-context.h" 
-#include "../../src/itdb.h" 
-#include "../../src/itdb_private.h"
-
-PyObject* sw_get_tracks(Itdb_iTunesDB *itdb) {
-  PyObject    *list;
-  gint        i;
-  GList       *l;
-  list = PyList_New(g_list_length(itdb->tracks));
-  for (l = itdb->tracks, i = 0; l; l = l->next, ++i) {
-    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Track, 0));
-  }
-  return list;
- }
-
-PyObject* sw_get_track(GList *list, gint index) {
-  GList *position;
-  if ( (index >= g_list_length(list)) || index < 0 ) {
-   PyErr_SetString(PyExc_IndexError, "Value out of range");
-   return NULL;
-  }
-  position = g_list_nth(list, index);
-  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_Track, 0);
- }
-
-PyObject* sw_get_rule(GList *list, gint index) {
-  GList *position;
-  if ( (index >= g_list_length(list)) || index < 0 ) {
-   PyErr_SetString(PyExc_IndexError, "Value out of range");
-   return NULL;
-  }
-  position = g_list_nth(list, index);
-  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__SPLRule, 0);
- }
-
-PyObject* sw_get_playlist(GList *list, gint index) {
-  GList *position;
-  if ( (index >= g_list_length(list)) || index < 0 ) {
-   PyErr_SetString(PyExc_IndexError, "Value out of range");
-   return NULL;
-  }
-  position = g_list_nth(list, index);
-  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_Playlist, 0);
- }
-
-PyObject* sw_get_list_len(GList *list) {
-   return PyInt_FromLong(g_list_length(list));
- }
-
-PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl) {
-  PyObject    *list;
-  gint        i;
-  GList       *l;
-  list = PyList_New(g_list_length(pl->members));
-  for (l = pl->members, i = 0; l; l = l->next, ++i) {
-    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Track, 0));
-  }
-  return list;
- }
-
-PyObject* sw_get_playlists(Itdb_iTunesDB *itdb) {
-  PyObject    *list;
-  gint        i;
-  GList       *l;
-  list = PyList_New(g_list_length(itdb->playlists));
-  for (l = itdb->playlists, i = 0; l; l = l->next, ++i) {
-    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Playlist, 0));
-  }
-  return list;
- }
- 
- void sw__track_extra_destroy (PyObject *data) {
-   Py_XDECREF(data);   
- }
-
- PyObject *sw__track_extra_duplicate (PyObject *data) {
-   if (data == Py_None) {
-     Py_INCREF(Py_None);
-     return Py_None;
-   } else {
-     return PyDict_Copy(data);
-   }
- }
-
- PyObject *sw_set_track_userdata(Itdb_Track *track, PyObject *data) {
-   Py_INCREF(data);
-   if ((PyDict_Check(data)) || (data == Py_None)) {
-     if (track->userdata) {
-       Py_DECREF((PyObject *)track->userdata);
-     }
-     track->userdata = (gpointer) data;
-     track->userdata_duplicate = (ItdbUserDataDuplicateFunc)sw__track_extra_duplicate;
-     track->userdata_destroy   = (ItdbUserDataDestroyFunc)sw__track_extra_destroy;
-     Py_INCREF(Py_None);
-     return Py_None;
-   } else {
-     PyErr_SetString(PyExc_TypeError, "userdata must be a Dictionary");
-     return NULL;
-   }
- }
- 
- PyObject* sw_get_track_userdata(Itdb_Track *track) {
-   if (track->userdata) {
-     Py_INCREF((PyObject *)track->userdata);
-     return (PyObject *)track->userdata;
-   } else {
-     Py_INCREF(Py_None);
-     return Py_None;
-   }
- }
- 
- 
-%}
-
-# be nicer to decode these utf8 strings into Unicode objects in the C
-# layer. Here we are leaving it to the Python side, and just giving
-# them utf8 encoded Strings.
-typedef char gchar;
-
-
-%typemap(in) guint8 {
-   unsigned long ival;
-   ival = PyInt_AsUnsignedLongMask($input);
-   if (PyErr_Occurred())
-        SWIG_fail;
-   if (ival > 255) {
-      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between 0 and 255");
-      SWIG_fail;
-   } else {
-      $1 = (guint8) ival;
-   }
-}
-
-%typemap(in) gint8 {
-   long ival;
-   ival = PyInt_AsInt($input);
-   if (PyErr_Occurred())
-        SWIG_fail;
-   if ((ival < -128) || (ival > 127)) {
-      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between -128 and 127");
-      SWIG_fail;
-   } else {
-      $1 = (gint8) ival;
-   }
-}
-
-%typemap(in) guint16 {
-   unsigned long ival;
-   ival = PyInt_AsUnsignedLongMask($input);
-   if (PyErr_Occurred())
-        SWIG_fail;
-   if (ival > 65535) {
-      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between 0 and 65535");
-      SWIG_fail;
-   } else {
-      $1 = (guint16) ival;
-   }
-}
-
-%typemap(in) gint16 {
-   long ival;
-   ival = PyInt_AsLong($input);
-   if (PyErr_Occurred())
-        SWIG_fail;
-   if ((ival < -32768) || (ival > 32767)) {
-      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between -32,768 and 32,767");
-      SWIG_fail;
-   } else {
-      $1 = (gint16) ival;
-   }
-}
-
-%typemap(in) guint32 {
-   unsigned long ival;
-   ival = PyInt_AsUnsignedLongMask($input);
-   if (PyErr_Occurred())
-        SWIG_fail;
-   $1 = (guint32) ival;
-}
-
-%typemap(in) gint32 {
-   long ival;
-   ival = PyInt_AsLong($input);
-   if (PyErr_Occurred())
-        SWIG_fail;
-   $1 = (gint32) ival;
-}
-
-%typemap(in) guint64 {
-  if (PyInt_CheckExact($input))
-    $1 = PyInt_AsUnsignedLongLongMask($input);
-  else
-    $1 = PyLong_AsUnsignedLongLong($input);
-  if (PyErr_Occurred())
-    SWIG_fail;
-}
-
-%typemap(in) gint64 {
-  if (PyInt_CheckExact($input))
-    $1 = PyInt_AsLong($input);
-  else
-    $1 = PyLong_AsLongLong($input);
-  if (PyErr_Occurred())
-    SWIG_fail;
-}
-
-%typemap(out) guint64 {
-   $result = PyLong_FromUnsignedLongLong($1);
-}
-
-%typemap(out) gint64 {
-   $result = PyLong_FromLongLong($1);
-}
-
-%typemap(out) guint32 {
-   $result = PyLong_FromUnsignedLong($1);
-}
-
-%typemap(out) gint32 {
-   $result = PyLong_FromLong($1);
-}
-
-%typemap(out) guint16 {
-   $result = PyLong_FromUnsignedLong($1);
-}
-
-%typemap(out) guint8 {
-   $result = PyInt_FromLong($1);
-}
-
-typedef int gboolean;
-typedef int gint;
-
-#define G_BEGIN_DECLS
-#define G_END_DECLS
-
-PyObject* sw_get_tracks(Itdb_iTunesDB *itdb);
-PyObject* sw_get_track(GList *list, gint index);
-PyObject* sw_get_rule(GList *list, gint index);
-PyObject* sw_get_playlist(GList *list, gint index);
-PyObject* sw_get_list_len(GList *list);
-PyObject* sw_get_playlists(Itdb_iTunesDB *itdb);
-PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl);
-PyObject* sw_set_track_userdata(Itdb_Track *track, PyObject *data);
-PyObject* sw_get_track_userdata(Itdb_Track *track);
-
-%include "../../src/itdb.h"

Copied: libgpod/trunk/bindings/python/gpod.i.in (from rev 167, libgpod/branches/upstream/current/bindings/python/gpod.i.in)

Copied: libgpod/trunk/bindings/python/gpod_doc.i.in (from rev 167, libgpod/branches/upstream/current/bindings/python/gpod_doc.i.in)

Copied: libgpod/trunk/bindings/python/gtkdoc-to-swig.xsl (from rev 167, libgpod/branches/upstream/current/bindings/python/gtkdoc-to-swig.xsl)

Modified: libgpod/trunk/bindings/python/gtkpod.py
===================================================================
--- libgpod/trunk/bindings/python/gtkpod.py	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/gtkpod.py	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,21 +1,28 @@
-#!/usr/bin/env python
+"""Read and write Gtkpod extended info files."""
+
 import sha
 import os
 import socket
+import types
+import locale
 
 # This file is originally stolen from pypod-0.5.0
 # http://superduper.net/index.py?page=pypod
 # I hope that's ok, both works are GPL.
 
 hostname = socket.gethostname()
+defaultencoding = locale.getpreferredencoding()
 
 class ParseError(Exception):
+    """Exception for parse errors."""
     pass
 
 class SyncError(Exception):
+    """Exception for sync errors."""
     pass
 
 def sha1_hash(filename):
+    """Return an SHA1 hash on the first 16k of a file."""
     import struct
     # only hash the first 16k
     hash_len = 4*4096
@@ -26,34 +33,71 @@
     return hash.hexdigest()
 
 def write(filename, db, itunesdb_file):
+    """Save extended info to a file.
+
+    db is a gpod.Database instance
+
+    Extended info is written for the iTunesDB specified in
+    itunesdb_file
+
+    """
+
     file = open(filename, "w")
 
     def write_pair(name, value):
-        value = unicode(value).encode("utf-8")
+        if isinstance(value,types.UnicodeType):
+            # encode as UTF-8
+            value = value.encode("utf-8")
+        elif isinstance(value,types.StringType):
+            # assume it's in our default locale, so decode
+            # then re-encode as UTF-8
+            value = unicode(value,
+                            defaultencoding).encode("utf-8")
+        else:
+            value = str(value)
+            
+            
         file.write("=".join([name, value]))
         file.write('\n')
 
     write_pair("itunesdb_hash", sha1_hash(itunesdb_file))
-    write_pair("version", "0.88.1")
+    write_pair("version", "0.99.9")
 
     for track in db:
         write_pair("id", track['id'])
         if not track['userdata']:
             track['userdata'] = {}
-        track['userdata']['filename_ipod'] = track.ipod_filename()
+        if track['ipod_path']:
+            track['userdata']['filename_ipod'] = track['ipod_path']
+        hash_name = 'sha1_hash'
         try:
-            del track['userdata']['md5_hash']
-        except IndexError:
-            pass
-        if track['userdata'].has_key('filename_locale') and not track['userdata'].has_key('md5_hash'):
+            del track['userdata'][hash_name]
+        except KeyError:
+            # recent gpod uses sha1_hash, older uses md5_hash            
+            try:
+                del track['userdata'][hash_name]
+                hash_name = 'md5_hash'
+            except KeyError:
+                # we'll just write a sha1_hash then
+                pass
+        if track['userdata'].has_key('filename_locale') and not track['userdata'].has_key(hash_name):
             if os.path.exists(track['userdata']['filename_locale']):
-                track['userdata']['md5_hash'] = sha1_hash(
+                track['userdata'][hash_name] = sha1_hash(
                     track['userdata']['filename_locale'])
         [write_pair(i[0],i[1]) for i in track['userdata'].items()]
 
     write_pair("id", "xxx")
 
 def parse(filename, db, itunesdb_file=None):
+    """Load extended info from a file.
+
+    db is a gpod.Database instance
+
+    If itunesdb_file is set and it's hash is valid some expensive
+    checks are skipped.
+
+    """
+
     tracks_by_id  = {}
     tracks_by_sha = {}    
     id = 0
@@ -93,7 +137,13 @@
             tracks_by_id[id]['userdata'] = ext_block
     else:
         for track in db:
+            # make a dict to allow us to find each track by the sha1_hash
             tracks_by_sha[sha1_hash(track.ipod_filename())] = track
         for ext_block in ext_data.values():
-            tracks_by_sha[ext_block['md5_hash']]['userdata'] = ext_block
+            try:
+                track = tracks_by_sha[ext_block['sha1_hash']]
+            except KeyError:
+                # recent gpod uses sha1_hash, older uses md5_hash
+                track = tracks_by_sha[ext_block['md5_hash']]                
+            track['userdata'] = ext_block
 

Modified: libgpod/trunk/bindings/python/ipod.py
===================================================================
--- libgpod/trunk/bindings/python/ipod.py	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/bindings/python/ipod.py	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,6 +1,8 @@
-"""Documentation for this module.
+"""Manage tracks and playlists on an iPod.
 
-More details.
+You should normally just import the gpod module which will import the
+classes and methods provided here.
+
 """
 
 import gpod
@@ -10,13 +12,41 @@
 import os
 
 class DatabaseException(RuntimeError):
+    """Exception for database errors."""
     pass
 
 class TrackException(RuntimeError):
+    """Exception for track errors."""
     pass
 
 class Database:
+    """An iTunes database.
+
+    A database contains playlists and tracks.
+
+    """
+
     def __init__(self, mountpoint="/mnt/ipod", local=False, localdb=None):
+        """Create a Database object.
+
+        You can create the object from a mounted iPod or from a local
+        database file.
+
+        To use a mounted iPod:
+
+            db = gpod.Database('/mnt/ipod')
+
+        To use a local database file:
+
+            db = gpod.Database(localdb='/path/to/iTunesDB')
+
+        If you specify local=True then the default local database from
+        gtkpod will be used (~/.gtkpod/local_0.itdb):
+
+            db = gpod.Database(local=True)
+
+        """
+
         if local or localdb:
             if localdb:
                 self._itdb_file = localdb
@@ -37,7 +67,7 @@
 
     def __str__(self):
         return self.__repr__()
-    
+
     def __repr__(self):
         return "<Database Filename:%s Playlists:%s Tracks:%s>" % (
             repr(self._itdb.filename),
@@ -45,12 +75,21 @@
             len(self))
 
     def _load_gtkpod_extended_info(self):
+        """Read extended information from a gtkpod .ext file."""
         itdbext_file = "%s.ext" % (self._itdb_file)
 
         if os.path.exists(self._itdb_file) and os.path.exists(itdbext_file):
             gtkpod.parse(itdbext_file, self, self._itdb_file)
 
     def close(self):
+        """Save and close the database.
+
+        Note: If you are working with an iPod you should normally call
+        copy_delayed_files() prior to close() to ensure that newly
+        added or updated tracks are transferred to the iPod.
+
+        """
+
         if not gpod.itdb_write_file(self._itdb, self._itdb_file, None):
             raise DatabaseException("Unable to save iTunes database %s" % self)
         itdbext_file = "%s.ext" % (self._itdb_file)        
@@ -62,24 +101,49 @@
         else:
             if index < 0:
                 index += len(self)
-            return Track(proxied_track=gpod.sw_get_track(self._itdb.tracks, index))
+            return Track(proxied_track=gpod.sw_get_track(self._itdb.tracks, index),
+                         ownerdb=self)
 
     def __len__(self):
         return gpod.sw_get_list_len(self._itdb.tracks)
 
     def import_file(self, filename):
+        """Import a file.
+
+        filename is added to the end of the master playlist.
+
+        """
         track = Track(filename)
         track.copy_to_ipod()
         gpod.itdb_playlist_add_track(gpod.itdb_playlist_mpl(self._itdb),
                                      track._track, -1)
+        track.__database = self # so the db doesn't get gc'd
 
     def __del__(self):
         gpod.itdb_free(self._itdb)
 
     def add(self, track, pos=-1):
+        """Add a track to a database.
+
+        If pos is set the track will be inserted at that position.  By
+        default the track will be added at the end of the database.
+
+        """
+
         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):
+        """Remove a playlist or track from a database.
+
+        item is either a playlist or track object.
+
+        If harddisk is True the item will be removed from the the hard drive.
+
+        If ipod is True the item will be removed from the iPod.
+
+        """
+
         if isinstance(item, Playlist):
             if ipod or harddisk:
                 # remove all the tracks that were in this playlist
@@ -109,12 +173,15 @@
             raise DatabaseException("Unable to remove a %s from database" % type(item))
 
     def get_master(self):
+        """Get the Master playlist."""
         return Playlist(self,proxied_playlist=gpod.itdb_playlist_mpl(self._itdb))
 
     def get_podcasts(self):
+        """Get the podcasts playlist."""
         return Playlist(self,proxied_playlist=gpod.itdb_playlist_podcasts(self._itdb))
 
     def get_playlists(self):
+        """Get all playlists."""
         return _Playlists(self)
 
     Master   = property(get_master)
@@ -122,21 +189,48 @@
     Playlists= property(get_playlists) 
 
     def smart_update(self):
+        """Update all smart playlists."""
         gpod.itdb_spl_update_all(self._itdb)
 
     def new_Playlist(self,*args,**kwargs):
+        """Create a new Playlist.
+
+        See Playlist.__init__() for details.
+
+        """
+
         return Playlist(self, *args,**kwargs)
 
     def new_Track(self,**kwargs):
+        """Create a new Track.
+
+        See Track.__init__() for details.
+
+        """
+
         track = Track(**kwargs)
         self.add(track)
         if kwargs.has_key('podcast') and kwargs['podcast'] == True:
             self.Podcasts.add(track)
         else:
             self.Master.add(track)
+        track.__database = self # so the db doesn't get gc'd            
         return track
 
     def copy_delayed_files(self,callback=False):
+        """Copy files not marked as transferred to the iPod.
+
+        callback is an optional function that will be called for each
+        track that is copied.  It will be passed the following
+        arguments:
+
+            database -> the database object
+            track    -> the track being copied
+            iterator -> the current track number being copied
+            total    -> the total tracks to be copied
+
+        """
+
         if not gpod.itdb_get_mountpoint(self._itdb):
             # we're not working with a real ipod.
             return
@@ -157,10 +251,22 @@
             track.copy_to_ipod()
 
 class Track:
+    """A track in an iTunes database.
+
+    A track contains information like the artist, title, album, etc.
+    It also contains data like the location on the iPod, whether there
+    is artwork stored, the track has lyrics, etc.
+
+    Information from a gtkpod extended info file (if one exists for
+    the iTunesDB) is also available in Track['userdata'].
+
+    The information is stored in a dictionary.
+
+    """
+
     # Note we don't free the underlying structure, as it's still used
     # by the itdb.
-    
-    
+
     _proxied_attributes = ("title","ipod_path","album","artist","genre","filetype",
                            "comment","category","composer","grouping","description",
                            "podcasturl","podcastrss","chapterdata","subtitle","id",
@@ -178,7 +284,21 @@
                            "usertype")
 
     def __init__(self, filename=None, from_file=None,
-                 proxied_track=None, podcast=False):
+                 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.
+
+        If proxied_track is set, it is expected to be an Itdb_Track
+        object.
+
+        If podcast is True then the track will be setup as a Podcast,
+        unless proxied_track is set. 
+
+        """
+
+        # XXX couldn't from_file and filename be merged? 
         if from_file:
             filename = from_file
         if filename:
@@ -216,11 +336,13 @@
             self.set_podcast(podcast)
         elif proxied_track:
             self._track = proxied_track
+            self.__database = ownerdb # so the db doesn't get gc'd
         else:
             self._track = gpod.itdb_track_new()
-        self.set_podcast(podcast)
+            self.set_podcast(podcast)
 
     def copy_to_ipod(self):
+        """Copy the track to the iPod."""
         self['userdata']['md5_hash'] = gtkpod.sha1_hash(
             self['userdata']['filename_locale'])
         if not gpod.itdb_get_mountpoint(self._track.itdb):
@@ -234,21 +356,37 @@
         return True
 
     def ipod_filename(self):
+        """Get the full path to the track on the iPod.
+
+        Note (from the libgpod documentation): This code works around
+        a problem on some systems and might return a filename with
+        different case than the original filename. Don't copy it back
+        to track unless you must.
+
+        """
+
         return gpod.itdb_filename_on_ipod(self._track)
 
     def set_podcast(self, value):
+        """Mark the track as a podcast.
+
+        If value is True flags appropriate for podcasts are set,
+        otherwise those flags are unset.
+
+        """
+
         if value:
             self['skip_when_shuffling'] = 0x01
             self['remember_playback_position'] = 0x01
-            self['flag4'] = 0x01 # Show Title/Album on the 'Now Playing' page            
+            self['flag4'] = 0x01 # Show Title/Album on the 'Now Playing' page
         else:
             self['skip_when_shuffling'] = 0x00
             self['remember_playback_position'] = 0x00
-            self['flag4'] = 0x00 # Show Title/Album/Artist on the 'New Playing' page
+            self['flag4'] = 0x00 # Show Title/Album/Artist on the 'Now Playing' page
 
     def __str__(self):
         return self.__repr__()
-    
+
     def __repr__(self):
         return "<Track Artist:%s Title:%s Album:%s>" % (
             repr(self['artist']),
@@ -284,6 +422,8 @@
         else:
             raise KeyError('No such key: %s' % item)
 
+# XXX would this be better as a public variable so that the docs would
+# list valid sort order values?
 _playlist_sorting = {
     1:'playlist',
     2:'unknown2',
@@ -323,7 +463,7 @@
 
     def __nonzero__(self):
         return True
-    
+
     def __getitem__(self, index):
         if type(index) == types.SliceType:
             return [self[i] for i in xrange(*index.indices(len(self)))]
@@ -336,7 +476,7 @@
 
     def __repr__(self):
         return "<Playlists from %s>" % self._db
-    
+
     def __call__(self, id=None, number=None, name=None):
         if ((id and (number or name)) or (number and name)):
             raise ValueError("Only specify id, number OR name")
@@ -373,10 +513,30 @@
                                     proxied_playlist=pl)
                 else:
                     raise KeyError("Playlist with number %s not found." % repr(number))
-        
+
 class Playlist:
+    """A playlist in an iTunes database."""
+
     def __init__(self, parent_db, title="New Playlist",
                  smart=False, pos=-1, proxied_playlist=None):
+        """Create a playlist object.
+
+        parent_db is the database object to which the playlist
+        belongs.
+
+        title is a string that provides a name for the playlist.
+
+        If smart is true the playlist will be a smart playlist.
+
+        If pos is set the track will be inserted at that position.  By
+        default the playlist will be added at the end of the database.
+
+        If proxied_playlist is set it is expected to be an
+        Itdb_Playlist object (as returned by gpod.sw_get_playlist() or
+        similar functions).
+
+        """
+
         self._db = parent_db
         if proxied_playlist:
             self._pl = proxied_playlist
@@ -389,32 +549,71 @@
             gpod.itdb_playlist_add(self._db._itdb, self._pl, pos)
 
     def smart_update(self):
+        """Update the content of the smart playlist."""
         gpod.itdb_spl_update(self._pl)
 
     def randomize(self):
+        """Randomizes the playlist."""
         gpod.itdb_playlist_randomize(self._pl)
 
     def get_name(self):
+        """Get the name of the playlist."""
         return self._pl.name
+
     def set_name(self, name):
+        """Set the name for the playlist."""
         self._pl.name = name
+
     def get_id(self):
+        """Get the id of the playlist."""
         return self._pl.id
+
+    # XXX would this be more aptly named is_smart?  If it was, I think
+    # the docstring could skip the explanation of the return value.
+    # (Same question for get_master and get_podcast.)
     def get_smart(self):
+        """Check if the playlist is smart or not.
+
+        Returns True for a smart playlist, False for a regular
+        playlist.
+
+        """
+
         if self._pl.is_spl == 1:
             return True
         return False
+
     def get_master(self):
+        """Check if the playlist is the master playlist (MPL).
+
+        Returns True if the playlist is the MPL, False if not.
+
+        """
+
         if gpod.itdb_playlist_is_mpl(self._pl) == 1:
             return True
         return False
+
     def get_podcast(self):
+        """Check if the playlist is the podcasts playlist.
+
+        Returns True if the playlist is the podcasts playlist, False
+        if not.
+
+        """
+
         if gpod.itdb_playlist_is_podcasts(self._pl) == 1:
             return True
         return False
+
     def get_sort(self):
+        """Get the sort order for the playlist."""
         return _playlist_sorting[self._pl.sortorder]
+
+    # XXX how does one find out what values are allowed for order without
+    # poking into this file?  (See similar question @ _playlist_order)
     def set_sort(self, order):
+        """Set the sort order for the playlist."""
         order = order.lower()
         for k, v in _playlist_sorting.items():
             if v == order:
@@ -431,7 +630,7 @@
 
     def __str__(self):
         return self.__repr__()
-    
+
     def __repr__(self):
         return "<Playlist Title:%s Sort:%s Smart:%s Master:%s Podcast:%s Tracks:%d>" % (
             repr(self.name),
@@ -440,14 +639,15 @@
             repr(self.master),
             repr(self.podcast),
             len(self))
-        
+
     def __getitem__(self, index):
         if type(index) == types.SliceType:
             return [self[i] for i in xrange(*index.indices(len(self)))]
         else:
             if index < 0:
                 index += len(self)
-            return Track(proxied_track=gpod.sw_get_track(self._pl.members, index))
+            return Track(proxied_track=gpod.sw_get_track(self._pl.members, index),
+                         ownerdb=self)
 
     def __len__(self):
         #return self._pl.num # Always 0 ?
@@ -461,11 +661,26 @@
             return True
         else:
             return False
-    
+
     def add(self, track, pos=-1):
+        """Add a track to the playlist.
+
+        track is a track object to add.
+
+        If pos is set the track will be inserted at that position.  By
+        default the track will be added at the end of the playlist.
+
+        """
+
         gpod.itdb_playlist_add_track(self._pl, track._track, pos)
 
     def remove(self, track):
+        """Remove a track from the playlist.
+
+        track is a track object to remove.
+
+        """
+
         if self.__contains__(track):
             gpod.itdb_playlist_remove_track(self._pl, track._track)
         else:

Modified: libgpod/trunk/compile
===================================================================
--- libgpod/trunk/compile	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/compile	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,9 @@
 #! /bin/sh
-
 # Wrapper for compilers which do not understand `-c -o'.
 
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey at cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,91 +18,125 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Usage:
-# compile PROGRAM [ARGS]...
-# `-o FOO.o' is removed from the args passed to the actual compile.
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
 
-# Usage statement added by Billy Biggs <vektor at dumbterm.net>.
-if [ -z $1 ]; then
-    echo "Wrapper for compilers which do not understand '-c -o'."
-    echo "usage: compile PROGRAM [ARGS]..."
-    echo "'-o FOO.o' is removed from the args passed to the actual compile."
-    exit 1
-fi
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
 
-prog=$1
-shift
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
 
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
 ofile=
 cfile=
-args=
-while test $# -gt 0; do
-   case "$1" in
-    -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we do something ugly here.
-       ofile=$2
-       shift
-       case "$ofile" in
-	*.o | *.obj)
-	   ;;
-	*)
-	   args="$args -o $ofile"
-	   ofile=
-	   ;;
-       esac
-       ;;
-    *.c)
-       cfile=$1
-       args="$args $1"
-       ;;
-    *)
-       args="$args $1"
-       ;;
-   esac
-   shift
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-   # If no `-o' option was seen then we might have been invoked from a
-   # pattern rule where we don't need one.  That is ok -- this is a
-   # normal compilation that the losing compiler can handle.  If no
-   # `.c' file was seen then we are probably linking.  That is also
-   # ok.
-   exec "$prog" $args
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
 fi
 
 # Name of file we expect compiler to create.
-cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
 
 # Create the lock directory.
 # Note: use `[/.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
-lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
 while true; do
-   if mkdir $lockdir > /dev/null 2>&1; then
-      break
-   fi
-   sleep 1
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
 done
 # FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir $lockdir; exit 1" 1 2 15
+trap "rmdir '$lockdir'; exit 1" 1 2 15
 
 # Run the compile.
-"$prog" $args
-status=$?
+"$@"
+ret=$?
 
 if test -f "$cofile"; then
-   mv "$cofile" "$ofile"
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
 fi
 
-rmdir $lockdir
-exit $status
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Modified: libgpod/trunk/configure
===================================================================
--- libgpod/trunk/configure	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/configure	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60a.
+# Generated by GNU Autoconf 2.61.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -10,7 +10,8 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -19,12 +20,15 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 
 
+
+
 # PATH needs CR
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -215,7 +219,7 @@
 else
   as_candidate_shells=
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
@@ -233,7 +237,6 @@
 	 # Try only shells that exist, to save several forks.
 	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -242,18 +245,19 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
 :
 _ASEOF
 }; then
   CONFIG_SHELL=$as_shell
 	       as_have_required=yes
 	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -262,11 +266,13 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
 :
 (as_func_return () {
   (exit $1)
@@ -512,19 +518,28 @@
   as_mkdir_p=false
 fi
 
-# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
-  as_executable_p="test -x"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  as_executable_p=:
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
-rm -f conf$$.file
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -790,9 +805,7 @@
 build_alias
 host_alias
 target_alias
-LIBGPOD_CURRENT
-LIBGPOD_REVISION
-LIBGPOD_AGE
+LIBGPOD_SO_VERSION
 LIBGPOD_VERSION
 INSTALL_PROGRAM
 INSTALL_SCRIPT
@@ -805,13 +818,16 @@
 AUTOMAKE
 AUTOHEADER
 MAKEINFO
-AMTAR
 install_sh
 STRIP
 INSTALL_STRIP_PROGRAM
+mkdir_p
 AWK
 SET_MAKE
 am__leading_dot
+AMTAR
+am__tar
+am__untar
 ACLOCAL_AMFLAGS
 MAINTAINER_MODE_TRUE
 MAINTAINER_MODE_FALSE
@@ -832,6 +848,12 @@
 CCDEPMODE
 am__fastdepCC_TRUE
 am__fastdepCC_FALSE
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
 build
 build_cpu
 build_vendor
@@ -847,12 +869,6 @@
 ECHO
 AR
 RANLIB
-CXX
-CXXFLAGS
-ac_ct_CXX
-CXXDEPMODE
-am__fastdepCXX_TRUE
-am__fastdepCXX_FALSE
 CXXCPP
 F77
 FFLAGS
@@ -885,6 +901,7 @@
 INTLTOOL_MSGMERGE
 INTLTOOL_XGETTEXT
 ALL_LINGUAS
+DATADIRNAME
 PKG_CONFIG
 LIBGPOD_CFLAGS
 LIBGPOD_LIBS
@@ -903,7 +920,6 @@
 XGETTEXT
 CATALOGS
 CATOBJEXT
-DATADIRNAME
 GMOFILES
 INSTOBJEXT
 INTLLIBS
@@ -941,11 +957,12 @@
 CC
 CFLAGS
 LDFLAGS
+LIBS
 CPPFLAGS
-CPP
 CXX
 CXXFLAGS
 CCC
+CPP
 CXXCPP
 F77
 FFLAGS
@@ -1061,10 +1078,10 @@
   -disable-* | --disable-*)
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
     eval enable_$ac_feature=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
@@ -1080,10 +1097,10 @@
   -enable-* | --enable-*)
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
     eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
@@ -1277,19 +1294,19 @@
   -with-* | --with-*)
     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
     eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
     eval with_$ac_package=no ;;
 
   --x)
@@ -1533,10 +1550,10 @@
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode enable make rules and dependencies not useful
-                          (and sometimes confusing) to the casual installer
-  --disable-dependency-tracking Speeds up one-time builds
-  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
@@ -1561,11 +1578,12 @@
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
   CXXCPP      C++ preprocessor
   F77         Fortran 77 compiler command
   FFLAGS      Fortran 77 compiler flags
@@ -1646,7 +1664,7 @@
 if $ac_init_version; then
   cat <<\_ACEOF
 configure
-generated by GNU Autoconf 2.60a
+generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -1660,7 +1678,7 @@
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.60a.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
 
@@ -2005,14 +2023,6 @@
 
 
 
-case m4 in
-  [\\/]* | ?:[\\/]* ) ac_macro_dir=m4         ;;
-  *)                      ac_macro_dir=$srcdir/m4 ;;
-esac
-test -d "$ac_macro_dir" ||
-  { { echo "$as_me:$LINENO: error: cannot find macro directory \`m4'" >&5
-echo "$as_me: error: cannot find macro directory \`m4'" >&2;}
-   { (exit 1); exit 1; }; }
 
 
 ac_config_headers="$ac_config_headers config.h"
@@ -2020,32 +2030,28 @@
 
 # Making releases:
 #   LIBGPOD_MICRO_VERSION += 1;
-#   LIBGPOD_INTERFACE_AGE += 1;
-# if any functions have been added, set LIBGPOD_INTERFACE_AGE to 0.
-# if backwards compatibility has been broken,
-# set LIBGPOD_BINARY_AGE and LIBGPOD_INTERFACE_AGE to 0.
+#   LIBGPOD_SO_VERSION - see comments
 #
 LIBGPOD_MAJOR_VERSION=0
 LIBGPOD_MINOR_VERSION=4
-LIBGPOD_MICRO_VERSION=0
-LIBGPOD_INTERFACE_AGE=0
+LIBGPOD_MICRO_VERSION=2
 # If you need a modifier for the version number.
 # Normally empty, but can be used to make "fixup" releases.
 LIBGPOD_EXTRAVERSION=
 
-
-LIBGPOD_CURRENT=`expr 100 '*' $LIBGPOD_MINOR_VERSION + $LIBGPOD_MICRO_VERSION - $LIBGPOD_INTERFACE_AGE`
-LIBGPOD_BINARY_AGE=`expr 100 '*' $LIBGPOD_MINOR_VERSION + $LIBGPOD_MICRO_VERSION`
-LIBGPOD_REVISION=$LIBGPOD_INTERFACE_AGE
-LIBGPOD_AGE=`expr $LIBGPOD_BINARY_AGE - $LIBGPOD_INTERFACE_AGE`
 LIBGPOD_VERSION=$LIBGPOD_MAJOR_VERSION.$LIBGPOD_MINOR_VERSION.$LIBGPOD_MICRO_VERSION$LIBGPOD_EXTRAVERSION
 
+# +1 : 0 : +1  == adds new functions to the interface
+# +1 : 0 : 0   == changes or removes functions (changes include both
+#                 changes to the signature and the semantic)
+#  ? :+1 : ?   == just internal changes
+# CURRENT : REVISION : AGE
+LIBGPOD_SO_VERSION=1:0:0
 
 
 
 
-
-am__api_version="1.7"
+am__api_version="1.9"
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -2113,7 +2119,7 @@
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -2215,7 +2221,6 @@
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 rm -f conftest.sed
 
-
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
@@ -2229,6 +2234,39 @@
 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 --'
+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
+
 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.
@@ -2247,7 +2285,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AWK="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2310,7 +2348,7 @@
 fi
 rmdir .tst 2>/dev/null
 
- # test to see if srcdir already configured
+# 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
@@ -2358,9 +2396,6 @@
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
 # Installed binaries are usually stripped using `strip' when the user
@@ -2385,7 +2420,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2425,7 +2460,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_STRIP="strip"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2469,10 +2504,17 @@
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
+# Always define AMTAR for backward compatibility.
 
+AMTAR=${AMTAR-"${am_missing_run}tar"}
 
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
+
+
+
+
 ACLOCAL_AMFLAGS="$ACLOCAL_FLAGS"
 
 
@@ -2529,7 +2571,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2569,7 +2611,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2626,7 +2668,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2667,7 +2709,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -2725,7 +2767,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2769,7 +2811,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3132,27 +3174,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3207,27 +3232,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3262,27 +3270,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -3318,27 +3309,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3454,27 +3428,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_c89=$ac_arg
 else
   echo "$as_me: failed program was:" >&5
@@ -3617,7 +3574,9 @@
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
@@ -3645,9 +3604,14 @@
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
         am_cv_CC_dependencies_compiler_type=$depmode
         break
       fi
@@ -3678,6 +3642,484 @@
 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.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+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_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&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_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&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_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&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_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+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 ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+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_compile") 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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   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
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+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_compile") 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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      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
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+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_compile") 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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 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
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+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_compile") 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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       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/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
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
 { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
 if test "${lt_cv_path_SED+set}" = set; then
@@ -3839,7 +4281,7 @@
   for ac_prog in grep ggrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
     # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -3921,7 +4363,7 @@
   for ac_prog in egrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
     # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -4140,17 +4582,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -4184,17 +4619,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -4259,17 +4687,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -4303,17 +4724,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -4384,27 +4798,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -4574,7 +4971,7 @@
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -5004,7 +5401,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5007 "configure"' > conftest.$ac_ext
+  echo '#line 5404 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5128,27 +5525,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   lt_cv_cc_needs_belf=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5241,27 +5622,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -5324,27 +5688,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5380,17 +5727,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5449,542 +5789,8 @@
 
 done
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
-
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-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_prog_ac_ct_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CXX" && break
-done
-
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CXX=$ac_ct_CXX
-  fi
-fi
-
-  fi
-fi
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&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_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&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_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&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_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_compiler_gnu+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 ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-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_compile") 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); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   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
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-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_compile") 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); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
-  ac_cv_prog_cxx_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CXXFLAGS=""
-      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
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-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_compile") 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); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 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
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-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_compile") 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); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
-  ac_cv_prog_cxx_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-depcc="$CXX"  am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CXX_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       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/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
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
-        am_cv_CXX_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
-
-
-if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
-  am__fastdepCXX_TRUE=
-  am__fastdepCXX_FALSE='#'
-else
-  am__fastdepCXX_TRUE='#'
-  am__fastdepCXX_FALSE=
-fi
-
-
-
-
 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
     (test "X$CXX" != "Xg++"))) ; then
@@ -6036,17 +5842,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -6080,17 +5879,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -6155,17 +5947,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -6199,17 +5984,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -6250,7 +6028,7 @@
 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -6268,7 +6046,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6294,7 +6072,7 @@
 fi
 if test -z "$F77"; then
   ac_ct_F77=$F77
-  for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -6312,7 +6090,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_F77="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6419,27 +6197,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6482,27 +6243,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_f77_g=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6957,7 +6701,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6997,7 +6741,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_AR="ar"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7053,7 +6797,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7093,7 +6837,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7149,7 +6893,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7189,7 +6933,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_STRIP="strip"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7506,11 +7250,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:7509: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7253: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7513: \$? = $ac_status" >&5
+   echo "$as_me:7257: \$? = $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.
@@ -7774,11 +7518,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:7777: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7521: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7781: \$? = $ac_status" >&5
+   echo "$as_me:7525: \$? = $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.
@@ -7878,11 +7622,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:7881: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7625: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7885: \$? = $ac_status" >&5
+   echo "$as_me:7629: \$? = $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
@@ -8359,27 +8103,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -8434,27 +8162,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -9704,27 +9416,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_dl_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -9815,27 +9511,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_func_shl_load=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -9894,27 +9574,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_dld_shl_load=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -9995,27 +9659,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_func_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -10074,27 +9722,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_dl_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -10154,27 +9786,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_svld_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -10234,27 +9850,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_dld_dld_link=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -10319,7 +9919,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10322 "configure"
+#line 9922 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10419,7 +10019,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10422 "configure"
+#line 10022 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11506,27 +11106,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -11582,27 +11166,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -12787,11 +12355,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:12790: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12358: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12794: \$? = $ac_status" >&5
+   echo "$as_me:12362: \$? = $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.
@@ -12891,11 +12459,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:12894: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12462: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12898: \$? = $ac_status" >&5
+   echo "$as_me:12466: \$? = $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
@@ -14452,11 +14020,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:14455: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14023: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14459: \$? = $ac_status" >&5
+   echo "$as_me:14027: \$? = $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.
@@ -14556,11 +14124,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:14559: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14127: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14563: \$? = $ac_status" >&5
+   echo "$as_me:14131: \$? = $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
@@ -15027,27 +14595,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -15092,27 +14644,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -16775,11 +16311,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:16778: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16314: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16782: \$? = $ac_status" >&5
+   echo "$as_me:16318: \$? = $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.
@@ -17043,11 +16579,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:17046: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16582: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17050: \$? = $ac_status" >&5
+   echo "$as_me:16586: \$? = $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.
@@ -17147,11 +16683,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:17150: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16686: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17154: \$? = $ac_status" >&5
+   echo "$as_me:16690: \$? = $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
@@ -17628,27 +17164,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -17703,27 +17223,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
 
 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
@@ -19962,7 +19466,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20025,7 +19529,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_INTLTOOL_ICONV="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20066,7 +19570,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_INTLTOOL_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20107,7 +19611,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_INTLTOOL_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20148,7 +19652,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_INTLTOOL_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20175,9 +19679,152 @@
 # Substitute ALL_LINGUAS so we can use it in po/Makefile
 
 
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+                 return _nl_msg_cat_cntr
+  ;
+  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
+  DATADIRNAME=share
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	case $host in
+    *-*-solaris*)
+                        { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+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.  */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char bind_textdomain_codeset (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef bind_textdomain_codeset
+
+/* 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 bind_textdomain_codeset ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+  ;
+  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_func_bind_textdomain_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test $ac_cv_func_bind_textdomain_codeset = yes; then
+  DATADIRNAME=share
+else
+  DATADIRNAME=lib
+fi
+
+    ;;
+    *)
+    DATADIRNAME=lib
+    ;;
+    esac
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+
 ac_config_commands="$ac_config_commands intltool"
 
 
@@ -20249,27 +19896,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -20315,7 +19946,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20358,7 +19989,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20643,12 +20274,12 @@
         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\"") >&5
-  ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5
+    { (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
   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>/dev/null`
+  pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0 >= 2.6.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -20661,12 +20292,12 @@
         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\"") >&5
-  ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5
+    { (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
   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>/dev/null`
+  pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0 >= 2.6.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -20685,9 +20316,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"`
+	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-pixbuf-2.0 >= 2.6.0"`
         else
-	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-pixbuf-2.0"`
+	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-pixbuf-2.0 >= 2.6.0"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GDKPIXBUF_PKG_ERRORS" >&5
@@ -20774,27 +20405,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -20830,17 +20444,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -20933,27 +20540,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   am_cv_val_LC_MESSAGES=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21018,27 +20609,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21074,17 +20648,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21175,27 +20742,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   gt_cv_func_ngettext_libc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21247,27 +20798,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   gt_cv_func_dgettext_libc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21352,27 +20887,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -21446,27 +20965,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_intl_bindtextdomain=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21524,27 +21027,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_intl_ngettext=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21602,27 +21089,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_intl_dgettext=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21693,27 +21164,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_intl_ngettext=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21771,27 +21226,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_intl_dcgettext=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -21895,27 +21334,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -22071,27 +21494,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -22132,7 +21539,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -22220,27 +21627,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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
   CATOBJEXT=.gmo
              DATADIRNAME=share
 else
@@ -22312,27 +21703,11 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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
+  (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_func_bind_textdomain_codeset=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -22520,7 +21895,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -22636,7 +22011,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -22689,6 +22064,7 @@
    { (exit 1); exit 1; }; }
 fi
 
+      am_display_PYTHON=$PYTHON
     else
       # Otherwise, try each interpreter until we find one that satisfies
       # VERSION.
@@ -22698,13 +22074,9 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-	for am_cv_pathless_PYTHON in python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do
-          if test "$am_cv_pathless_PYTHON" = : ; then
-            { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
-echo "$as_me: error: no suitable Python interpreter found" >&2;}
-   { (exit 1); exit 1; }; }
-	  fi
-          prog="import sys, string
+	for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  prog="import sys, string
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
 minver = map(int, string.split('$PYTHON_MIN_VERSION', '.')) + [0, 0, 0]
@@ -22719,12 +22091,15 @@
   break
 fi
 
-        done
+	done
 fi
 { echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
 echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; }
       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
-      # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
 set dummy $am_cv_pathless_PYTHON; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
@@ -22742,7 +22117,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -22764,11 +22139,18 @@
 fi
 
 
+      fi
       am_display_PYTHON=$am_cv_pathless_PYTHON
     fi
 
 
+  if test "$PYTHON" = :; then
+      { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+echo "$as_me: error: no suitable Python interpreter found" >&2;}
+   { (exit 1); exit 1; }; }
+  else
 
+
   { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
 echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
 if test "${am_cv_python_version+set}" = set; then
@@ -22837,6 +22219,10 @@
 
 
 
+  fi
+
+
+
 { echo "$as_me:$LINENO: checking for python development headers" >&5
 echo $ECHO_N "checking for python development headers... $ECHO_C" >&6; }
 py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
@@ -22868,17 +22254,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   { echo "$as_me:$LINENO: result: found" >&5
 echo "${ECHO_T}found" >&6; }
 with_python="yes"
@@ -22971,7 +22350,7 @@
   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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -23138,27 +22517,10 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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); }; } &&
-	 { ac_try='test -s conftest.$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
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   has_option=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -23188,7 +22550,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile bindings/Makefile bindings/python/Makefile bindings/python/examples/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml m4/Makefile po/Makefile.in src/Makefile tests/Makefile libgpod-1.0.pc"
+ac_config_files="$ac_config_files Makefile bindings/Makefile bindings/python/gpod.i bindings/python/Makefile bindings/python/examples/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml m4/Makefile po/Makefile.in src/Makefile tests/Makefile libgpod-1.0.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -23377,7 +22739,8 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -23386,12 +22749,15 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 
 
+
+
 # PATH needs CR
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -23613,19 +22979,28 @@
   as_mkdir_p=false
 fi
 
-# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
-  as_executable_p="test -x"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  as_executable_p=:
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
-rm -f conf$$.file
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -23641,7 +23016,7 @@
 # values after options handling.
 ac_log="
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.60a.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -23694,7 +23069,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.60a,
+configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright (C) 2006 Free Software Foundation, Inc.
@@ -23818,6 +23193,7 @@
     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "bindings/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;;
+    "bindings/python/gpod.i") CONFIG_FILES="$CONFIG_FILES bindings/python/gpod.i" ;;
     "bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;;
     "bindings/python/examples/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/examples/Makefile" ;;
     "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
@@ -23928,9 +23304,7 @@
 build_alias!$build_alias$ac_delim
 host_alias!$host_alias$ac_delim
 target_alias!$target_alias$ac_delim
-LIBGPOD_CURRENT!$LIBGPOD_CURRENT$ac_delim
-LIBGPOD_REVISION!$LIBGPOD_REVISION$ac_delim
-LIBGPOD_AGE!$LIBGPOD_AGE$ac_delim
+LIBGPOD_SO_VERSION!$LIBGPOD_SO_VERSION$ac_delim
 LIBGPOD_VERSION!$LIBGPOD_VERSION$ac_delim
 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
@@ -23943,13 +23317,16 @@
 AUTOMAKE!$AUTOMAKE$ac_delim
 AUTOHEADER!$AUTOHEADER$ac_delim
 MAKEINFO!$MAKEINFO$ac_delim
-AMTAR!$AMTAR$ac_delim
 install_sh!$install_sh$ac_delim
 STRIP!$STRIP$ac_delim
 INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
 AWK!$AWK$ac_delim
 SET_MAKE!$SET_MAKE$ac_delim
 am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
 ACLOCAL_AMFLAGS!$ACLOCAL_AMFLAGS$ac_delim
 MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
 MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
@@ -23970,6 +23347,12 @@
 CCDEPMODE!$CCDEPMODE$ac_delim
 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
 build!$build$ac_delim
 build_cpu!$build_cpu$ac_delim
 build_vendor!$build_vendor$ac_delim
@@ -23981,13 +23364,6 @@
 GREP!$GREP$ac_delim
 EGREP!$EGREP$ac_delim
 CPP!$CPP$ac_delim
-LN_S!$LN_S$ac_delim
-ECHO!$ECHO$ac_delim
-AR!$AR$ac_delim
-RANLIB!$RANLIB$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -24029,9 +23405,10 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-CXXDEPMODE!$CXXDEPMODE$ac_delim
-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
-am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
 CXXCPP!$CXXCPP$ac_delim
 F77!$F77$ac_delim
 FFLAGS!$FFLAGS$ac_delim
@@ -24064,6 +23441,7 @@
 INTLTOOL_MSGMERGE!$INTLTOOL_MSGMERGE$ac_delim
 INTLTOOL_XGETTEXT!$INTLTOOL_XGETTEXT$ac_delim
 ALL_LINGUAS!$ALL_LINGUAS$ac_delim
+DATADIRNAME!$DATADIRNAME$ac_delim
 PKG_CONFIG!$PKG_CONFIG$ac_delim
 LIBGPOD_CFLAGS!$LIBGPOD_CFLAGS$ac_delim
 LIBGPOD_LIBS!$LIBGPOD_LIBS$ac_delim
@@ -24082,7 +23460,6 @@
 XGETTEXT!$XGETTEXT$ac_delim
 CATALOGS!$CATALOGS$ac_delim
 CATOBJEXT!$CATOBJEXT$ac_delim
-DATADIRNAME!$DATADIRNAME$ac_delim
 GMOFILES!$GMOFILES$ac_delim
 INSTOBJEXT!$INSTOBJEXT$ac_delim
 INTLLIBS!$INTLLIBS$ac_delim
@@ -24115,7 +23492,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 84; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -24587,27 +23964,21 @@
   else
     continue
   fi
-  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
-  # Extract the definition of DEP_FILES from the Makefile without
-  # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
   # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
-  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
-  # We invoke sed twice because it is the simplest approach to
-  # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
-    /^DEP_FILES = .*\\\\$/ {
-      s/^DEP_FILES = //
-      :loop
-	s/\\\\$//
-	p
-	n
-	/\\\\$/ b loop
-      p
-    }
-    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
     # Make sure the directory exists.
     test -f "$dirpart/$file" && continue

Modified: libgpod/trunk/configure.ac
===================================================================
--- libgpod/trunk/configure.ac	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/configure.ac	2007-01-25 10:46:30 UTC (rev 168)
@@ -7,30 +7,26 @@
 
 # Making releases:
 #   LIBGPOD_MICRO_VERSION += 1;
-#   LIBGPOD_INTERFACE_AGE += 1;
-# if any functions have been added, set LIBGPOD_INTERFACE_AGE to 0.
-# if backwards compatibility has been broken,
-# set LIBGPOD_BINARY_AGE and LIBGPOD_INTERFACE_AGE to 0.
+#   LIBGPOD_SO_VERSION - see comments
 #
 LIBGPOD_MAJOR_VERSION=0
 LIBGPOD_MINOR_VERSION=4
-LIBGPOD_MICRO_VERSION=0
-LIBGPOD_INTERFACE_AGE=0
+LIBGPOD_MICRO_VERSION=2
 # If you need a modifier for the version number. 
 # Normally empty, but can be used to make "fixup" releases.
 LIBGPOD_EXTRAVERSION=
 
-dnl libtool versioning from libgnome
-
-LIBGPOD_CURRENT=`expr 100 '*' $LIBGPOD_MINOR_VERSION + $LIBGPOD_MICRO_VERSION - $LIBGPOD_INTERFACE_AGE`
-LIBGPOD_BINARY_AGE=`expr 100 '*' $LIBGPOD_MINOR_VERSION + $LIBGPOD_MICRO_VERSION`
-LIBGPOD_REVISION=$LIBGPOD_INTERFACE_AGE
-LIBGPOD_AGE=`expr $LIBGPOD_BINARY_AGE - $LIBGPOD_INTERFACE_AGE`
 LIBGPOD_VERSION=$LIBGPOD_MAJOR_VERSION.$LIBGPOD_MINOR_VERSION.$LIBGPOD_MICRO_VERSION$LIBGPOD_EXTRAVERSION
 
-AC_SUBST(LIBGPOD_CURRENT)
-AC_SUBST(LIBGPOD_REVISION)
-AC_SUBST(LIBGPOD_AGE)
+dnl libtool versioning
+# +1 : 0 : +1  == adds new functions to the interface
+# +1 : 0 : 0   == changes or removes functions (changes include both
+#                 changes to the signature and the semantic)
+#  ? :+1 : ?   == just internal changes
+# CURRENT : REVISION : AGE
+LIBGPOD_SO_VERSION=1:0:0
+
+AC_SUBST(LIBGPOD_SO_VERSION)
 AC_SUBST(LIBGPOD_VERSION)
 
 AM_INIT_AUTOMAKE(libgpod, $LIBGPOD_VERSION)
@@ -42,6 +38,12 @@
 
 AC_GNU_SOURCE
 AC_PROG_CC
+
+# 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.
+AC_PROG_CXX
+
 AC_PROG_LD
 AC_STDC_HEADERS
 AC_PROG_INSTALL
@@ -78,7 +80,7 @@
 esac], have_gdkpixbuf=yes)
 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, have_gdkpixbuf=yes, have_gdkpixbuf=no)
+   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)
    fi
@@ -165,6 +167,7 @@
 AC_OUTPUT([
 Makefile
 bindings/Makefile
+bindings/python/gpod.i
 bindings/python/Makefile
 bindings/python/examples/Makefile
 docs/Makefile

Modified: libgpod/trunk/debian/changelog
===================================================================
--- libgpod/trunk/debian/changelog	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/debian/changelog	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,3 +1,15 @@
+libgpod (0.4.2-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Frank Lichtenheld <djpig at debian.org>  Thu, 25 Jan 2007 11:44:21 +0100
+
+libgpod (0.4.0-2) UNRELEASED; urgency=low
+
+  * NOT RELEASED YET
+
+ -- Frank Lichtenheld <djpig at debian.org>  Fri, 22 Dec 2006 19:09:57 +0100
+
 libgpod (0.4.0-1) experimental; urgency=low
 
   * New upstream release (Closes: #389704)

Modified: libgpod/trunk/depcomp
===================================================================
--- libgpod/trunk/depcomp	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/depcomp	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,10 @@
 #! /bin/sh
-
 # depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
 
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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
 # the Free Software Foundation; either version 2, or (at your option)
@@ -15,8 +17,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -25,22 +27,45 @@
 
 # Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
 
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
 fi
-# `libtool' can also be set to `yes' or `no'.
 
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
-
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
@@ -262,27 +287,43 @@
    base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
 
    if test "$libtool" = yes; then
-      tmpdepfile1="$dir.libs/$base.lo.d"
-      tmpdepfile2="$dir.libs/$base.d"
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism 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
+      # 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
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
       "$@" -Wc,-MD
    else
-      tmpdepfile1="$dir$base.o.d"
-      tmpdepfile2="$dir$base.d"
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
       "$@" -MD
    fi
 
    stat=$?
    if test $stat -eq 0; then :
    else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
       exit $stat
    fi
 
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
       # That's a tab and a space in the [].
@@ -426,7 +467,8 @@
   done
 
   "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
     sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
@@ -477,3 +519,12 @@
 esac
 
 exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Modified: libgpod/trunk/docs/Makefile.in
===================================================================
--- libgpod/trunk/docs/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -21,7 +20,6 @@
 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
@@ -35,7 +33,31 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+subdir = docs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+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
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +142,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -178,6 +198,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +225,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -217,29 +240,39 @@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 SUBDIRS = reference
-subdir = docs
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
-DIST_SUBDIRS = $(SUBDIRS)
 all: all-recursive
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  docs/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  docs/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
 
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -257,7 +290,13 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -269,7 +308,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -277,7 +316,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	case "$@" in \
 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -298,7 +343,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -309,14 +354,6 @@
 	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -325,19 +362,22 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
-	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
+	  empty_fix=.; \
 	else \
 	  include_option=--include; \
+	  empty_fix=; \
 	fi; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && \
+	    test ! -f $$subdir/TAGS || \
 	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
@@ -347,10 +387,11 @@
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -373,11 +414,7 @@
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -390,7 +427,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -405,15 +442,17 @@
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
 	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
 	    (cd $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -423,7 +462,6 @@
 all-am: Makefile
 installdirs: installdirs-recursive
 installdirs-am:
-
 install: install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
@@ -443,7 +481,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -461,6 +499,8 @@
 
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
 info-am:
@@ -495,22 +535,18 @@
 
 uninstall-info: uninstall-info-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-generic clean-libtool clean-recursive ctags \
+.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 \
-	dvi-recursive info info-am info-recursive install install-am \
-	install-data install-data-am install-data-recursive \
-	install-exec install-exec-am install-exec-recursive \
-	install-info install-info-am install-info-recursive install-man \
-	install-recursive install-strip installcheck installcheck-am \
-	installdirs installdirs-am installdirs-recursive \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
-	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am \
-	uninstall-info-recursive uninstall-recursive
+	distclean-recursive 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 \
+	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
 
 # 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	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/Makefile.am	2007-01-25 10:46:30 UTC (rev 168)
@@ -74,5 +74,4 @@
 include $(top_srcdir)/gtk-doc.make
 
 # Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST += 
+EXTRA_DIST += version.xml.in

Modified: libgpod/trunk/docs/reference/Makefile.in
===================================================================
--- libgpod/trunk/docs/reference/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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,7 +19,6 @@
 ####################################
 # Everything below here is generic #
 ####################################
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -27,7 +26,6 @@
 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
@@ -41,7 +39,23 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make
+subdir = docs/reference
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = version.xml
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -126,11 +140,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -184,6 +196,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -209,6 +223,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -293,7 +308,6 @@
 INCLUDES = 
 GTKDOC_LIBS = 
 @GTK_DOC_USE_LIBTOOL_FALSE at GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
-
 @GTK_DOC_USE_LIBTOOL_TRUE at GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
 @GTK_DOC_USE_LIBTOOL_FALSE at GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
 @GTK_DOC_USE_LIBTOOL_TRUE at GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
@@ -304,26 +318,17 @@
 # searched for in VPATH/GPATH.
 #
 GPATH = $(srcdir)
-
 TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
 
-
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
 
 # Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST = \
-	$(content_files)		\
-	$(HTML_IMAGES)			\
-	$(DOC_MAIN_SGML_FILE)		\
-	$(DOC_MODULE)-sections.txt	\
-	$(DOC_MODULE)-overrides.txt\
-
-
+EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \
+	$(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt \
+	version.xml.in
 DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
 	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
 
-
 SCANOBJ_FILES = \
 	$(DOC_MODULE).args 	 \
 	$(DOC_MODULE).hierarchy  \
@@ -331,25 +336,40 @@
 	$(DOC_MODULE).prerequisites \
 	$(DOC_MODULE).signals
 
-
 CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
-subdir = docs/reference
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = version.xml
-DIST_SOURCES =
-DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/gtk-doc.make \
-	Makefile.am version.xml.in
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/gtk-doc.make $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  docs/reference/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  docs/reference/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-version.xml: $(top_builddir)/config.status version.xml.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
@@ -367,13 +387,9 @@
 ctags: CTAGS
 CTAGS:
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
-	$(mkinstalldirs) $(distdir)/../..
+	$(mkdir_p) $(distdir)/../..
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
 	list='$(DISTFILES)'; for file in $$list; do \
@@ -385,7 +401,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -406,7 +422,6 @@
 check-am: all-am
 check: check-am
 all-am: Makefile all-local
-
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -428,7 +443,7 @@
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -445,6 +460,8 @@
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
@@ -479,12 +496,13 @@
 uninstall-am: uninstall-info-am uninstall-local
 
 .PHONY: all all-am all-local check check-am clean clean-generic \
-	clean-libtool clean-local distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-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 install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-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 \
+	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

Modified: libgpod/trunk/docs/reference/html/ch01.html
===================================================================
--- libgpod/trunk/docs/reference/html/ch01.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/ch01.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,41 +2,45 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>iPod database</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<title>iPod database components</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <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">
+<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.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
-<td>&#160;</td>
+<td><a accesskey="p" href="libgpod-Low-level-functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.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-The-Itdb-iTunesDB-structure.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="libgpod-Tracks.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="chapter" lang="en">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2546593"></a>iPod database</h2></div></div></div>
+<a name="id273614"></a>iPod database components</h2></div></div></div>
 <div class="toc"><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-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-File-handling-functions.html">File handling functions</a></span><span class="refpurpose"> &#8212; Functions to copy new files to the iPod</span>
+<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-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-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-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>
+<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-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
+</dt>
 </dl></div>
 </div>
 </body>

Deleted: libgpod/trunk/docs/reference/html/ch02.html
===================================================================
--- libgpod/trunk/docs/reference/html/ch02.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/ch02.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,43 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<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.70.1">
-<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-Low-level-functions.html" title="Low-level functions">
-<link rel="next" href="libgpod-Tracks.html" title="Tracks">
-<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
-</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-Low-level-functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
-<td>&#160;</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-Tracks.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="chapter" lang="en">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="id2510305"></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>
-</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-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (cover and photos)</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, ...)</span>
-</dt>
-</dl></div>
-</div>
-</body>
-</html>

Modified: libgpod/trunk/docs/reference/html/index.html
===================================================================
--- libgpod/trunk/docs/reference/html/index.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/index.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,14 +3,15 @@
 <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.70.1">
-<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.">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
+<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="ch01.html" title="iPod database">
+<link rel="next" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
 <meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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"><div class="book" lang="en">
 <div class="titlepage">
@@ -34,10 +35,10 @@
 	&#160;&#160;</p></div></div>
 </div>
 </div></div>
-<div><p class="releaseinfo">for libgpod <span>0.3.3</span></p></div>
+<div><p class="releaseinfo">for libgpod <span>0.4.2RC1</span></p></div>
 <div><p class="copyright">Copyright &#169; 2006 Christophe Fergeau</p></div>
 <div><div class="legalnotice">
-<a name="id2515455"></a><p>Permission is granted to copy, distribute and/or modify
+<a name="id270288"></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
@@ -56,21 +57,29 @@
 </div></div>
 <div><div class="abstract">
 <p class="title"><b>Abstract</b></p>
-<p>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.</p>
+<p>
+      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.
+      </p>
+<p>
+      Please see the programs in the <a href="http://gtkpod.cvs.sourceforge.net/gtkpod/libgpod/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>.
+      </p>
 </div></div>
 </div>
 <hr>
 </div>
 <div class="toc"><dl>
-<dt><span class="chapter"><a href="ch01.html">iPod database</a></span></dt>
+<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>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libgpod-File-handling-functions.html">File handling functions</a></span><span class="refpurpose"> &#8212; Functions to copy new files to the iPod</span>
+<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>
@@ -78,8 +87,7 @@
 <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>
-</dl></dd>
-<dt><span class="chapter"><a href="ch02.html">iPod database components</a></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>
@@ -88,12 +96,20 @@
 <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-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (cover and photos)</span>
+<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-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, ...)</span>
+<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-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></dd>
+<dt><span class="part"><a href="photodb.html">II. Photo database</a></span></dt>
+<dd><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></dd>
 </dl></div>
 </div></body>
 </html>

Modified: libgpod/trunk/docs/reference/html/index.sgml
===================================================================
--- libgpod/trunk/docs/reference/html/index.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/index.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -28,8 +28,12 @@
 <ANCHOR id="itdb-get-music-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-music-dir">
 <ANCHOR id="itdb-get-artwork-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-artwork-dir">
 <ANCHOR id="itdb-get-device-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-device-dir">
+<ANCHOR id="itdb-get-photos-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-photos-dir">
 <ANCHOR id="itdb-get-itunesdb-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-itunesdb-path">
+<ANCHOR id="itdb-get-itunessd-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-itunessd-path">
 <ANCHOR id="itdb-get-artworkdb-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-artworkdb-path">
+<ANCHOR id="itdb-get-photodb-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-photodb-path">
+<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">
@@ -51,6 +55,7 @@
 <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-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-remove-thumbnails" href="libgpod/libgpod-Tracks.html#itdb-track-remove-thumbnails">
 <ANCHOR id="ITDB-RATING-STEP:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">
 <ANCHOR id="libgpod-Playlists" href="libgpod/libgpod-Playlists.html">
@@ -79,6 +84,29 @@
 <ANCHOR id="itdb-playlist-by-nr" href="libgpod/libgpod-Playlists.html#itdb-playlist-by-nr">
 <ANCHOR id="itdb-playlist-by-name" href="libgpod/libgpod-Playlists.html#itdb-playlist-by-name">
 <ANCHOR id="itdb-playlist-randomize" href="libgpod/libgpod-Playlists.html#itdb-playlist-randomize">
+<ANCHOR id="libgpod-Smart-Playlists" href="libgpod/libgpod-Smart-Playlists.html">
+<ANCHOR id="SPLPref" href="libgpod/libgpod-Smart-Playlists.html#SPLPref">
+<ANCHOR id="SPLRule" href="libgpod/libgpod-Smart-Playlists.html#SPLRule">
+<ANCHOR id="SPLRules" href="libgpod/libgpod-Smart-Playlists.html#SPLRules">
+<ANCHOR id="SPLAction" href="libgpod/libgpod-Smart-Playlists.html#SPLAction">
+<ANCHOR id="SPLFieldType" href="libgpod/libgpod-Smart-Playlists.html#SPLFieldType">
+<ANCHOR id="SPLActionType" href="libgpod/libgpod-Smart-Playlists.html#SPLActionType">
+<ANCHOR id="SPLField" href="libgpod/libgpod-Smart-Playlists.html#SPLField">
+<ANCHOR id="SPLDATE-IDENTIFIER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#SPLDATE-IDENTIFIER:CAPS">
+<ANCHOR id="SPL-MAXSTRINGLENGTH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#SPL-MAXSTRINGLENGTH:CAPS">
+<ANCHOR id="SPL-STRING-MAXLEN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#SPL-STRING-MAXLEN:CAPS">
+<ANCHOR id="itdb-splr-get-field-type" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-get-field-type">
+<ANCHOR id="itdb-splr-get-action-type" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-get-action-type">
+<ANCHOR id="itdb-splr-validate" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-validate">
+<ANCHOR id="itdb-splr-remove" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-remove">
+<ANCHOR id="itdb-splr-new" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-new">
+<ANCHOR id="itdb-splr-add" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-add">
+<ANCHOR id="itdb-splr-add-new" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-add-new">
+<ANCHOR id="itdb-spl-copy-rules" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-copy-rules">
+<ANCHOR id="itdb-splr-eval" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-eval">
+<ANCHOR id="itdb-spl-update" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-update">
+<ANCHOR id="itdb-spl-update-all" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-update-all">
+<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">
@@ -87,6 +115,7 @@
 <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-remove-thumbnail" href="libgpod/libgpod-Artwork.html#itdb-artwork-remove-thumbnail">
 <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">
@@ -102,5 +131,28 @@
 <ANCHOR id="itdb-device-set-mountpoint" href="libgpod/libgpod-Device.html#itdb-device-set-mountpoint">
 <ANCHOR id="itdb-device-read-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-read-sysinfo">
 <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-device-get-ipod-info" href="libgpod/libgpod-Device.html#itdb-device-get-ipod-info">
+<ANCHOR id="itdb-info-get-ipod-info-table" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-info-table">
+<ANCHOR id="itdb-info-get-ipod-generation-string" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-generation-string">
+<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-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-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-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">

Copied: libgpod/trunk/docs/reference/html/itunesdb.html (from rev 167, libgpod/branches/upstream/current/docs/reference/html/itunesdb.html)

Modified: libgpod/trunk/docs/reference/html/libgpod-Artwork.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Artwork.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-Artwork.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,37 +3,38 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Artwork</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch02.html" title="iPod database components">
-<link rel="prev" href="libgpod-Playlists.html" title="Playlists">
+<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.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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-Playlists.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
-<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="libgpod-Smart-Playlists.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="#id2566586" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id328167" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2596749" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id355172" 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="id2566586"></a><span class="refentrytitle">Artwork</span>
+<a name="id328167"></a><span class="refentrytitle">Artwork</span>
 </h2>
-<p>Artwork &#8212; Data structure to store iPod artwork (cover and photos)</p>
+<p>Artwork &#8212; Data structure to store iPod artwork (album covers)</p>
 </td>
 <td valign="top" align="right"></td>
 </tr></table></div>
@@ -51,7 +52,16 @@
 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);
+                                             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);
 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);
@@ -67,28 +77,38 @@
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2596749"></a><h2>Description</h2>
+<a name="id355172"></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.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2596764"></a><h2>Details</h2>
+<a name="id355194"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2596775"></a><h3>
+<a name="id355205"></a><h3>
 <a name="Itdb-Artwork"></a>Itdb_Artwork</h3>
-<a class="indexterm" name="id2596788"></a><pre class="programlisting">typedef struct {
-    GList *thumbnails;    /* list of Itdb_Thumbs */
-    guint32 artwork_size; /* Size in bytes of the original source image */
-    guint32 id;           /* Artwork id used by photoalbums, starts at
-			   * 0x40... libgpod will set this on sync. */
-    gint32 creation_date; /* Date the image was created */
+<a class="indexterm" name="id355217"></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. */
+    gint32  unk028;
+    guint32 rating;        /* Rating from iPhoto * 20 (PhotoDB only) */
+    gint32  unk036;
+    guint32 creation_date; /* Date the image file was created
+			      (creation date of image file (Mac type,
+			      PhotoDB only) */
+    guint32 digitized_date;/* Date the image was taken (EXIF
+			      information, Mac type, PhotoDB only) */
+    guint32 artwork_size;  /* Size in bytes of the original source
+			      image (PhotoDB only -- don't touch in
+			      case of ArtworkDB!) */
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_Artwork;
 </pre>
@@ -98,21 +118,22 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598292"></a><h3>
+<a name="id352692"></a><h3>
 <a name="Itdb-Thumb"></a>Itdb_Thumb</h3>
-<a class="indexterm" name="id2574183"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id334618"></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 */
+    gchar   *filename;
+    guchar  *image_data;      /* holds the thumbnail data of
+				 non-transfered thumbnails when
+				 filename == NULL */
+    gsize   image_data_len;   /* length of data */
+    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;
+    gint16  width;
+    gint16  height;
+    gint16  horizontal_padding;
+    gint16  vertical_padding;
 } Itdb_Thumb;
 </pre>
 <p>
@@ -121,9 +142,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2596819"></a><h3>
+<a name="id355244"></a><h3>
 <a name="ItdbThumbType"></a>enum ItdbThumbType</h3>
-<a class="indexterm" name="id2596832"></a><pre class="programlisting">typedef enum { 
+<a class="indexterm" name="id355256"></a><pre class="programlisting">typedef enum { 
     ITDB_THUMB_COVER_SMALL,
     ITDB_THUMB_COVER_LARGE,
     ITDB_THUMB_PHOTO_SMALL,
@@ -138,9 +159,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2596851"></a><h3>
+<a name="id355273"></a><h3>
 <a name="itdb-artwork-new"></a>itdb_artwork_new ()</h3>
-<a class="indexterm" name="id2596863"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>* itdb_artwork_new              (void);</pre>
+<a class="indexterm" name="id355285"></a><pre class="programlisting"><a 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>
 <p>
@@ -149,8 +170,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><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
 no longer needed
 </td>
@@ -159,9 +179,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604688"></a><h3>
+<a name="id355346"></a><h3>
 <a name="itdb-artwork-duplicate"></a>itdb_artwork_duplicate ()</h3>
-<a class="indexterm" name="id2604699"></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="id355359"></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>
 <p>
 Duplicates <em class="parameter"><code>artwork</code></em></p>
 <p>
@@ -171,14 +191,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> a new copy of <em class="parameter"><code>artwork</code></em>
 </td>
 </tr>
@@ -187,9 +205,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604777"></a><h3>
+<a name="id359808"></a><h3>
 <a name="itdb-artwork-free"></a>itdb_artwork_free ()</h3>
-<a class="indexterm" name="id2604789"></a><pre class="programlisting">void        itdb_artwork_free               (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<a class="indexterm" name="id359819"></a><pre class="programlisting">void        itdb_artwork_free               (<a 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>
@@ -198,8 +216,7 @@
 <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><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>
 </tr></tbody>
@@ -207,44 +224,58 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2604850"></a><h3>
+<a name="id359872"></a><h3>
 <a name="itdb-artwork-add-thumbnail"></a>itdb_artwork_add_thumbnail ()</h3>
-<a class="indexterm" name="id2604861"></a><pre class="programlisting">gboolean    itdb_artwork_add_thumbnail      (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+<a class="indexterm" name="id359882"></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);</pre>
+                                             const gchar *filename,
+                                             gint rotation,
+                                             GError **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 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>
+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>
+<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><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
 <td> an <span class="type">Itdb_Thumbnail</span>
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 <td> thumbnail size
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
 <td> image file to use to create the thumbnail
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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> TRUE if the thumbnail could be successfully added, FALSE
-otherwise
+otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
 </td>
 </tr>
 </tbody>
@@ -252,9 +283,76 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2591189"></a><h3>
+<a name="id360057"></a><h3>
+<a name="itdb-artwork-add-thumbnail-from-data"></a>itdb_artwork_add_thumbnail_from_data ()</h3>
+<a class="indexterm" name="id360067"></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>
+<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.
+</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>
+</tr>
+<tr>
+<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
+<td> thumbnail size
+</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>
+</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>
+</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> 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>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id360254"></a><h3>
 <a name="itdb-artwork-remove-thumbnail"></a>itdb_artwork_remove_thumbnail ()</h3>
-<a class="indexterm" name="id2591201"></a><pre class="programlisting">void        itdb_artwork_remove_thumbnail   (<a href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+<a class="indexterm" name="id360264"></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>
 <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> isn't freed.</p>
@@ -265,14 +363,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
+<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>
@@ -281,9 +377,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2591305"></a><h3>
+<a name="id360354"></a><h3>
 <a name="itdb-artwork-remove-thumbnails"></a>itdb_artwork_remove_thumbnails ()</h3>
-<a class="indexterm" name="id2591318"></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="id360364"></a><pre class="programlisting">void        itdb_artwork_remove_thumbnails  (<a 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>
@@ -292,8 +388,7 @@
 <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><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>
 </tr></tbody>
@@ -301,9 +396,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2591381"></a><h3>
+<a name="id360417"></a><h3>
 <a name="itdb-artwork-get-thumb-by-type"></a>itdb_artwork_get_thumb_by_type ()</h3>
-<a class="indexterm" name="id2591394"></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 class="indexterm" name="id360428"></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>
 <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>
@@ -314,20 +409,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -337,18 +429,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2591523"></a><h3>
+<a name="id360540"></a><h3>
 <a name="itdb-thumb-get-gdk-pixbuf"></a>itdb_thumb_get_gdk_pixbuf ()</h3>
-<a class="indexterm" name="id2591535"></a><pre class="programlisting">gpointer    itdb_thumb_get_gdk_pixbuf       (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+<a class="indexterm" name="id360550"></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 <a
-href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
-><span class="type">GdkPixbuf</span></a>.
+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 <a
-href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
-><span class="type">GdkPixbuf</span></a> using 
+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>
 
@@ -357,25 +445,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
+<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><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 <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>
+<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>
@@ -385,9 +466,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608220"></a><h3>
+<a name="id360676"></a><h3>
 <a name="itdb-thumb-duplicate"></a>itdb_thumb_duplicate ()</h3>
-<a class="indexterm" name="id2608230"></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="id360686"></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>
 <p>
 Duplicates the data contained in <em class="parameter"><code>thumb</code></em></p>
 <p>
@@ -397,14 +478,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></td>
+<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><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>
@@ -414,9 +493,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608308"></a><h3>
+<a name="id360762"></a><h3>
 <a name="itdb-thumb-free"></a>itdb_thumb_free ()</h3>
-<a class="indexterm" name="id2608318"></a><pre class="programlisting">void        itdb_thumb_free                 (<a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<a class="indexterm" name="id360773"></a><pre class="programlisting">void        itdb_thumb_free                 (<a 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>
@@ -425,8 +504,7 @@
 <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><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></tbody>
@@ -434,9 +512,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608373"></a><h3>
+<a name="id360826"></a><h3>
 <a name="itdb-thumb-new"></a>itdb_thumb_new ()</h3>
-<a class="indexterm" name="id2608383"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>* itdb_thumb_new                  (void);</pre>
+<a class="indexterm" name="id360836"></a><pre class="programlisting"><a href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>* itdb_thumb_new                  (void);</pre>
 <p>
 Creates a new <a href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a></p>
 <p>
@@ -445,8 +523,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><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
 </td>
@@ -455,9 +532,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608438"></a><h3>
+<a name="id360891"></a><h3>
 <a name="itdb-thumb-get-filename"></a>itdb_thumb_get_filename ()</h3>
-<a class="indexterm" name="id2608449"></a><pre class="programlisting">gchar*      itdb_thumb_get_filename         (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+<a class="indexterm" name="id360901"></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>
 <p>
 Get filename of thumbnail. If it's a thumbnail on the iPod, return
@@ -470,20 +547,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
+<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><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><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>
@@ -492,6 +566,12 @@
 </table></div>
 </div>
 </div>
+<div class="refsect1" lang="en">
+<a name="id360988"></a><h2>See Also</h2>
+<p>
+<a href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a>
+</p>
 </div>
+</div>
 </body>
 </html>

Modified: libgpod/trunk/docs/reference/html/libgpod-Device.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Device.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-Device.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,36 +3,38 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Device</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch02.html" title="iPod database components">
+<link rel="up" href="ch01.html" title="iPod database components">
 <link rel="prev" href="libgpod-Artwork.html" title="Artwork">
+<link rel="next" href="photodb.html" title="Part&#160;II.&#160;Photo database">
 <meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></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>&#160;</td>
+<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="#id2593802" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id269835" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2602112" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id355105" 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="id2593802"></a><span class="refentrytitle">Device</span>
+<a name="id269835"></a><span class="refentrytitle">Device</span>
 </h2>
-<p>Device &#8212; Data structure holding information about the iPod (model, mount point, ...)</p>
+<p>Device &#8212; Data structure holding information about the iPod (model, mount point, etc.)</p>
 </td>
 <td valign="top" align="right"></td>
 </tr></table></div>
@@ -50,22 +52,41 @@
 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);
+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>;
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2602112"></a><h2>Description</h2>
+<a name="id355105"></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="id2602128"></a><h2>Details</h2>
+<a name="id358894"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2602138"></a><h3>
+<a name="id358905"></a><h3>
 <a name="Itdb-Device"></a>Itdb_Device</h3>
-<a class="indexterm" name="id2602150"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id358917"></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 
@@ -84,9 +105,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2564681"></a><h3>
+<a name="id339125"></a><h3>
 <a name="itdb-device-new"></a>itdb_device_new ()</h3>
-<a class="indexterm" name="id2589961"></a><pre class="programlisting"><a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>* itdb_device_new                (void);</pre>
+<a class="indexterm" name="id315771"></a><pre class="programlisting"><a 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>
 <p>
@@ -95,8 +116,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><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>
@@ -105,9 +125,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2596116"></a><h3>
+<a name="id358980"></a><h3>
 <a name="itdb-device-free"></a>itdb_device_free ()</h3>
-<a class="indexterm" name="id2596129"></a><pre class="programlisting">void        itdb_device_free                (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<a class="indexterm" name="id358992"></a><pre class="programlisting">void        itdb_device_free                (<a 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>
@@ -116,8 +136,7 @@
 <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><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></tbody>
@@ -125,9 +144,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2596189"></a><h3>
+<a name="id359052"></a><h3>
 <a name="itdb-device-set-mountpoint"></a>itdb_device_set_mountpoint ()</h3>
-<a class="indexterm" name="id2596200"></a><pre class="programlisting">void        itdb_device_set_mountpoint      (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+<a class="indexterm" name="id359065"></a><pre class="programlisting">void        itdb_device_set_mountpoint      (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
                                              const gchar *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 
@@ -139,14 +158,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
+<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>mp</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
 <td> the new mount point
 </td>
 </tr>
@@ -155,9 +172,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2605941"></a><h3>
+<a name="id361489"></a><h3>
 <a name="itdb-device-read-sysinfo"></a>itdb_device_read_sysinfo ()</h3>
-<a class="indexterm" name="id2605953"></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="id361499"></a><pre class="programlisting">gboolean    itdb_device_read_sysinfo        (<a 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>
@@ -168,14 +185,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> TRUE if file could be read, FALSE otherwise 
 </td>
 </tr>
@@ -184,9 +199,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606021"></a><h3>
+<a name="id361559"></a><h3>
 <a name="itdb-device-get-sysinfo"></a>itdb_device_get_sysinfo ()</h3>
-<a class="indexterm" name="id2606032"></a><pre class="programlisting">gchar*      itdb_device_get_sysinfo         (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+<a class="indexterm" name="id361569"></a><pre class="programlisting">gchar*      itdb_device_get_sysinfo         (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
                                              const gchar *field);</pre>
 <p>
 Retrieve specified field from the SysInfo file.</p>
@@ -197,20 +212,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></td>
+<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>field</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></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><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></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
 </td>
@@ -220,9 +232,274 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606140"></a><h3>
+<a name="id361665"></a><h3>
+<a name="itdb-device-set-sysinfo"></a>itdb_device_set_sysinfo ()</h3>
+<a class="indexterm" name="id361675"></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>
+<p>
+Set specified field. It can later be written to the iPod using
+itdb_device_read_sysinfo</p>
+<p>
+
+</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>field</code></em>&#160;:</span></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>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id361761"></a><h3>
+<a name="itdb-device-write-sysinfo"></a>itdb_device_write_sysinfo ()</h3>
+<a class="indexterm" name="id361771"></a><pre class="programlisting">gboolean    itdb_device_write_sysinfo       (<a href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                             GError **error);</pre>
+<p>
+Fills the SysInfo file with information in device-&gt;sysinfo. Note:
+no directories are created if not already existent.</p>
+<p>
+
+</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>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 if file could be read, FALSE otherwise 
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id361855"></a><h3>
+<a name="itdb-device-get-ipod-info"></a>itdb_device_get_ipod_info ()</h3>
+<a class="indexterm" name="id361866"></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>
+<p>
+Retrieve the <a href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod</p>
+<p>
+
+</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"><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>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id361939"></a><h3>
+<a name="itdb-info-get-ipod-info-table"></a>itdb_info_get_ipod_info_table ()</h3>
+<a class="indexterm" name="id361949"></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>
+<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="id361999"></a><h3>
+<a name="itdb-info-get-ipod-generation-string"></a>itdb_info_get_ipod_generation_string ()</h3>
+<a class="indexterm" name="id362010"></a><pre class="programlisting">const gchar* itdb_info_get_ipod_generation_string
+                                            (<a 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><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>
+</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>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id362080"></a><h3>
+<a name="itdb-info-get-ipod-model-name-string"></a>itdb_info_get_ipod_model_name_string ()</h3>
+<a class="indexterm" name="id362091"></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>
+<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><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>
+</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>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id362160"></a><h3>
+<a name="itdb-init-ipod"></a>itdb_init_ipod ()</h3>
+<a class="indexterm" name="id362170"></a><pre class="programlisting">gboolean    itdb_init_ipod                  (const gchar *mountpoint,
+                                             const gchar *model_number,
+                                             const gchar *ipod_name,
+                                             GError **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><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.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id362288"></a><h3>
+<a name="Itdb-IpodGeneration"></a>enum Itdb_IpodGeneration</h3>
+<a class="indexterm" name="id362298"></a><pre class="programlisting">typedef enum {
+    ITDB_IPOD_GENERATION_UNKNOWN,
+    ITDB_IPOD_GENERATION_FIRST,
+    ITDB_IPOD_GENERATION_SECOND,
+    ITDB_IPOD_GENERATION_THIRD,
+    ITDB_IPOD_GENERATION_FOURTH,
+    ITDB_IPOD_GENERATION_FIFTH,
+    ITDB_IPOD_GENERATION_SIXTH,
+    ITDB_IPOD_GENERATION_MOBILE
+} Itdb_IpodGeneration;
+</pre>
+<p>
+
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id362314"></a><h3>
+<a name="Itdb-IpodInfo"></a>Itdb_IpodInfo</h3>
+<a class="indexterm" name="id362325"></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;
+} Itdb_IpodInfo;
+</pre>
+<p>
+
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id362344"></a><h3>
 <a name="Itdb-IpodModel"></a>enum Itdb_IpodModel</h3>
-<a class="indexterm" name="id2596279"></a><pre class="programlisting">typedef enum {
+<a class="indexterm" name="id362355"></a><pre class="programlisting">typedef enum {
     ITDB_IPOD_MODEL_INVALID,
     ITDB_IPOD_MODEL_UNKNOWN,
     ITDB_IPOD_MODEL_COLOR,
@@ -253,13 +530,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2596307"></a><h3>
+<a name="id362374"></a><h3>
 <a name="Itdb-ArtworkFormat"></a>Itdb_ArtworkFormat</h3>
-<a class="indexterm" name="id2596319"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id362385"></a><pre class="programlisting">typedef struct {
 	ItdbThumbType type;
 	gint16 width;
 	gint16 height;
 	gint16 correlation_id;
+        ItdbThumbFormat format;
 } Itdb_ArtworkFormat;
 </pre>
 <p>

Modified: libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-File-handling-functions.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,37 +3,38 @@
 <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.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch01.html" title="iPod database">
+<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.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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-The-Itdb-iTunesDB-structure.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="u" href="itunesdb.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-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="#id2585793" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id321287" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2584218" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id317334" 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="id2585793"></a><span class="refentrytitle">File handling functions</span>
+<a name="id321287"></a><span class="refentrytitle">File handling functions</span>
 </h2>
-<p>File handling functions &#8212; Functions to copy new files to the iPod</p>
+<p>File handling functions &#8212; Managing files on the iPod</p>
 </td>
 <td valign="top" align="right"></td>
 </tr></table></div>
@@ -55,17 +56,18 @@
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2584218"></a><h2>Description</h2>
+<a name="id317334"></a><h2>Description</h2>
 <p>
-
+These functions are for copying, renaming, and getting information about the
+files and directories on the iPod
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2584233"></a><h2>Details</h2>
+<a name="id317350"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2584244"></a><h3>
+<a name="id317361"></a><h3>
 <a name="itdb-cp-track-to-ipod"></a>itdb_cp_track_to_ipod ()</h3>
-<a class="indexterm" name="id2584255"></a><pre class="programlisting">gboolean    itdb_cp_track_to_ipod           (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+<a class="indexterm" name="id317373"></a><pre class="programlisting">gboolean    itdb_cp_track_to_ipod           (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
                                              gchar *filename,
                                              GError **error);</pre>
 <p>
@@ -103,26 +105,22 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
 <td> the source file
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><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>
@@ -132,9 +130,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2577564"></a><h3>
+<a name="id346156"></a><h3>
 <a name="itdb-filename-fs2ipod"></a>itdb_filename_fs2ipod ()</h3>
-<a class="indexterm" name="id2577576"></a><pre class="programlisting">void        itdb_filename_fs2ipod           (gchar *filename);</pre>
+<a class="indexterm" name="id346168"></a><pre class="programlisting">void        itdb_filename_fs2ipod           (gchar *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>
@@ -145,8 +143,7 @@
 <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><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>
 </tr></tbody>
@@ -154,9 +151,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2577632"></a><h3>
+<a name="id346224"></a><h3>
 <a name="itdb-filename-ipod2fs"></a>itdb_filename_ipod2fs ()</h3>
-<a class="indexterm" name="id2577643"></a><pre class="programlisting">void        itdb_filename_ipod2fs           (gchar *ipod_file);</pre>
+<a class="indexterm" name="id346236"></a><pre class="programlisting">void        itdb_filename_ipod2fs           (gchar *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 ':'.
@@ -167,8 +164,7 @@
 <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><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>
 </tr></tbody>
@@ -176,9 +172,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2577700"></a><h3>
+<a name="id346292"></a><h3>
 <a name="itdb-filename-on-ipod"></a>itdb_filename_on_ipod ()</h3>
-<a class="indexterm" name="id2577712"></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="id346303"></a><pre class="programlisting">gchar*      itdb_filename_on_ipod           (<a 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>.
 </p>
@@ -197,14 +193,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></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.
 </td>
@@ -214,9 +208,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2583255"></a><h3>
+<a name="id347941"></a><h3>
 <a name="itdb-musicdirs-number"></a>itdb_musicdirs_number ()</h3>
-<a class="indexterm" name="id2583266"></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="id347952"></a><pre class="programlisting">gint        itdb_musicdirs_number           (<a 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>
@@ -231,14 +225,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> max number of directories in iPod_Control/Music
 </td>
 </tr>
@@ -247,9 +239,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2583341"></a><h3>
+<a name="id348023"></a><h3>
 <a name="itdb-rename-files"></a>itdb_rename_files ()</h3>
-<a class="indexterm" name="id2583354"></a><pre class="programlisting">gboolean    itdb_rename_files               (const gchar *mp,
+<a class="indexterm" name="id348035"></a><pre class="programlisting">gboolean    itdb_rename_files               (const gchar *mp,
                                              GError **error);</pre>
 <p>
 Renames/removes some files on the iPod (Playcounts, OTG
@@ -263,20 +255,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></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><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><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> FALSE on error and sets <em class="parameter"><code>error</code></em> accordingly
 </td>
 </tr>

Modified: libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-Low-level-functions.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,35 +3,36 @@
 <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.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch01.html" title="iPod database">
+<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="ch02.html" title="iPod database components">
+<link rel="next" href="ch01.html" title="iPod database components">
 <meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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-Time-handling.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="u" href="itunesdb.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="ch02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+<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="#id2563835" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id342329" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2572170" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id315035" 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="id2563835"></a><span class="refentrytitle">Low-level functions</span>
+<a name="id342329"></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>
@@ -48,8 +49,12 @@
 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,
@@ -71,17 +76,18 @@
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2572170"></a><h2>Description</h2>
+<a name="id315035"></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="id2572186"></a><h2>Details</h2>
+<a name="id315052"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2572196"></a><h3>
+<a name="id315063"></a><h3>
 <a name="itdb-get-control-dir"></a>itdb_get_control_dir ()</h3>
-<a class="indexterm" name="id2572208"></a><pre class="programlisting">gchar*      itdb_get_control_dir            (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id315075"></a><pre class="programlisting">gchar*      itdb_get_control_dir            (const gchar *mountpoint);</pre>
 <p>
 Get the i*_Control directory. Observed values are 'iPod_Control'
 for standard iPods and 'iTunes/iTunes_Control' for mobile
@@ -93,14 +99,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -110,9 +114,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2572280"></a><h3>
+<a name="id315144"></a><h3>
 <a name="itdb-get-itunes-dir"></a>itdb_get_itunes_dir ()</h3>
-<a class="indexterm" name="id2572292"></a><pre class="programlisting">gchar*      itdb_get_itunes_dir             (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id315156"></a><pre class="programlisting">gchar*      itdb_get_itunes_dir             (const gchar *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>
@@ -123,14 +127,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -140,9 +142,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2572372"></a><h3>
+<a name="id350796"></a><h3>
 <a name="itdb-get-music-dir"></a>itdb_get_music_dir ()</h3>
-<a class="indexterm" name="id2572384"></a><pre class="programlisting">gchar*      itdb_get_music_dir              (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id350807"></a><pre class="programlisting">gchar*      itdb_get_music_dir              (const gchar *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>
@@ -153,14 +155,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -170,9 +170,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2593290"></a><h3>
+<a name="id350884"></a><h3>
 <a name="itdb-get-artwork-dir"></a>itdb_get_artwork_dir ()</h3>
-<a class="indexterm" name="id2593302"></a><pre class="programlisting">gchar*      itdb_get_artwork_dir            (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id350896"></a><pre class="programlisting">gchar*      itdb_get_artwork_dir            (const gchar *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>
@@ -183,14 +183,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -200,9 +198,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2593382"></a><h3>
+<a name="id350975"></a><h3>
 <a name="itdb-get-device-dir"></a>itdb_get_device_dir ()</h3>
-<a class="indexterm" name="id2593394"></a><pre class="programlisting">gchar*      itdb_get_device_dir             (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id350987"></a><pre class="programlisting">gchar*      itdb_get_device_dir             (const gchar *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>
@@ -213,14 +211,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -230,9 +226,37 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2593474"></a><h3>
+<a name="id351066"></a><h3>
+<a name="itdb-get-photos-dir"></a>itdb_get_photos_dir ()</h3>
+<a class="indexterm" name="id351078"></a><pre class="programlisting">gchar*      itdb_get_photos_dir             (const gchar *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>
+<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 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>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id351129"></a><h3>
 <a name="itdb-get-itunesdb-path"></a>itdb_get_itunesdb_path ()</h3>
-<a class="indexterm" name="id2593485"></a><pre class="programlisting">gchar*      itdb_get_itunesdb_path          (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id351139"></a><pre class="programlisting">gchar*      itdb_get_itunesdb_path          (const gchar *mountpoint);</pre>
 <p>
 Retrieve a path to the iTunesDB</p>
 <p>
@@ -242,14 +266,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 after use.
 </td>
@@ -259,9 +281,36 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601088"></a><h3>
+<a name="id351200"></a><h3>
+<a name="itdb-get-itunessd-path"></a>itdb_get_itunessd_path ()</h3>
+<a class="indexterm" name="id351210"></a><pre class="programlisting">gchar*      itdb_get_itunessd_path          (const gchar *mountpoint);</pre>
+<p>
+Retrieve a path to the iTunesSD</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"><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>
+after use.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id351271"></a><h3>
 <a name="itdb-get-artworkdb-path"></a>itdb_get_artworkdb_path ()</h3>
-<a class="indexterm" name="id2601098"></a><pre class="programlisting">gchar*      itdb_get_artworkdb_path         (const gchar *mountpoint);</pre>
+<a class="indexterm" name="id351282"></a><pre class="programlisting">gchar*      itdb_get_artworkdb_path         (const gchar *mountpoint);</pre>
 <p>
 Retrieve a path to the ArtworkDB</p>
 <p>
@@ -271,14 +320,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></td>
+<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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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> 
 after use.
 </td>
@@ -288,9 +335,64 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601161"></a><h3>
+<a name="id351342"></a><h3>
+<a name="itdb-get-photodb-path"></a>itdb_get_photodb_path ()</h3>
+<a class="indexterm" name="id351353"></a><pre class="programlisting">gchar*      itdb_get_photodb_path           (const gchar *mountpoint);</pre>
+<p>
+Retrieve a path to the Photo DB</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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td> path to the PhotoDB or NULL if non-existent. Must
+<code class="function">g_free()</code> after use.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id351414"></a><h3>
+<a name="itdb-get-photos-thumb-dir"></a>itdb_get_photos_thumb_dir ()</h3>
+<a class="indexterm" name="id351424"></a><pre class="programlisting">gchar*      itdb_get_photos_thumb_dir       (const gchar *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>
+<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"><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>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id351494"></a><h3>
 <a name="itdb-get-path"></a>itdb_get_path ()</h3>
-<a class="indexterm" name="id2601171"></a><pre class="programlisting">gchar*      itdb_get_path                   (const gchar *dir,
+<a class="indexterm" name="id351505"></a><pre class="programlisting">gchar*      itdb_get_path                   (const gchar *dir,
                                              const gchar *file);</pre>
 <p>
 Retrieve a path to the <em class="parameter"><code>file</code></em> in <em class="parameter"><code>dir</code></em></p>
@@ -301,20 +403,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>dir</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>dir</code></em>&#160;:</span></td>
 <td> a directory
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></td>
 <td> a file
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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 
 after use.
 </td>
@@ -324,11 +423,14 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601249"></a><h3>
+<a name="id351599"></a><h3>
 <a name="itdb-resolve-path"></a>itdb_resolve_path ()</h3>
-<a class="indexterm" name="id2601259"></a><pre class="programlisting">gchar*      itdb_resolve_path               (const gchar *root,
+<a class="indexterm" name="id351609"></a><pre class="programlisting">gchar*      itdb_resolve_path               (const gchar *root,
                                              const gchar * 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
 good_path that is case-insensitively equal to c.  If we find d, we
@@ -341,23 +443,18 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>root</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>root</code></em>&#160;:</span></td>
 <td> in local encoding
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>components</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>components</code></em>&#160;:</span></td>
 <td> in utf8
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td>
-
-
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td> path to track on the iPod or NULL.
 </td>
 </tr>
 </tbody>
@@ -365,9 +462,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601337"></a><h3>
+<a name="id351686"></a><h3>
 <a name="itdb-shuffle-write"></a>itdb_shuffle_write ()</h3>
-<a class="indexterm" name="id2601347"></a><pre class="programlisting">gboolean    itdb_shuffle_write              (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id351696"></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>
 <p>
 Write out an iTunesSD for the Shuffle.
@@ -385,20 +482,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><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>
@@ -408,9 +502,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601448"></a><h3>
+<a name="id351793"></a><h3>
 <a name="itdb-shuffle-write-file"></a>itdb_shuffle_write_file ()</h3>
-<a class="indexterm" name="id2601459"></a><pre class="programlisting">gboolean    itdb_shuffle_write_file         (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id351803"></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>
 <p>
@@ -422,26 +516,22 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></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><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><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>
@@ -451,9 +541,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601568"></a><h3>
+<a name="id351911"></a><h3>
 <a name="itdb-cp"></a>itdb_cp ()</h3>
-<a class="indexterm" name="id2601578"></a><pre class="programlisting">gboolean    itdb_cp                         (const gchar *from_file,
+<a class="indexterm" name="id351921"></a><pre class="programlisting">gboolean    itdb_cp                         (const gchar *from_file,
                                              const gchar *to_file,
                                              GError **error);</pre>
 <p>
@@ -465,26 +555,22 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>from_file</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>from_file</code></em>&#160;:</span></td>
 <td> source file
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>to_file</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>to_file</code></em>&#160;:</span></td>
 <td> destination file
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><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>
@@ -494,9 +580,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601683"></a><h3>
+<a name="id352022"></a><h3>
 <a name="itdb-parse-file"></a>itdb_parse_file ()</h3>
-<a class="indexterm" name="id2601693"></a><pre class="programlisting"><a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>* itdb_parse_file              (const gchar *filename,
+<a class="indexterm" name="id352032"></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>
 <p>
 Same as <code class="function">itunesdb_parse()</code>, but filename is specified directly.</p>
@@ -507,20 +593,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
 <td> path to a file in iTunesDB format
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><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 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
@@ -532,9 +615,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601815"></a><h3>
+<a name="id352150"></a><h3>
 <a name="itdb-write-file"></a>itdb_write_file ()</h3>
-<a class="indexterm" name="id2601826"></a><pre class="programlisting">gboolean    itdb_write_file                 (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id352160"></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>
 <p>
@@ -547,26 +630,22 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> TRUE if all went well, FALSE otherwise
 </td>
 </tr>
@@ -575,9 +654,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2601952"></a><h3>
+<a name="id352283"></a><h3>
 <a name="itdb-duplicate"></a>itdb_duplicate ()</h3>
-<a class="indexterm" name="id2601962"></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="id352294"></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>
 <p>
 Duplicate <em class="parameter"><code>itdb</code></em> 
 FIXME: not implemented yet</p>
@@ -588,14 +667,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> always return NULL since it's unimplemented
 </td>
 </tr>

Copied: libgpod/trunk/docs/reference/html/libgpod-Photo-database.html (from rev 167, libgpod/branches/upstream/current/docs/reference/html/libgpod-Photo-database.html)

Modified: libgpod/trunk/docs/reference/html/libgpod-Playlists.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Playlists.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-Playlists.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,35 +3,36 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Playlists</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch02.html" title="iPod database components">
+<link rel="up" href="ch01.html" title="iPod database components">
 <link rel="prev" href="libgpod-Tracks.html" title="Tracks">
-<link rel="next" href="libgpod-Artwork.html" title="Artwork">
+<link rel="next" href="libgpod-Smart-Playlists.html" title="Smart Playlists">
 <meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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-Tracks.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
-<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></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-Artwork.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+<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="#id2577099" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id317904" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2602492" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id349822" 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="id2577099"></a><span class="refentrytitle">Playlists</span>
+<a name="id317904"></a><span class="refentrytitle">Playlists</span>
 </h2>
 <p>Playlists &#8212; Data structure to represent an iPod playlist</p>
 </td>
@@ -84,17 +85,19 @@
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2602492"></a><h2>Description</h2>
+<a name="id349822"></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
+a playlist, etc.
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2602508"></a><h2>Details</h2>
+<a name="id349839"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2602519"></a><h3>
+<a name="id349849"></a><h3>
 <a name="Itdb-Playlist"></a>Itdb_Playlist</h3>
-<a class="indexterm" name="id2602531"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id349861"></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                */
@@ -104,34 +107,19 @@
     gint  num;            /* number of tracks in playlist          */
     GList *members;       /* tracks in playlist (Track *)          */
     gboolean is_spl;      /* smart playlist?                       */
-    guint32 timestamp;    /* some timestamp                        */
+    guint32 timestamp;    /* timestamp of playlist creation        */
     guint64 id;           /* playlist ID                           */
-    guint32 mhodcount;    /* This appears to be the number of string
-			     MHODs (type &lt; 50) associated with this
-			     playlist (typically 0x01). Doesn't seem
-			     to be signficant unless you include Type
-			     52 MHODs. libgpod sets this to 1 when
-			     syncing */
-    guint16 libmhodcount; /* The number of Type 52 MHODs associated
-			     with this playlist. If you don't create
-			     Type 52 MHODs, this can be
-			     zero. Otherwise, if you have Type 52
-			     MHODs associated with this playlist and
-			     set this to zero, no songs appear on the
-			     iPod. jcsjcs: with iTunes 4.9 this seems
-			     to be set to 1 even without any Type 52
-			     MHODs present. libgpod sets this to 1
-			     when syncing */
     guint32 sortorder;    /* How to sort playlist -- see below     */
     guint32 podcastflag;  /* ITDB_PL_FLAG_NORM/_PODCAST            */
     SPLPref splpref;      /* smart playlist prefs                  */
     SPLRules splrules;    /* rules for smart playlists             */
+    gpointer reserved1;   /* reserved for MHOD100 implementation   */
+    gpointer reserved2;   /* reserved for MHOD100 implementation   */
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_Playlist;
 </pre>
@@ -141,9 +129,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2587305"></a><h3>
+<a name="id327508"></a><h3>
 <a name="ItdbPlaylistSortOrder"></a>enum ItdbPlaylistSortOrder</h3>
-<a class="indexterm" name="id2602934"></a><pre class="programlisting">typedef enum
+<a class="indexterm" name="id327413"></a><pre class="programlisting">typedef enum
 {
     ITDB_PSO_MANUAL = 1,
 /*    ITDB_PSO_UNKNOWN = 2, */
@@ -181,9 +169,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2587616"></a><h3>
+<a name="id349891"></a><h3>
 <a name="itdb-playlist-new"></a>itdb_playlist_new ()</h3>
-<a class="indexterm" name="id2602561"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>* itdb_playlist_new            (const gchar *title,
+<a class="indexterm" name="id355786"></a><pre class="programlisting"><a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>* itdb_playlist_new            (const gchar *title,
                                              gboolean spl);</pre>
 <p>
 Creates a new playlist. If <em class="parameter"><code>spl</code></em> is TRUE, a smart
@@ -196,20 +184,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></td>
 <td> playlist title
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></td>
 <td> smart playlist flag
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -219,9 +204,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2600192"></a><h3>
+<a name="id355889"></a><h3>
 <a name="itdb-playlist-free"></a>itdb_playlist_free ()</h3>
-<a class="indexterm" name="id2600204"></a><pre class="programlisting">void        itdb_playlist_free              (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id355900"></a><pre class="programlisting">void        itdb_playlist_free              (<a 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>
@@ -230,8 +215,7 @@
 <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><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>
 </tr></tbody>
@@ -239,9 +223,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2600266"></a><h3>
+<a name="id355954"></a><h3>
 <a name="itdb-playlist-duplicate"></a>itdb_playlist_duplicate ()</h3>
-<a class="indexterm" name="id2600277"></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="id355964"></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>
 <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
@@ -253,14 +237,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -270,9 +252,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606229"></a><h3>
+<a name="id356051"></a><h3>
 <a name="itdb-playlist-add"></a>itdb_playlist_add ()</h3>
-<a class="indexterm" name="id2606239"></a><pre class="programlisting">void        itdb_playlist_add               (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id356062"></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>
 <p>
@@ -287,20 +269,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
+<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>
 </tr>
@@ -309,9 +288,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606374"></a><h3>
+<a name="id356192"></a><h3>
 <a name="itdb-playlist-move"></a>itdb_playlist_move ()</h3>
-<a class="indexterm" name="id2606384"></a><pre class="programlisting">void        itdb_playlist_move              (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+<a class="indexterm" name="id356203"></a><pre class="programlisting">void        itdb_playlist_move              (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
                                              guint32 pos);</pre>
 <p>
 Moves playlist <em class="parameter"><code>pl</code></em> to position <em class="parameter"><code>pos</code></em></p>
@@ -322,14 +301,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
 <td> new position
 </td>
 </tr>
@@ -338,9 +315,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606462"></a><h3>
+<a name="id356279"></a><h3>
 <a name="itdb-playlist-remove"></a>itdb_playlist_remove ()</h3>
-<a class="indexterm" name="id2606472"></a><pre class="programlisting">void        itdb_playlist_remove            (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id356290"></a><pre class="programlisting">void        itdb_playlist_remove            (<a 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 
 and frees memory</p>
@@ -350,8 +327,7 @@
 <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><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>
 </tr></tbody>
@@ -359,9 +335,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606533"></a><h3>
+<a name="id356350"></a><h3>
 <a name="itdb-playlist-unlink"></a>itdb_playlist_unlink ()</h3>
-<a class="indexterm" name="id2606543"></a><pre class="programlisting">void        itdb_playlist_unlink            (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id356361"></a><pre class="programlisting">void        itdb_playlist_unlink            (<a 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>
@@ -371,8 +347,7 @@
 <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><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>
 </tr></tbody>
@@ -380,9 +355,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606606"></a><h3>
+<a name="id356422"></a><h3>
 <a name="itdb-playlist-add-track"></a>itdb_playlist_add_track ()</h3>
-<a class="indexterm" name="id2606617"></a><pre class="programlisting">void        itdb_playlist_add_track         (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+<a class="indexterm" name="id356433"></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>
 <p>
@@ -395,20 +370,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
+<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>
 </tr>
@@ -417,9 +389,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606731"></a><h3>
+<a name="id356545"></a><h3>
 <a name="itdb-playlist-remove-track"></a>itdb_playlist_remove_track ()</h3>
-<a class="indexterm" name="id2606742"></a><pre class="programlisting">void        itdb_playlist_remove_track      (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+<a class="indexterm" name="id356555"></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>
 <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
@@ -433,14 +405,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
@@ -449,9 +419,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606866"></a><h3>
+<a name="id356675"></a><h3>
 <a name="itdb-playlist-contains-track"></a>itdb_playlist_contains_track ()</h3>
-<a class="indexterm" name="id2606877"></a><pre class="programlisting">gboolean    itdb_playlist_contains_track    (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+<a class="indexterm" name="id356686"></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>
 <p>
 Checks if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em>.</p>
@@ -462,20 +432,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> TRUE if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em>, FALSE otherwise
 </td>
 </tr>
@@ -484,9 +451,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2606984"></a><h3>
+<a name="id356789"></a><h3>
 <a name="itdb-playlist-contain-track-number"></a>itdb_playlist_contain_track_number ()</h3>
-<a class="indexterm" name="id2606997"></a><pre class="programlisting">guint32     itdb_playlist_contain_track_number
+<a class="indexterm" name="id356800"></a><pre class="programlisting">guint32     itdb_playlist_contain_track_number
                                             (<a 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 
@@ -498,14 +465,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -514,9 +479,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607070"></a><h3>
+<a name="id356869"></a><h3>
 <a name="itdb-playlist-tracks-number"></a>itdb_playlist_tracks_number ()</h3>
-<a class="indexterm" name="id2607081"></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="id356879"></a><pre class="programlisting">guint32     itdb_playlist_tracks_number     (<a 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>
@@ -526,14 +491,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> track count
 </td>
 </tr>
@@ -542,9 +505,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607145"></a><h3>
+<a name="id356942"></a><h3>
 <a name="itdb-playlist-mpl"></a>itdb_playlist_mpl ()</h3>
-<a class="indexterm" name="id2607156"></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="id356953"></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>
 <p>
 Gets the master playlist of <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -554,14 +517,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -570,9 +531,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607225"></a><h3>
+<a name="id357021"></a><h3>
 <a name="itdb-playlist-is-mpl"></a>itdb_playlist_is_mpl ()</h3>
-<a class="indexterm" name="id2607236"></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="id357031"></a><pre class="programlisting">gboolean    itdb_playlist_is_mpl            (<a 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>
@@ -582,14 +543,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -598,9 +557,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607306"></a><h3>
+<a name="id357100"></a><h3>
 <a name="itdb-playlist-set-mpl"></a>itdb_playlist_set_mpl ()</h3>
-<a class="indexterm" name="id2607317"></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="id357111"></a><pre class="programlisting">void        itdb_playlist_set_mpl           (<a 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>
@@ -609,8 +568,7 @@
 <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><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>
 </tr></tbody>
@@ -618,9 +576,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607372"></a><h3>
+<a name="id357165"></a><h3>
 <a name="itdb-playlist-podcasts"></a>itdb_playlist_podcasts ()</h3>
-<a class="indexterm" name="id2607382"></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="id357176"></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>
 <p>
 Gets the podcasts playlist of <em class="parameter"><code>itdb</code></em></p>
 <p>
@@ -630,14 +588,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -646,9 +602,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607453"></a><h3>
+<a name="id357244"></a><h3>
 <a name="itdb-playlist-is-podcasts"></a>itdb_playlist_is_podcasts ()</h3>
-<a class="indexterm" name="id2607464"></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="id357254"></a><pre class="programlisting">gboolean    itdb_playlist_is_podcasts       (<a 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>
@@ -658,14 +614,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -674,9 +628,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607535"></a><h3>
+<a name="id357323"></a><h3>
 <a name="itdb-playlist-set-podcasts"></a>itdb_playlist_set_podcasts ()</h3>
-<a class="indexterm" name="id2607546"></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="id357334"></a><pre class="programlisting">void        itdb_playlist_set_podcasts      (<a 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>
@@ -685,8 +639,7 @@
 <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><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>
 </tr></tbody>
@@ -694,9 +647,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607601"></a><h3>
+<a name="id357388"></a><h3>
 <a name="itdb-playlist-exists"></a>itdb_playlist_exists ()</h3>
-<a class="indexterm" name="id2607611"></a><pre class="programlisting">gboolean    itdb_playlist_exists            (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id357399"></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>
 <p>
 Checks if <em class="parameter"><code>pl</code></em> is present in <em class="parameter"><code>db</code></em></p>
@@ -707,20 +660,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -729,9 +679,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607716"></a><h3>
+<a name="id357501"></a><h3>
 <a name="itdb-playlist-by-id"></a>itdb_playlist_by_id ()</h3>
-<a class="indexterm" name="id2607726"></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,
+<a class="indexterm" name="id357512"></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>
 <p>
 Looks up a playlist whose ID is <em class="parameter"><code>id</code></em></p>
@@ -742,20 +692,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></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><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>
@@ -765,9 +712,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607822"></a><h3>
+<a name="id357604"></a><h3>
 <a name="itdb-playlist-by-nr"></a>itdb_playlist_by_nr ()</h3>
-<a class="indexterm" name="id2607833"></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,
+<a class="indexterm" name="id357614"></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>
 <p>
 Gets the playlist at the given position in <em class="parameter"><code>itdb</code></em></p>
@@ -778,20 +725,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>num</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>num</code></em>&#160;:</span></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><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>
 </tr>
@@ -800,9 +744,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2607929"></a><h3>
+<a name="id357707"></a><h3>
 <a name="itdb-playlist-by-name"></a>itdb_playlist_by_name ()</h3>
-<a class="indexterm" name="id2607940"></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,
+<a class="indexterm" name="id357717"></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>
 <p>
 Searches a playlist whose name is <em class="parameter"><code>name</code></em> in <em class="parameter"><code>itdb</code></em></p>
@@ -813,20 +757,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></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><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>
@@ -836,9 +777,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2608041"></a><h3>
+<a name="id357814"></a><h3>
 <a name="itdb-playlist-randomize"></a>itdb_playlist_randomize ()</h3>
-<a class="indexterm" name="id2608052"></a><pre class="programlisting">void        itdb_playlist_randomize         (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<a class="indexterm" name="id357825"></a><pre class="programlisting">void        itdb_playlist_randomize         (<a href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
 <p>
 Randomizes <em class="parameter"><code>pl</code></em></p>
 <p>
@@ -847,8 +788,7 @@
 <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><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>
 </tr></tbody>

Copied: libgpod/trunk/docs/reference/html/libgpod-Smart-Playlists.html (from rev 167, libgpod/branches/upstream/current/docs/reference/html/libgpod-Smart-Playlists.html)

Modified: libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,35 +3,36 @@
 <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.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch01.html" title="iPod database">
-<link rel="prev" href="ch01.html" title="iPod database">
+<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.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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="ch01.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="p" href="itunesdb.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.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-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="#id2571146" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id323631" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2510392" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id270938" 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="id2571146"></a><span class="refentrytitle">iPod database reading/writing</span>
+<a name="id323631"></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>
 </td>
@@ -50,7 +51,7 @@
 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> *db,
+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);
@@ -62,17 +63,98 @@
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2510392"></a><h2>Description</h2>
+<a name="id270938"></a><h2>Description</h2>
 <p>
-
+These functions are for creating, reading, writing, and deleting the iPod
+database and getting the total number of tracks and playlists.
 </p>
+<p>
+Overview of using the 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
+</p>
+<p>
+<a 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).
+</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.
+</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.
+</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.
+</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.
+</p>
+<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
+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 you 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 Tunes. (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.)
+</p>
+<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.
+</p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2510407"></a><h2>Details</h2>
+<a name="id332997"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2510418"></a><h3>
+<a name="id333007"></a><h3>
 <a name="Itdb-iTunesDB"></a>Itdb_iTunesDB</h3>
-<a class="indexterm" name="id2510431"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id333019"></a><pre class="programlisting">typedef struct {
     GList *tracks;
     GList *playlists;
     gchar *filename;    /* filename of iTunesDB */
@@ -82,9 +164,8 @@
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_iTunesDB;
 </pre>
@@ -94,18 +175,17 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2510454"></a><h3>
+<a name="id333038"></a><h3>
 <a name="ItdbUserDataDestroyFunc"></a>ItdbUserDataDestroyFunc ()</h3>
-<a class="indexterm" name="id2510466"></a><pre class="programlisting">void        (*ItdbUserDataDestroyFunc)      (gpointer userdata);</pre>
+<a class="indexterm" name="id333051"></a><pre class="programlisting">void        (*ItdbUserDataDestroyFunc)      (gpointer userdata);</pre>
 <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>
-<span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></td>
-<td>
 
 
 </td>
@@ -114,9 +194,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2574700"></a><h3>
+<a name="id333095"></a><h3>
 <a name="ItdbUserDataDuplicateFunc"></a>ItdbUserDataDuplicateFunc ()</h3>
-<a class="indexterm" name="id2574711"></a><pre class="programlisting">gpointer    (*ItdbUserDataDuplicateFunc)    (gpointer userdata);</pre>
+<a class="indexterm" name="id333108"></a><pre class="programlisting">gpointer    (*ItdbUserDataDuplicateFunc)    (gpointer userdata);</pre>
 <p>
 
 </p>
@@ -124,15 +204,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
+<td><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></td>
 <td>
-<span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></td>
-<td>
 </td>
 </tr>
 <tr>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
-<td>
 
 
 </td>
@@ -142,9 +220,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2574767"></a><h3>
+<a name="id347091"></a><h3>
 <a name="itdb-new"></a>itdb_new ()</h3>
-<a class="indexterm" name="id2574779"></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="id347101"></a><pre class="programlisting"><a 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>
@@ -154,8 +232,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><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>
 when it's no longer needed
 </td>
@@ -164,9 +241,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2574829"></a><h3>
+<a name="id347144"></a><h3>
 <a name="itdb-free"></a>itdb_free ()</h3>
-<a class="indexterm" name="id2574841"></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="id347154"></a><pre class="programlisting">void        itdb_free                       (<a 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>
@@ -175,8 +252,7 @@
 <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><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>
 </tr></tbody>
@@ -184,9 +260,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2574903"></a><h3>
+<a name="id347209"></a><h3>
 <a name="itdb-parse"></a>itdb_parse ()</h3>
-<a class="indexterm" name="id2574915"></a><pre class="programlisting"><a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>* itdb_parse                   (const gchar *mp,
+<a class="indexterm" name="id347219"></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>
 <p>
 Parse the Itdb_iTunesDB of the iPod located at <em class="parameter"><code>mp</code></em></p>
@@ -197,20 +273,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><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 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
@@ -222,9 +295,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2514955"></a><h3>
+<a name="id347331"></a><h3>
 <a name="itdb-write"></a>itdb_write ()</h3>
-<a class="indexterm" name="id2514967"></a><pre class="programlisting">gboolean    itdb_write                      (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *db,
+<a class="indexterm" name="id347342"></a><pre class="programlisting">gboolean    itdb_write                      (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
                                              GError **error);</pre>
 <p>
 Write out an iTunesDB. It reassigns unique IDs to all tracks. 
@@ -239,20 +312,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></td>
-<td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
+<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><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>
@@ -262,9 +332,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2515065"></a><h3>
+<a name="id347432"></a><h3>
 <a name="itdb-set-mountpoint"></a>itdb_set_mountpoint ()</h3>
-<a class="indexterm" name="id2515077"></a><pre class="programlisting">void        itdb_set_mountpoint             (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id347442"></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>
 <p>
 Sets the mountpoint of <em class="parameter"><code>db</code></em>. Always use this function to set the mountpoint
@@ -278,14 +348,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></td>
 <td> new mount point
 </td>
 </tr>
@@ -294,9 +362,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597709"></a><h3>
+<a name="id347527"></a><h3>
 <a name="itdb-get-mountpoint"></a>itdb_get_mountpoint ()</h3>
-<a class="indexterm" name="id2597720"></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="id347538"></a><pre class="programlisting">const gchar* itdb_get_mountpoint            (<a 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>
@@ -306,14 +374,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -323,9 +389,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597791"></a><h3>
+<a name="id347607"></a><h3>
 <a name="itdb-tracks-number"></a>itdb_tracks_number ()</h3>
-<a class="indexterm" name="id2597803"></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="id347618"></a><pre class="programlisting">guint32     itdb_tracks_number              (<a 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>
@@ -335,14 +401,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> the number of tracks in <em class="parameter"><code>itdb</code></em>
 </td>
 </tr>
@@ -351,9 +415,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597882"></a><h3>
+<a name="id347686"></a><h3>
 <a name="itdb-tracks-number-nontransferred"></a>itdb_tracks_number_nontransferred ()</h3>
-<a class="indexterm" name="id2597896"></a><pre class="programlisting">guint32     itdb_tracks_number_nontransferred
+<a class="indexterm" name="id347696"></a><pre class="programlisting">guint32     itdb_tracks_number_nontransferred
                                             (<a 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>
@@ -364,14 +428,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></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
 is false)
@@ -382,9 +444,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597982"></a><h3>
+<a name="id347772"></a><h3>
 <a name="itdb-playlists-number"></a>itdb_playlists_number ()</h3>
-<a class="indexterm" name="id2597994"></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="id347783"></a><pre class="programlisting">guint32     itdb_playlists_number           (<a 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>
@@ -394,14 +456,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> the number of playlists in <em class="parameter"><code>itdb</code></em> (including the master 
 playlist)
 </td>

Modified: libgpod/trunk/docs/reference/html/libgpod-Time-handling.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Time-handling.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-Time-handling.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,35 +3,36 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Time handling</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch01.html" title="iPod database">
+<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.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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-File-handling-functions.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="u" href="itunesdb.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-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="#id2557423" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id329214" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2594077" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id321635" 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="id2557423"></a><span class="refentrytitle">Time handling</span>
+<a name="id329214"></a><span class="refentrytitle">Time handling</span>
 </h2>
 <p>Time handling &#8212; Helper functions to convert between Epoch time and Mac (iPod) time</p>
 </td>
@@ -49,17 +50,17 @@
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2594077"></a><h2>Description</h2>
+<a name="id321635"></a><h2>Description</h2>
 <p>
-
+The functions provide conversion between Epoch time and Mac (iPod) time
 </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2594093"></a><h2>Details</h2>
+<a name="id321651"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2594104"></a><h3>
+<a name="id321661"></a><h3>
 <a name="itdb-time-get-mac-time"></a>itdb_time_get_mac_time ()</h3>
-<a class="indexterm" name="id2594115"></a><pre class="programlisting">guint64     itdb_time_get_mac_time          (void);</pre>
+<a class="indexterm" name="id321673"></a><pre class="programlisting">guint64     itdb_time_get_mac_time          (void);</pre>
 <p>
 Gets the current time expressed in 'Mac' unit (ie in number of seconds since
 1/1/1904).</p>
@@ -69,8 +70,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><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> current time in 'Mac' unit.
 </td>
 </tr></tbody>
@@ -78,9 +78,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2594156"></a><h3>
+<a name="id316273"></a><h3>
 <a name="itdb-time-mac-to-host"></a>itdb_time_mac_to_host ()</h3>
-<a class="indexterm" name="id2594167"></a><pre class="programlisting">time_t      itdb_time_mac_to_host           (guint64 mactime);</pre>
+<a class="indexterm" name="id316285"></a><pre class="programlisting">time_t      itdb_time_mac_to_host           (guint64 mactime);</pre>
 <p>
 Convert a Mac timestamp to host system time stamp -- modify
 this function if necessary to port to host systems with different
@@ -93,14 +93,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>mactime</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>mactime</code></em>&#160;:</span></td>
 <td> time expressed in 'Mac' unit
 </td>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> timestamp for the host system
 </td>
 </tr>
@@ -109,9 +107,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2589005"></a><h3>
+<a name="id316888"></a><h3>
 <a name="itdb-time-host-to-mac"></a>itdb_time_host_to_mac ()</h3>
-<a class="indexterm" name="id2589016"></a><pre class="programlisting">guint64     itdb_time_host_to_mac           (time_t time);</pre>
+<a class="indexterm" name="id316898"></a><pre class="programlisting">guint64     itdb_time_host_to_mac           (time_t time);</pre>
 <p>
 Convert host system timestamp to Mac time stamp -- modify
 this function if necessary to port to host systems with different
@@ -123,14 +121,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></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><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> a Mac timestamp
 </td>
 </tr>

Modified: libgpod/trunk/docs/reference/html/libgpod-Tracks.html
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod-Tracks.html	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod-Tracks.html	2007-01-25 10:46:30 UTC (rev 168)
@@ -3,35 +3,36 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Tracks</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
 <link rel="start" href="index.html" title="libgpod Reference Manual">
-<link rel="up" href="ch02.html" title="iPod database components">
-<link rel="prev" href="ch02.html" title="iPod database components">
+<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.7 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="ch01.html" title="iPod database">
-<link rel="chapter" href="ch02.html" title="iPod database components">
+<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="ch02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
-<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="ch01.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-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="#id2590973" class="shortcut">Top</a>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id315541" class="shortcut">Top</a>
                   &#160;|&#160;
-                  <a href="#id2579784" class="shortcut">Description</a></nobr></td></tr>
+                  <a href="#id312127" 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="id2590973"></a><span class="refentrytitle">Tracks</span>
+<a name="id315541"></a><span class="refentrytitle">Tracks</span>
 </h2>
 <p>Tracks &#8212; Data structure to store metadata about an iPod track</p>
 </td>
@@ -60,22 +61,27 @@
                                              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);
 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);
 #define     <a href="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">ITDB_RATING_STEP</a>
 </pre>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2579784"></a><h2>Description</h2>
+<a name="id312127"></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="id2579800"></a><h2>Details</h2>
+<a name="id312143"></a><h2>Details</h2>
 <div class="refsect2" lang="en">
-<a name="id2579811"></a><h3>
+<a name="id312154"></a><h3>
 <a name="Itdb-Track"></a>Itdb_Track</h3>
-<a class="indexterm" name="id2579823"></a><pre class="programlisting">typedef struct {
+<a class="indexterm" name="id350431"></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 ":"
@@ -93,6 +99,14 @@
   gchar   *podcastrss;       /* see note for MHOD_ID in itdb_itunesdb.c */
   gchar   *chapterdata;      /* see note for MHOD_ID in itdb_itunesdb.c */
   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 */
+  gchar   *reserved;         /* will probably be used for artistthe     */
+/* ... to here */
   guint32 id;                /* unique ID of track     */
   gint32  size;              /* size of file in bytes  */
   gint32  tracklen;          /* Length of track in ms  */
@@ -179,13 +193,18 @@
 			 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. */  
+			 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 unk156, unk160;
+  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) */
@@ -204,7 +223,9 @@
 			 (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 */
+			 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
@@ -213,17 +234,62 @@
 			   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) */
-  guint32 unk180, unk184;
-  guint32 samplecount;/* Number of samples in the song. First observed
+  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 (not MP3?!?). */
-  guint32 unk192, unk196, unk200;
-  guint32 unk204;     /*  unknown - added in dbversion 0x0c, first
-			  values observed in 0x0d. Observed to be 0x0
-			  or 0x1. */
-  guint32 unk208, unk212, unk216, unk220, unk224;
-  guint32 unk228, unk232, unk236, unk240;
+			 files (for gapless playback). */
+  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 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 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) */
+
     /* 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
@@ -238,9 +304,8 @@
   /* below is for use by application */
   guint64 usertype;
   gpointer userdata;
-  /* function called to duplicate userdata */
+  /* functions called to duplicate/free userdata */
   ItdbUserDataDuplicateFunc userdata_duplicate;
-  /* function called to free userdata */
   ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_Track;
 </pre>
@@ -250,9 +315,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2596057"></a><h3>
+<a name="id316213"></a><h3>
 <a name="itdb-track-new"></a>itdb_track_new ()</h3>
-<a class="indexterm" name="id2559796"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>* itdb_track_new                  (void);</pre>
+<a class="indexterm" name="id334690"></a><pre class="programlisting"><a 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>
 <p>
@@ -261,8 +326,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><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
 longer needed
 </td>
@@ -271,9 +335,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597275"></a><h3>
+<a name="id350582"></a><h3>
 <a name="itdb-track-free"></a>itdb_track_free ()</h3>
-<a class="indexterm" name="id2597288"></a><pre class="programlisting">void        itdb_track_free                 (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id350594"></a><pre class="programlisting">void        itdb_track_free                 (<a 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>
@@ -282,8 +346,7 @@
 <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><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>
 </tr></tbody>
@@ -291,9 +354,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2597348"></a><h3>
+<a name="id350654"></a><h3>
 <a name="itdb-track-add"></a>itdb_track_add ()</h3>
-<a class="indexterm" name="id2597360"></a><pre class="programlisting">void        itdb_track_add                  (<a href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+<a class="indexterm" name="id350666"></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>
 <p>
@@ -308,20 +371,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
 <td> position of the track to add
 </td>
 </tr>
@@ -330,9 +390,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598771"></a><h3>
+<a name="id352865"></a><h3>
 <a name="itdb-track-remove"></a>itdb_track_remove ()</h3>
-<a class="indexterm" name="id2598784"></a><pre class="programlisting">void        itdb_track_remove               (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id352876"></a><pre class="programlisting">void        itdb_track_remove               (<a 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
 memory it uses. It doesn't remove the track from the playlists it may have
@@ -343,8 +403,7 @@
 <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><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>
 </tr></tbody>
@@ -352,9 +411,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2598855"></a><h3>
+<a name="id352938"></a><h3>
 <a name="itdb-track-unlink"></a>itdb_track_unlink ()</h3>
-<a class="indexterm" name="id2598868"></a><pre class="programlisting">void        itdb_track_unlink               (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<a class="indexterm" name="id352948"></a><pre class="programlisting">void        itdb_track_unlink               (<a 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 
@@ -366,8 +425,7 @@
 <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><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>
 </tr></tbody>
@@ -375,9 +433,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603128"></a><h3>
+<a name="id353011"></a><h3>
 <a name="itdb-track-duplicate"></a>itdb_track_duplicate ()</h3>
-<a class="indexterm" name="id2603138"></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="id353021"></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>
 <p>
 Duplicates an existing track</p>
 <p>
@@ -387,14 +445,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
 </tr>
@@ -403,9 +459,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603204"></a><h3>
+<a name="id353086"></a><h3>
 <a name="itdb-track-by-id"></a>itdb_track_by_id ()</h3>
-<a class="indexterm" name="id2603214"></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,
+<a class="indexterm" name="id353097"></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>
 <p>
 Looks up a track using its ID in <em class="parameter"><code>itdb</code></em>. 
@@ -423,20 +479,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></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><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>
@@ -446,9 +499,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603341"></a><h3>
+<a name="id353218"></a><h3>
 <a name="itdb-track-id-tree-create"></a>itdb_track_id_tree_create ()</h3>
-<a class="indexterm" name="id2603352"></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="id353228"></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>
 <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>
@@ -459,14 +512,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<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>
@@ -476,9 +527,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603437"></a><h3>
+<a name="id353310"></a><h3>
 <a name="itdb-track-id-tree-destroy"></a>itdb_track_id_tree_destroy ()</h3>
-<a class="indexterm" name="id2603448"></a><pre class="programlisting">void        itdb_track_id_tree_destroy      (GTree *idtree);</pre>
+<a class="indexterm" name="id353320"></a><pre class="programlisting">void        itdb_track_id_tree_destroy      (GTree *idtree);</pre>
 <p>
 Frees the memory used by <em class="parameter"><code>idtree</code></em></p>
 <p>
@@ -487,8 +538,7 @@
 <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><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></td>
 <td> a <span class="type">GTree</span>
 </td>
 </tr></tbody>
@@ -496,9 +546,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603503"></a><h3>
+<a name="id353374"></a><h3>
 <a name="itdb-track-id-tree-by-id"></a>itdb_track_id_tree_by_id ()</h3>
-<a class="indexterm" name="id2603513"></a><pre class="programlisting"><a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>* itdb_track_id_tree_by_id        (GTree *idtree,
+<a class="indexterm" name="id353384"></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>
 <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
@@ -510,20 +560,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></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><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 
 couldn't be found
 </td>
@@ -533,9 +580,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603630"></a><h3>
+<a name="id353497"></a><h3>
 <a name="itdb-track-set-thumbnails"></a>itdb_track_set_thumbnails ()</h3>
-<a class="indexterm" name="id2603641"></a><pre class="programlisting">gboolean    itdb_track_set_thumbnails       (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+<a class="indexterm" name="id353508"></a><pre class="programlisting">gboolean    itdb_track_set_thumbnails       (<a href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
                                              const gchar *filename);</pre>
 <p>
 Uses the image contained in <em class="parameter"><code>filename</code></em> to generate iPod thumbnails. The image
@@ -549,20 +596,17 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></td>
+<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>
 </tr>
 <tr>
-<td>
-<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
+<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></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><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 <td> TRUE if the thumbnail could be added, FALSE otherwise.
 </td>
 </tr>
@@ -571,9 +615,52 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603740"></a><h3>
+<a name="id353599"></a><h3>
+<a name="itdb-track-set-thumbnails-from-data"></a>itdb_track_set_thumbnails_from_data ()</h3>
+<a class="indexterm" name="id353610"></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>
+<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
+similar function is called.</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>
+</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>
+</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>
+</tr>
+<tr>
+<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
+<td> TRUE if the thumbnail could be added, FALSE otherwise.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id353722"></a><h3>
 <a name="itdb-track-remove-thumbnails"></a>itdb_track_remove_thumbnails ()</h3>
-<a class="indexterm" name="id2603752"></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="id353732"></a><pre class="programlisting">void        itdb_track_remove_thumbnails    (<a 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>
@@ -582,8 +669,7 @@
 <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><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>
 </tr></tbody>
@@ -591,9 +677,9 @@
 </div>
 <hr>
 <div class="refsect2" lang="en">
-<a name="id2603808"></a><h3>
+<a name="id353786"></a><h3>
 <a name="ITDB-RATING-STEP:CAPS"></a>ITDB_RATING_STEP</h3>
-<a class="indexterm" name="id2603818"></a><pre class="programlisting">#define ITDB_RATING_STEP 20
+<a class="indexterm" name="id353796"></a><pre class="programlisting">#define ITDB_RATING_STEP 20
 </pre>
 <p>
 

Modified: libgpod/trunk/docs/reference/html/libgpod.devhelp
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod.devhelp	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod.devhelp	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,17 +2,21 @@
 <!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
 <book xmlns="http://www.devhelp.net/book" title="libgpod Reference Manual" link="index.html" author="Jorg SchulerChristophe Fergeau" name="libgpod">
   <chapters>
-    <sub name="iPod database" link="ch01.html">
+    <sub name="iPod database" link="itunesdb.html">
       <sub name="iPod database reading/writing" link="libgpod-The-Itdb-iTunesDB-structure.html"/>
       <sub name="File handling functions" link="libgpod-File-handling-functions.html"/>
       <sub name="Time handling" link="libgpod-Time-handling.html"/>
       <sub name="Low-level functions" link="libgpod-Low-level-functions.html"/>
+      <sub name="iPod database components" link="ch01.html">
+        <sub name="Tracks" link="libgpod-Tracks.html"/>
+        <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="Device" link="libgpod-Device.html"/>
+      </sub>
     </sub>
-    <sub name="iPod database components" link="ch02.html">
-      <sub name="Tracks" link="libgpod-Tracks.html"/>
-      <sub name="Playlists" link="libgpod-Playlists.html"/>
-      <sub name="Artwork" link="libgpod-Artwork.html"/>
-      <sub name="Device" link="libgpod-Device.html"/>
+    <sub name="Photo database" link="photodb.html">
+      <sub name="Photo database" link="libgpod-Photo-database.html"/>
     </sub>
   </chapters>
   <functions>
@@ -42,8 +46,12 @@
     <function name="itdb_get_music_dir ()" link="libgpod-Low-level-functions.html#itdb-get-music-dir"/>
     <function name="itdb_get_artwork_dir ()" link="libgpod-Low-level-functions.html#itdb-get-artwork-dir"/>
     <function name="itdb_get_device_dir ()" link="libgpod-Low-level-functions.html#itdb-get-device-dir"/>
+    <function name="itdb_get_photos_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-dir"/>
     <function name="itdb_get_itunesdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunesdb-path"/>
+    <function name="itdb_get_itunessd_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunessd-path"/>
     <function name="itdb_get_artworkdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-artworkdb-path"/>
+    <function name="itdb_get_photodb_path ()" link="libgpod-Low-level-functions.html#itdb-get-photodb-path"/>
+    <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"/>
@@ -64,6 +72,7 @@
     <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_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_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails"/>
     <function name="ITDB_RATING_STEP" link="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"/>
     <function name="Itdb_Playlist" link="libgpod-Playlists.html#Itdb-Playlist"/>
@@ -91,6 +100,28 @@
     <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="SPLPref" link="libgpod-Smart-Playlists.html#SPLPref"/>
+    <function name="SPLRule" link="libgpod-Smart-Playlists.html#SPLRule"/>
+    <function name="SPLRules" link="libgpod-Smart-Playlists.html#SPLRules"/>
+    <function name="enum SPLAction" link="libgpod-Smart-Playlists.html#SPLAction"/>
+    <function name="enum SPLFieldType" link="libgpod-Smart-Playlists.html#SPLFieldType"/>
+    <function name="enum SPLActionType" link="libgpod-Smart-Playlists.html#SPLActionType"/>
+    <function name="enum SPLField" link="libgpod-Smart-Playlists.html#SPLField"/>
+    <function name="SPLDATE_IDENTIFIER" link="libgpod-Smart-Playlists.html#SPLDATE-IDENTIFIER:CAPS"/>
+    <function name="SPL_MAXSTRINGLENGTH" link="libgpod-Smart-Playlists.html#SPL-MAXSTRINGLENGTH:CAPS"/>
+    <function name="SPL_STRING_MAXLEN" link="libgpod-Smart-Playlists.html#SPL-STRING-MAXLEN:CAPS"/>
+    <function name="itdb_splr_get_field_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-field-type"/>
+    <function name="itdb_splr_get_action_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-action-type"/>
+    <function name="itdb_splr_validate ()" link="libgpod-Smart-Playlists.html#itdb-splr-validate"/>
+    <function name="itdb_splr_remove ()" link="libgpod-Smart-Playlists.html#itdb-splr-remove"/>
+    <function name="itdb_splr_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-new"/>
+    <function name="itdb_splr_add ()" link="libgpod-Smart-Playlists.html#itdb-splr-add"/>
+    <function name="itdb_splr_add_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-add-new"/>
+    <function name="itdb_spl_copy_rules ()" link="libgpod-Smart-Playlists.html#itdb-spl-copy-rules"/>
+    <function name="itdb_splr_eval ()" link="libgpod-Smart-Playlists.html#itdb-splr-eval"/>
+    <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="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"/>
@@ -98,6 +129,7 @@
     <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_remove_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnail"/>
     <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"/>
@@ -112,7 +144,29 @@
     <function name="itdb_device_set_mountpoint ()" link="libgpod-Device.html#itdb-device-set-mountpoint"/>
     <function name="itdb_device_read_sysinfo ()" link="libgpod-Device.html#itdb-device-read-sysinfo"/>
     <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_device_get_ipod_info ()" link="libgpod-Device.html#itdb-device-get-ipod-info"/>
+    <function name="itdb_info_get_ipod_info_table ()" link="libgpod-Device.html#itdb-info-get-ipod-info-table"/>
+    <function name="itdb_info_get_ipod_generation_string ()" link="libgpod-Device.html#itdb-info-get-ipod-generation-string"/>
+    <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="Itdb_PhotoDB" link="libgpod-Photo-database.html#Itdb-PhotoDB"/>
+    <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_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_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"/>
   </functions>
 </book>

Modified: libgpod/trunk/docs/reference/html/libgpod.devhelp2
===================================================================
--- libgpod/trunk/docs/reference/html/libgpod.devhelp2	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/html/libgpod.devhelp2	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,17 +2,21 @@
 <!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
 <book xmlns="http://www.devhelp.net/book" title="libgpod Reference Manual" link="index.html" author="Jorg SchulerChristophe Fergeau" name="libgpod" version="2">
   <chapters>
-    <sub name="iPod database" link="ch01.html">
+    <sub name="iPod database" link="itunesdb.html">
       <sub name="iPod database reading/writing" link="libgpod-The-Itdb-iTunesDB-structure.html"/>
       <sub name="File handling functions" link="libgpod-File-handling-functions.html"/>
       <sub name="Time handling" link="libgpod-Time-handling.html"/>
       <sub name="Low-level functions" link="libgpod-Low-level-functions.html"/>
+      <sub name="iPod database components" link="ch01.html">
+        <sub name="Tracks" link="libgpod-Tracks.html"/>
+        <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="Device" link="libgpod-Device.html"/>
+      </sub>
     </sub>
-    <sub name="iPod database components" link="ch02.html">
-      <sub name="Tracks" link="libgpod-Tracks.html"/>
-      <sub name="Playlists" link="libgpod-Playlists.html"/>
-      <sub name="Artwork" link="libgpod-Artwork.html"/>
-      <sub name="Device" link="libgpod-Device.html"/>
+    <sub name="Photo database" link="photodb.html">
+      <sub name="Photo database" link="libgpod-Photo-database.html"/>
     </sub>
   </chapters>
   <functions>
@@ -42,8 +46,12 @@
     <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_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"/>
@@ -64,6 +72,7 @@
     <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_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails"/>
     <keyword type="macro" name="ITDB_RATING_STEP" link="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"/>
     <keyword type="struct" name="Itdb_Playlist" link="libgpod-Playlists.html#Itdb-Playlist"/>
@@ -91,6 +100,28 @@
     <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="SPLPref" link="libgpod-Smart-Playlists.html#SPLPref"/>
+    <keyword type="struct" name="SPLRule" link="libgpod-Smart-Playlists.html#SPLRule"/>
+    <keyword type="struct" name="SPLRules" link="libgpod-Smart-Playlists.html#SPLRules"/>
+    <keyword type="enum" name="enum SPLAction" link="libgpod-Smart-Playlists.html#SPLAction"/>
+    <keyword type="enum" name="enum SPLFieldType" link="libgpod-Smart-Playlists.html#SPLFieldType"/>
+    <keyword type="enum" name="enum SPLActionType" link="libgpod-Smart-Playlists.html#SPLActionType"/>
+    <keyword type="enum" name="enum SPLField" link="libgpod-Smart-Playlists.html#SPLField"/>
+    <keyword type="macro" name="SPLDATE_IDENTIFIER" link="libgpod-Smart-Playlists.html#SPLDATE-IDENTIFIER:CAPS"/>
+    <keyword type="macro" name="SPL_MAXSTRINGLENGTH" link="libgpod-Smart-Playlists.html#SPL-MAXSTRINGLENGTH:CAPS"/>
+    <keyword type="macro" name="SPL_STRING_MAXLEN" link="libgpod-Smart-Playlists.html#SPL-STRING-MAXLEN:CAPS"/>
+    <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"/>
+    <keyword type="function" name="itdb_splr_remove ()" link="libgpod-Smart-Playlists.html#itdb-splr-remove"/>
+    <keyword type="function" name="itdb_splr_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-new"/>
+    <keyword type="function" name="itdb_splr_add ()" link="libgpod-Smart-Playlists.html#itdb-splr-add"/>
+    <keyword type="function" name="itdb_splr_add_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-add-new"/>
+    <keyword type="function" name="itdb_spl_copy_rules ()" link="libgpod-Smart-Playlists.html#itdb-spl-copy-rules"/>
+    <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"/>
@@ -98,6 +129,7 @@
     <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_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"/>
@@ -112,7 +144,29 @@
     <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_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="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_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"/>
   </functions>
 </book>

Copied: libgpod/trunk/docs/reference/html/photodb.html (from rev 167, libgpod/branches/upstream/current/docs/reference/html/photodb.html)

Modified: libgpod/trunk/docs/reference/libgpod-docs.xml
===================================================================
--- libgpod/trunk/docs/reference/libgpod-docs.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/libgpod-docs.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -52,24 +52,54 @@
     </legalnotice>
 
     <abstract>
-      <para>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.</para>
+      <para>
+      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.
+      </para>
+      <para>
+      Please see the programs in the <ulink type="http"
+      url="http://gtkpod.cvs.sourceforge.net/gtkpod/libgpod/tests/">tests/</ulink>
+      directory of the source distribution for some usage examples.  A more
+      complete example can be found in the source for <ulink type="http"
+      url="http://www.gtkpod.org"> Gtkpod</ulink>.  You can also ask questions
+      on the developer's mailing list: <ulink
+      url="mailto:gtkpod-devel at lists.sourceforge.net">gtkpod-devel at lists.sourceforge.net</ulink>.
+      </para>
     </abstract>
   </bookinfo>
 
-  <chapter>
+  <part id="itunesdb">
     <title>iPod database</title>
+    <partintro>
+      <para>
+      The iPod database functions are used for adding audio and video
+      to the iPod.
+      </para>
+    </partintro>
+
     <xi:include href="xml/itunesdb-db.xml"/>
     <xi:include href="xml/itunesdb-copying.xml"/>
     <xi:include href="xml/itunesdb-time.xml"/>
     <xi:include href="xml/itunesdb-lowlevel.xml"/>
-  </chapter>
-  <chapter>
-    <title>iPod database components</title>
-    <xi:include href="xml/track.xml"/>
-    <xi:include href="xml/playlists.xml"/>
-    <xi:include href="xml/artwork.xml"/>
-    <xi:include href="xml/device.xml"/>
-  </chapter>
+    <chapter>
+      <title>iPod database components</title>
+      <xi:include href="xml/track.xml"/>
+      <xi:include href="xml/playlists.xml"/>
+      <xi:include href="xml/smart-playlists.xml"/>
+      <xi:include href="xml/artwork.xml"/>
+      <xi:include href="xml/device.xml"/>
+    </chapter>
+  </part>
+
+  <part id="photodb">
+    <title>Photo database</title>
+    <partintro>
+      <para>
+      The Photo database functions are used for adding pictures to
+      the iPod.
+      </para>
+    </partintro>
+    <xi:include href="xml/photodb.xml"/>
+  </part>
 </book>

Modified: libgpod/trunk/docs/reference/libgpod-sections.txt
===================================================================
--- libgpod/trunk/docs/reference/libgpod-sections.txt	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/libgpod-sections.txt	2007-01-25 10:46:30 UTC (rev 168)
@@ -36,8 +36,12 @@
 itdb_get_music_dir
 itdb_get_artwork_dir
 itdb_get_device_dir
+itdb_get_photos_dir
 itdb_get_itunesdb_path
+itdb_get_itunessd_path
 itdb_get_artworkdb_path
+itdb_get_photodb_path
+itdb_get_photos_thumb_dir
 itdb_get_path
 
 itdb_resolve_path
@@ -72,6 +76,7 @@
 itdb_track_id_tree_destroy
 itdb_track_id_tree_by_id
 itdb_track_set_thumbnails
+itdb_track_set_thumbnails_from_data
 itdb_track_remove_thumbnails
 ITDB_RATING_STEP
 </SECTION>
@@ -146,10 +151,17 @@
 itdb_device_set_mountpoint
 itdb_device_read_sysinfo
 itdb_device_get_sysinfo
+itdb_device_set_sysinfo
+itdb_device_write_sysinfo
+itdb_device_get_ipod_info
+itdb_info_get_ipod_info_table
+itdb_info_get_ipod_generation_string
+itdb_info_get_ipod_model_name_string
+itdb_init_ipod
+Itdb_IpodGeneration
+Itdb_IpodInfo
 Itdb_IpodModel
 Itdb_ArtworkFormat
-Itdb_Generation
-Itdb_ModelType
 </SECTION>
 
 <SECTION>
@@ -162,6 +174,7 @@
 itdb_artwork_duplicate
 itdb_artwork_free
 itdb_artwork_add_thumbnail
+itdb_artwork_add_thumbnail_from_data
 itdb_artwork_remove_thumbnail
 itdb_artwork_remove_thumbnails
 itdb_artwork_get_thumb_by_type
@@ -172,9 +185,27 @@
 itdb_thumb_get_filename
 </SECTION>
 
+<SECTION>
+<FILE>photodb</FILE>
+<TITLE>Photo database</TITLE>
+Itdb_PhotoAlbum
+Itdb_PhotoDB
+itdb_photodb_add_photo
+itdb_photodb_add_photo_from_data
+itdb_photodb_create
+itdb_photodb_free
+itdb_photodb_parse
+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>
@@ -247,6 +278,7 @@
 ItdbFileError
 ITDB_FILE_ERROR
 itdb_file_error_quark
+itdb_get_artwork_info_from_type
 
 SPLACTION_LAST_HOURS_VALUE
 SPLACTION_LAST_MINUTES_VALUE

Modified: libgpod/trunk/docs/reference/tmpl/Internal.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/Internal.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/Internal.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -6,7 +6,7 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions won't be documented because you won't be using them. ;)
 </para>
 
 <!-- ##### SECTION See_Also ##### -->

Modified: libgpod/trunk/docs/reference/tmpl/artwork.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/artwork.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/artwork.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,16 +2,18 @@
 Artwork
 
 <!-- ##### SECTION Short_Description ##### -->
-Data structure to store iPod artwork (cover and photos)
+Data structure to store iPod artwork (album covers)
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions and structures are for adding, changing, and removing
+album/track artwork.  For working with photos, see the
+<link linkend="photodb">Photo database</link> section.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
-
+<link linkend="photodb">Photo database</link>
 </para>
 
 <!-- ##### SECTION Stability_Level ##### -->
@@ -23,9 +25,13 @@
 </para>
 
 @thumbnails: 
- at artwork_size: 
 @id: 
+ at unk028: 
+ at rating: 
+ at unk036: 
 @creation_date: 
+ at digitized_date: 
+ at artwork_size: 
 @usertype: 
 @userdata: 
 @userdata_duplicate: 
@@ -40,6 +46,7 @@
 @filename: 
 @image_data: 
 @image_data_len: 
+ at rotation: 
 @offset: 
 @size: 
 @width: 
@@ -92,9 +99,25 @@
 @artwork: 
 @type: 
 @filename: 
+ at rotation: 
+ at error: 
 @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_remove_thumbnail ##### -->
 <para>
 

Modified: libgpod/trunk/docs/reference/tmpl/device.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/device.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/device.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,11 +2,11 @@
 Device
 
 <!-- ##### SECTION Short_Description ##### -->
-Data structure holding information about the iPod (model, mount point, ...)
+Data structure holding information about the iPod (model, mount point, etc.)
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions are for reading and setting information about the iPod.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -72,6 +72,98 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_device_set_sysinfo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at field: 
+ at value: 
+
+
+<!-- ##### FUNCTION itdb_device_write_sysinfo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_get_ipod_info ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_info_get_ipod_info_table ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_info_get_ipod_generation_string ##### -->
+<para>
+
+</para>
+
+ at generation: 
+ at Returns: 
+
+
+<!-- ##### 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: 
+
+
+<!-- ##### ENUM Itdb_IpodGeneration ##### -->
+<para>
+
+</para>
+
+ at ITDB_IPOD_GENERATION_UNKNOWN: 
+ at ITDB_IPOD_GENERATION_FIRST: 
+ at ITDB_IPOD_GENERATION_SECOND: 
+ at ITDB_IPOD_GENERATION_THIRD: 
+ at ITDB_IPOD_GENERATION_FOURTH: 
+ at ITDB_IPOD_GENERATION_FIFTH: 
+ at ITDB_IPOD_GENERATION_SIXTH: 
+ at ITDB_IPOD_GENERATION_MOBILE: 
+
+<!-- ##### STRUCT Itdb_IpodInfo ##### -->
+<para>
+
+</para>
+
+ at model_number: 
+ at capacity: 
+ at ipod_model: 
+ at ipod_generation: 
+ at musicdirs: 
+
 <!-- ##### ENUM Itdb_IpodModel ##### -->
 <para>
 
@@ -109,4 +201,5 @@
 @width: 
 @height: 
 @correlation_id: 
+ at format: 
 

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-copying.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,11 +2,12 @@
 File handling functions
 
 <!-- ##### SECTION Short_Description ##### -->
-Functions to copy new files to the iPod
+Managing files on the iPod
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions are for copying, renaming, and getting 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	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -6,8 +6,89 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions are for creating, reading, writing, and deleting the iPod
+database and getting the total number of tracks and playlists.
 </para>
+<para>
+Overview of using the iPod database:
+</para>
+<para>
+itdb_parse(): read the iTunesDB and ArtworkDB
+</para>
+<para>
+itdb_write(): write the iTunesDB and ArtworkDB
+</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).
+</para>
+<para>
+A number of functions for adding, removing, duplicating tracks
+are available.  Please see
+<link linkend="libgpod-Tracks">Tracks</link> for details.
+</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.
+</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.
+</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.
+</para>
+<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
+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 you 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 Tunes. (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.)
+</para>
+<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.
+</para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
@@ -81,7 +162,7 @@
 
 </para>
 
- at db: 
+ at itdb: 
 @error: 
 @Returns: 
 

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-lowlevel.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -6,7 +6,8 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions are not normally needed but are avalable to allow for finer
+control over the iPod database.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -62,6 +63,15 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_get_photos_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
 <!-- ##### FUNCTION itdb_get_itunesdb_path ##### -->
 <para>
 
@@ -71,6 +81,15 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_get_itunessd_path ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
 <!-- ##### FUNCTION itdb_get_artworkdb_path ##### -->
 <para>
 
@@ -80,6 +99,24 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_get_photodb_path ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_photos_thumb_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
 <!-- ##### FUNCTION itdb_get_path ##### -->
 <para>
 

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-time.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -6,7 +6,7 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+The functions provide conversion between Epoch time and Mac (iPod) time
 </para>
 
 <!-- ##### SECTION See_Also ##### -->

Copied: libgpod/trunk/docs/reference/tmpl/photodb.sgml (from rev 167, libgpod/branches/upstream/current/docs/reference/tmpl/photodb.sgml)

Modified: libgpod/trunk/docs/reference/tmpl/playlists.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/playlists.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/playlists.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -6,7 +6,9 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions and structures allow for adding and removing playlists,
+adding and removing tracks from playlists, sorting playlists, finding tracks in
+a playlist, etc.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -33,12 +35,12 @@
 @is_spl: 
 @timestamp: 
 @id: 
- at mhodcount: 
- at libmhodcount: 
 @sortorder: 
 @podcastflag: 
 @splpref: 
 @splrules: 
+ at reserved1: 
+ at reserved2: 
 @usertype: 
 @userdata: 
 @userdata_duplicate: 

Modified: libgpod/trunk/docs/reference/tmpl/smart-playlists.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/smart-playlists.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/smart-playlists.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -2,16 +2,16 @@
 Smart Playlists
 
 <!-- ##### SECTION Short_Description ##### -->
-Data structures used to manipulate iPod smart playlists
+Data structure to represent an iPod smart playlist
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions and structures are for dealing with smart playlists.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
-
+<link linkend="libgpod-Playlists">Playlists</link>
 </para>
 
 <!-- ##### SECTION Stability_Level ##### -->

Modified: libgpod/trunk/docs/reference/tmpl/track.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/track.sgml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/tmpl/track.sgml	2007-01-25 10:46:30 UTC (rev 168)
@@ -6,7 +6,8 @@
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+These functions and structures are for storing and retrieving
+information about an iPod track.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -38,6 +39,12 @@
 @podcastrss: 
 @chapterdata: 
 @subtitle: 
+ at tvshow: 
+ at tvepisode: 
+ at tvnetwork: 
+ at albumartist: 
+ at keywords: 
+ at reserved: 
 @id: 
 @size: 
 @tracklen: 
@@ -82,8 +89,9 @@
 @unk146: 
 @unk148: 
 @unk152: 
- at unk156: 
- at unk160: 
+ at skipcount: 
+ at recent_skipcount: 
+ at last_skipped: 
 @has_artwork: 
 @skip_when_shuffling: 
 @remember_playback_position: 
@@ -94,21 +102,25 @@
 @mark_unplayed: 
 @unk179: 
 @unk180: 
- at unk184: 
+ at pregap: 
 @samplecount: 
- at unk192: 
 @unk196: 
- at unk200: 
+ at postgap: 
 @unk204: 
- at unk208: 
- at unk212: 
- at unk216: 
+ at mediatype: 
+ at season_nr: 
+ at episode_nr: 
 @unk220: 
 @unk224: 
 @unk228: 
 @unk232: 
 @unk236: 
 @unk240: 
+ at unk244: 
+ at gapless_data: 
+ at unk252: 
+ at gapless_track_flag: 
+ at gapless_album_flag: 
 @chapterdata_raw: 
 @chapterdata_raw_length: 
 @artwork: 
@@ -215,6 +227,17 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_track_set_thumbnails_from_data ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at image_data: 
+ at image_data_len: 
+ at Returns: 
+
+
 <!-- ##### FUNCTION itdb_track_remove_thumbnails ##### -->
 <para>
 

Modified: libgpod/trunk/docs/reference/xml/Internal.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/Internal.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/Internal.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -36,7 +36,7 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions won't be documented because you won't be using them. ;)
 </para>
 </refsect1>
 

Modified: libgpod/trunk/docs/reference/xml/artwork.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/artwork.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/artwork.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -10,7 +10,7 @@
 
 <refnamediv>
 <refname>Artwork</refname>
-<refpurpose>Data structure to store iPod artwork (cover and photos)</refpurpose>
+<refpurpose>Data structure to store iPod artwork (album covers)</refpurpose>
 <!--[<xref linkend="desc" endterm="desc.title"/>]-->
 </refnamediv>
 
@@ -29,7 +29,16 @@
 <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,
-                                             const <link linkend="gchar">gchar</link> *filename);
+                                             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="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="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);
@@ -56,7 +65,9 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions and structures are for adding, changing, and removing
+album/track artwork.  For working with photos, see the
+<link linkend="photodb">Photo database</link> section.
 </para>
 </refsect1>
 
@@ -65,17 +76,25 @@
 <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 artwork_size; /* Size in bytes of the original source image */
-    guint32 id;           /* Artwork id used by photoalbums, starts at
-			   * 0x40... libgpod will set this on sync. */
-    gint32 creation_date; /* Date the image was created */
+    GList *thumbnails;     /* list of Itdb_Thumbs */
+    guint32 id;            /* Artwork id used by photoalbums, starts at
+			    * 0x40... libgpod will set this on sync. */
+    gint32  unk028;
+    guint32 rating;        /* Rating from iPhoto * 20 (PhotoDB only) */
+    gint32  unk036;
+    guint32 creation_date; /* Date the image file was created
+			      (creation date of image file (Mac type,
+			      PhotoDB only) */
+    guint32 digitized_date;/* Date the image was taken (EXIF
+			      information, Mac type, PhotoDB only) */
+    guint32 artwork_size;  /* Size in bytes of the original source
+			      image (PhotoDB only -- don't touch in
+			      case of ArtworkDB!) */
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_Artwork;
 </programlisting>
@@ -86,17 +105,18 @@
 <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 */
+    gchar   *filename;
+    guchar  *image_data;      /* holds the thumbnail data of
+				 non-transfered thumbnails when
+				 filename == NULL */
+    gsize   image_data_len;   /* length of data */
+    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;
+    gint16  width;
+    gint16  height;
+    gint16  horizontal_padding;
+    gint16  vertical_padding;
 } Itdb_Thumb;
 </programlisting>
 <para>
@@ -158,12 +178,19 @@
 <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,
-                                             const <link linkend="gchar">gchar</link> *filename);</programlisting>
+                                             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 
 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>
+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>
+<para>
 
 </para><variablelist role="params">
 <varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
@@ -175,11 +202,63 @@
 <varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
 <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.
+</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 if the thumbnail could be successfully added, FALSE
-otherwise
+otherwise. <parameter>error</parameter> is set appropriately.
 </simpara></listitem></varlistentry>
 </variablelist></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
+                                            (<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.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
+..._CLOCKWISE.</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>
+</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)
+</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.
+</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 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>
@@ -314,5 +393,11 @@
 
 
 
+<refsect1>
+<title>See Also</title>
+<para>
+<link linkend="photodb">Photo database</link>
+</para>
+</refsect1>
 
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/device.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/device.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/device.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -10,7 +10,7 @@
 
 <refnamediv>
 <refname>Device</refname>
-<refpurpose>Data structure holding information about the iPod (model, mount point, ...)</refpurpose>
+<refpurpose>Data structure holding information about the iPod (model, mount point, etc.)</refpurpose>
 <!--[<xref linkend="desc" endterm="desc.title"/>]-->
 </refnamediv>
 
@@ -29,6 +29,25 @@
 <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,
                                              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);
+const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* <link linkend="itdb-info-get-ipod-info-table">itdb_info_get_ipod_info_table</link>
+                                            (void);
+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);
+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>
@@ -45,7 +64,7 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions are for reading and setting information about the iPod.
 </para>
 </refsect1>
 
@@ -145,6 +164,176 @@
 </simpara></listitem></varlistentry>
 </variablelist></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,
+                                             const <link linkend="gchar">gchar</link> *field,
+                                             const <link linkend="gchar">gchar</link> *value);</programlisting>
+<para>
+Set specified field. It can later be written to the iPod using
+itdb_device_read_sysinfo</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>field</parameter>&nbsp;:</term>
+<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).
+</simpara></listitem></varlistentry>
+</variablelist></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,
+                                             <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Fills the SysInfo file with information in device->sysinfo. Note:
+no directories are created if not already existent.</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>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 if file could be read, FALSE otherwise 
+</simpara></listitem></varlistentry>
+</variablelist></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>
+<para>
+Retrieve the <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entry for this iPod</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><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>
+<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>
+<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>
+<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></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>
+
+</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>
+<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>
+<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></refsect2>
+<refsect2>
+<title><anchor id="Itdb-IpodGeneration" role="enum"/>enum Itdb_IpodGeneration</title>
+<indexterm><primary>Itdb_IpodGeneration</primary></indexterm><programlisting>typedef enum {
+    ITDB_IPOD_GENERATION_UNKNOWN,
+    ITDB_IPOD_GENERATION_FIRST,
+    ITDB_IPOD_GENERATION_SECOND,
+    ITDB_IPOD_GENERATION_THIRD,
+    ITDB_IPOD_GENERATION_FOURTH,
+    ITDB_IPOD_GENERATION_FIFTH,
+    ITDB_IPOD_GENERATION_SIXTH,
+    ITDB_IPOD_GENERATION_MOBILE
+} Itdb_IpodGeneration;
+</programlisting>
+<para>
+
+</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;
+} Itdb_IpodInfo;
+</programlisting>
+<para>
+
+</para></refsect2>
+<refsect2>
 <title><anchor id="Itdb-IpodModel" role="enum"/>enum Itdb_IpodModel</title>
 <indexterm><primary>Itdb_IpodModel</primary></indexterm><programlisting>typedef enum {
     ITDB_IPOD_MODEL_INVALID,
@@ -181,6 +370,7 @@
 	gint16 width;
 	gint16 height;
 	gint16 correlation_id;
+        ItdbThumbFormat format;
 } Itdb_ArtworkFormat;
 </programlisting>
 <para>

Modified: libgpod/trunk/docs/reference/xml/itunesdb-copying.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-copying.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/itunesdb-copying.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -10,7 +10,7 @@
 
 <refnamediv>
 <refname>File handling functions</refname>
-<refpurpose>Functions to copy new files to the iPod</refpurpose>
+<refpurpose>Managing files on the iPod</refpurpose>
 <!--[<xref linkend="desc" endterm="desc.title"/>]-->
 </refnamediv>
 
@@ -44,7 +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
 </para>
 </refsect1>
 

Modified: libgpod/trunk/docs/reference/xml/itunesdb-db.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-db.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/itunesdb-db.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -28,7 +28,7 @@
 <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,
                                              <link linkend="GError">GError</link> **error);
-<link linkend="gboolean">gboolean</link>    <link linkend="itdb-write">itdb_write</link>                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *db,
+<link linkend="gboolean">gboolean</link>    <link linkend="itdb-write">itdb_write</link>                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                              <link linkend="GError">GError</link> **error);
 <link linkend="void">void</link>        <link linkend="itdb-set-mountpoint">itdb_set_mountpoint</link>             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                              const <link linkend="gchar">gchar</link> *mp);
@@ -51,8 +51,89 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions are for creating, reading, writing, and deleting the iPod
+database and getting the total number of tracks and playlists.
 </para>
+<para>
+Overview of using the iPod database:
+</para>
+<para>
+<link linkend="itdb-parse"><function>itdb_parse()</function></link>: read the iTunesDB and ArtworkDB
+</para>
+<para>
+<link linkend="itdb-write"><function>itdb_write()</function></link>: write the iTunesDB and ArtworkDB
+</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).
+</para>
+<para>
+A number of functions for adding, removing, duplicating tracks
+are available.  Please see
+<link linkend="libgpod-Tracks">Tracks</link> for details.
+</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.
+</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.
+</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.
+</para>
+<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
+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 you 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 Tunes. (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.)
+</para>
+<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.
+</para>
 </refsect1>
 
 <refsect1 role="details">
@@ -69,9 +150,8 @@
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_iTunesDB;
 </programlisting>
@@ -152,7 +232,7 @@
 </variablelist></refsect2>
 <refsect2>
 <title><anchor id="itdb-write" role="function"/>itdb_write ()</title>
-<indexterm><primary>itdb_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    itdb_write                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *db,
+<indexterm><primary>itdb_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    itdb_write                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
                                              <link linkend="GError">GError</link> **error);</programlisting>
 <para>
 Write out an iTunesDB. It reassigns unique IDs to all tracks. 
@@ -163,8 +243,8 @@
 <para>
 
 </para><variablelist role="params">
-<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
-<listitem><simpara>
+<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

Modified: libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/itunesdb-lowlevel.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -26,8 +26,12 @@
 <link linkend="gchar">gchar</link>*      <link linkend="itdb-get-music-dir">itdb_get_music_dir</link>              (const <link linkend="gchar">gchar</link> *mountpoint);
 <link linkend="gchar">gchar</link>*      <link linkend="itdb-get-artwork-dir">itdb_get_artwork_dir</link>            (const <link linkend="gchar">gchar</link> *mountpoint);
 <link linkend="gchar">gchar</link>*      <link linkend="itdb-get-device-dir">itdb_get_device_dir</link>             (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*      <link linkend="itdb-get-photos-dir">itdb_get_photos_dir</link>             (const <link linkend="gchar">gchar</link> *mountpoint);
 <link linkend="gchar">gchar</link>*      <link linkend="itdb-get-itunesdb-path">itdb_get_itunesdb_path</link>          (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*      <link linkend="itdb-get-itunessd-path">itdb_get_itunessd_path</link>          (const <link linkend="gchar">gchar</link> *mountpoint);
 <link linkend="gchar">gchar</link>*      <link linkend="itdb-get-artworkdb-path">itdb_get_artworkdb_path</link>         (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*      <link linkend="itdb-get-photodb-path">itdb_get_photodb_path</link>           (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*      <link linkend="itdb-get-photos-thumb-dir">itdb_get_photos_thumb_dir</link>       (const <link linkend="gchar">gchar</link> *mountpoint);
 <link linkend="gchar">gchar</link>*      <link linkend="itdb-get-path">itdb_get_path</link>                   (const <link linkend="gchar">gchar</link> *dir,
                                              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,
@@ -60,7 +64,8 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions are not normally needed but are avalable to allow for finer
+control over the iPod database.
 </para>
 </refsect1>
 
@@ -148,6 +153,22 @@
 </simpara></listitem></varlistentry>
 </variablelist></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>
+<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>
+<para>
+
+</para><variablelist role="params">
+<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
+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-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>
 <para>
@@ -163,6 +184,21 @@
 </simpara></listitem></varlistentry>
 </variablelist></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>
+<para>
+Retrieve a path to the iTunesSD</para>
+<para>
+
+</para><variablelist role="params">
+<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 iTunesSD 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-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>
 <para>
@@ -178,6 +214,37 @@
 </simpara></listitem></varlistentry>
 </variablelist></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>
+<para>
+Retrieve a path to the Photo DB</para>
+<para>
+
+</para><variablelist role="params">
+<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 PhotoDB 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-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>
+<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>
+<para>
+
+</para><variablelist role="params">
+<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
+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-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,
                                              const <link linkend="gchar">gchar</link> *file);</programlisting>
@@ -201,6 +268,9 @@
 <indexterm><primary>itdb_resolve_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      itdb_resolve_path               (const <link linkend="gchar">gchar</link> *root,
                                              const <link linkend="gchar">gchar</link> * const *components);</programlisting>
 <para>
+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
 good_path that is case-insensitively equal to c.  If we find d, we
@@ -215,9 +285,7 @@
 <varlistentry><term><parameter>components</parameter>&nbsp;:</term>
 <listitem><simpara> in utf8
 </simpara></listitem></varlistentry>
-<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
-
-
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to track on the iPod or NULL.
 </simpara></listitem></varlistentry>
 </variablelist></refsect2>
 <refsect2>

Modified: libgpod/trunk/docs/reference/xml/itunesdb-time.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/itunesdb-time.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/itunesdb-time.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -38,7 +38,7 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+The functions provide conversion between Epoch time and Mac (iPod) time
 </para>
 </refsect1>
 

Copied: libgpod/trunk/docs/reference/xml/photodb.xml (from rev 167, libgpod/branches/upstream/current/docs/reference/xml/photodb.xml)

Modified: libgpod/trunk/docs/reference/xml/playlists.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/playlists.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/playlists.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -73,7 +73,9 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions and structures allow for adding and removing playlists,
+adding and removing tracks from playlists, sorting playlists, finding tracks in
+a playlist, etc.
 </para>
 </refsect1>
 
@@ -91,34 +93,19 @@
     gint  num;            /* number of tracks in playlist          */
     GList *members;       /* tracks in playlist (Track *)          */
     gboolean is_spl;      /* smart playlist?                       */
-    guint32 timestamp;    /* some timestamp                        */
+    guint32 timestamp;    /* timestamp of playlist creation        */
     guint64 id;           /* playlist ID                           */
-    guint32 mhodcount;    /* This appears to be the number of string
-			     MHODs (type &lt; 50) associated with this
-			     playlist (typically 0x01). Doesn't seem
-			     to be signficant unless you include Type
-			     52 MHODs. libgpod sets this to 1 when
-			     syncing */
-    guint16 libmhodcount; /* The number of Type 52 MHODs associated
-			     with this playlist. If you don't create
-			     Type 52 MHODs, this can be
-			     zero. Otherwise, if you have Type 52
-			     MHODs associated with this playlist and
-			     set this to zero, no songs appear on the
-			     iPod. jcsjcs: with iTunes 4.9 this seems
-			     to be set to 1 even without any Type 52
-			     MHODs present. libgpod sets this to 1
-			     when syncing */
     guint32 sortorder;    /* How to sort playlist -- see below     */
     guint32 podcastflag;  /* ITDB_PL_FLAG_NORM/_PODCAST            */
     SPLPref splpref;      /* smart playlist prefs                  */
     SPLRules splrules;    /* rules for smart playlists             */
+    gpointer reserved1;   /* reserved for MHOD100 implementation   */
+    gpointer reserved2;   /* reserved for MHOD100 implementation   */
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_Playlist;
 </programlisting>

Modified: libgpod/trunk/docs/reference/xml/smart-playlists.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/smart-playlists.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/smart-playlists.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -10,7 +10,7 @@
 
 <refnamediv>
 <refname>Smart Playlists</refname>
-<refpurpose>Data structures used to manipulate iPod smart playlists</refpurpose>
+<refpurpose>Data structure to represent an iPod smart playlist</refpurpose>
 <!--[<xref linkend="desc" endterm="desc.title"/>]-->
 </refnamediv>
 
@@ -63,7 +63,7 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions and structures are for dealing with smart playlists.
 </para>
 </refsect1>
 
@@ -459,5 +459,11 @@
 
 
 
+<refsect1>
+<title>See Also</title>
+<para>
+<link linkend="libgpod-Playlists">Playlists</link>
+</para>
+</refsect1>
 
 </refentry>

Modified: libgpod/trunk/docs/reference/xml/track.xml
===================================================================
--- libgpod/trunk/docs/reference/xml/track.xml	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/docs/reference/xml/track.xml	2007-01-25 10:46:30 UTC (rev 168)
@@ -38,6 +38,10 @@
                                              <link linkend="guint32">guint32</link> id);
 <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,
+                                             const <link linkend="guchar">guchar</link> *image_data,
+                                             <link linkend="gsize">gsize</link> image_data_len);
 <link linkend="void">void</link>        <link linkend="itdb-track-remove-thumbnails">itdb_track_remove_thumbnails</link>    (<link linkend="Itdb-Track">Itdb_Track</link> *track);
 #define     <link linkend="ITDB-RATING-STEP:CAPS">ITDB_RATING_STEP</link>
 </synopsis>
@@ -54,7 +58,8 @@
 <refsect1 role="desc">
 <title role="desc.title">Description</title>
 <para>
-
+These functions and structures are for storing and retrieving
+information about an iPod track.
 </para>
 </refsect1>
 
@@ -80,6 +85,14 @@
   gchar   *podcastrss;       /* see note for MHOD_ID in itdb_itunesdb.c */
   gchar   *chapterdata;      /* see note for MHOD_ID in itdb_itunesdb.c */
   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 */
+  gchar   *reserved;         /* will probably be used for artistthe     */
+/* ... to here */
   guint32 id;                /* unique ID of track     */
   gint32  size;              /* size of file in bytes  */
   gint32  tracklen;          /* Length of track in ms  */
@@ -166,13 +179,18 @@
 			 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. */  
+			 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 unk156, unk160;
+  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) */
@@ -191,7 +209,9 @@
 			 (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 */
+			 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
@@ -200,17 +220,62 @@
 			   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) */
-  guint32 unk180, unk184;
-  guint32 samplecount;/* Number of samples in the song. First observed
+  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 (not MP3?!?). */
-  guint32 unk192, unk196, unk200;
-  guint32 unk204;     /*  unknown - added in dbversion 0x0c, first
-			  values observed in 0x0d. Observed to be 0x0
-			  or 0x1. */
-  guint32 unk208, unk212, unk216, unk220, unk224;
-  guint32 unk228, unk232, unk236, unk240;
+			 files (for gapless playback). */
+  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 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 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) */
+
     /* 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
@@ -225,9 +290,8 @@
   /* below is for use by application */
   guint64 usertype;
   gpointer userdata;
-  /* function called to duplicate userdata */
+  /* functions called to duplicate/free userdata */
   ItdbUserDataDuplicateFunc userdata_duplicate;
-  /* function called to free userdata */
   ItdbUserDataDestroyFunc userdata_destroy;
 } Itdb_Track;
 </programlisting>
@@ -420,6 +484,33 @@
 </simpara></listitem></varlistentry>
 </variablelist></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,
+                                             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
+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>
+</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)
+</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>
+<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>
 <para>

Modified: libgpod/trunk/install-sh
===================================================================
--- libgpod/trunk/install-sh	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/install-sh	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,7 +1,8 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-#
+
+scriptversion=2005-05-14.22
+
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
 # following copyright and license.
@@ -41,13 +42,11 @@
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
 
-
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
 doit="${DOITPROG-}"
 
-
 # put in absolute paths if you don't have them in your path; or use env. vars.
 
 mvprog="${MVPROG-mv}"
@@ -59,236 +58,266 @@
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
 chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
 rmcmd="$rmprog -f"
 mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd=$cpprog
-	    shift
-	    continue;;
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+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.
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
 
-	-s) stripcmd=$stripprog
-	    shift
-	    continue;;
+    -d) dir_arg=true
+        shift
+        continue;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+    --help) echo "$usage"; exit $?;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
 
-if [ x"$src" = x ]
-then
-	echo "$0: no input file specified" >&2
-	exit 1
-else
-	:
-fi
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
 
-	if [ -d "$dst" ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
+    -T) no_target_directory=true
+	shift
+	continue;;
 
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
-	else
-		echo "$0: $src does not exist" >&2
-		exit 1
-	fi
+    --version) echo "$0 $scriptversion"; exit $?;;
 
-	if [ x"$dst" = x ]
-	then
-		echo "$0: no destination specified" >&2
-		exit 1
-	else
-		:
-	fi
+    *)  # 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
+	break;;
+  esac
+done
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d "$dst" ]
-	then
-		dst=$dst/`basename "$src"`
-	else
-		:
-	fi
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
 fi
 
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
 
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-$defaultIFS}"
+    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 '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
 
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
 
-pathcomp=''
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
 
-while [ $# -ne 0 ] ; do
-	pathcomp=$pathcomp$1
-	shift
+    # 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
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
 
-	if [ ! -d "$pathcomp" ] ;
-        then
-		$mkdirprog "$pathcomp"
-	else
-		:
-	fi
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
 
-	pathcomp=$pathcomp/
-done
-fi
+  # Make sure that the destination directory exists.
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd "$dst" &&
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
+    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
 
-# If we're going to rename the final executable, determine the name now.
+    pathcomp=
 
-	if [ x"$transformarg" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		dstfile=`basename "$dst" $transformbasename |
-			sed $transformarg`$transformbasename
-	fi
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      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
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
 
-# don't allow the sed command to completely eliminate the filename
+  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"; }
 
-	if [ x"$dstfile" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		:
-	fi
+  else
+    dstfile=`basename "$dst"`
 
-# Make a couple of temp file names in the proper directory.
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
 
-	dsttmp=$dstdir/_inst.$$_
-	rmtmp=$dstdir/_rm.$$_
+    # 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
 
-# Trap to clean up temp files at exit.
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
 
-	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
-	trap '(exit $?); exit' 1 2 13 15
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # 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"; } &&
 
-# Move or copy the file name to the temp name
+    # 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.
 
-	$doit $instcmd "$src" "$dsttmp" &&
+	   # 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
+	   } &&
 
-# and set any options; do chmod last to preserve setuid bits
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# 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 [ -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
-		}
-	else
-		:
-	fi
-} &&
-
-# Now rename the file to the real destination.
-
-	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-
-fi &&
-
 # The final little trick to "correctly" pass the exit status to the exit trap.
-
 {
-	(exit 0); exit
+  (exit 0); exit 0
 }
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Modified: libgpod/trunk/m4/Makefile.in
===================================================================
--- libgpod/trunk/m4/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/m4/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -21,7 +20,6 @@
 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
@@ -35,7 +33,22 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+subdir = m4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +133,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -178,6 +189,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +216,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -217,22 +231,39 @@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 EXTRA_DIST = python.m4 swig.m4
-subdir = m4
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  m4/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  m4/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
 
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -248,11 +279,7 @@
 ctags: CTAGS
 CTAGS:
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -265,7 +292,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -283,7 +310,6 @@
 check-am: all-am
 check: check-am
 all-am: Makefile
-
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -304,7 +330,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -321,6 +347,8 @@
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
@@ -355,10 +383,10 @@
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-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 \
-	installcheck-am installdirs maintainer-clean \
+	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 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

Copied: libgpod/trunk/m4/gtk-doc.m4 (from rev 167, libgpod/branches/upstream/current/m4/gtk-doc.m4)

Copied: libgpod/trunk/m4/intltool.m4 (from rev 167, libgpod/branches/upstream/current/m4/intltool.m4)

Modified: libgpod/trunk/missing
===================================================================
--- libgpod/trunk/missing	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/missing	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,6 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -15,8 +19,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -38,19 +42,25 @@
   configure_ac=configure.in
 fi
 
+msg="missing on your system"
+
 case "$1" in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
   shift
   "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
   ;;
-esac
 
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
@@ -74,11 +84,15 @@
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
   tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
     ;;
 
   -*)
@@ -87,14 +101,44 @@
     exit 1
     ;;
 
-  aclocal*)
+esac
+
+# 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
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
     fi
+    ;;
+esac
 
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
@@ -102,13 +146,8 @@
     ;;
 
   autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
@@ -116,13 +155,8 @@
     ;;
 
   autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
@@ -140,13 +174,8 @@
     ;;
 
   automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
@@ -156,14 +185,9 @@
     ;;
 
   autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
@@ -185,7 +209,7 @@
 
   bison|yacc)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@
 
   lex|flex)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@
     ;;
 
   help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
 	 you modified a dependency of a manual page.  You may need the
 	 \`Help2man' package in order for those modifications to take
 	 effect.  You can get \`Help2man' from any GNU archive site."
@@ -262,32 +281,30 @@
     ;;
 
   makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
          call might also be the consequence of using a buggy \`make' (AIX,
          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'`
     if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      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
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
     touch $file
     ;;
 
   tar)
     shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
 
     # We have already tried tar in the generic part.
     # Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,8 +340,8 @@
 
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.  Check the \`README' file,
          it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
@@ -334,3 +351,10 @@
 esac
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Modified: libgpod/trunk/mkinstalldirs
===================================================================
--- libgpod/trunk/mkinstalldirs	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/mkinstalldirs	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,21 +1,33 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+
+scriptversion=2005-06-29.22
+
+# Original author: Noah Friedman <friedman at prep.ai.mit.edu>
 # Created: 1993-05-16
-# Public domain
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
 
 errstatus=0
-dirmode=""
+dirmode=
 
 usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
 
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake at gnu.org>."
+
 # process command line arguments
 while test $# -gt 0 ; do
   case $1 in
     -h | --help | --h*)         # -h for help
-      echo "$usage" 1>&2
-      exit 0
+      echo "$usage"
+      exit $?
       ;;
     -m)                         # -m PERM arg
       shift
@@ -23,6 +35,10 @@
       dirmode=$1
       shift
       ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
     --)                         # stop option processing
       shift
       break
@@ -50,30 +66,58 @@
   0) exit 0 ;;
 esac
 
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
 case $dirmode in
   '')
-    if mkdir -p -- . 2>/dev/null; then
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
       echo "mkdir -p -- $*"
       exec 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.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
     fi
     ;;
   *)
-    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
       echo "mkdir -m $dirmode -p -- $*"
       exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
     fi
     ;;
 esac
 
 for file
 do
-  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
   shift
+  IFS=$oIFS
 
-  pathcomp=
   for d
   do
-    pathcomp="$pathcomp$d"
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
     case $pathcomp in
       -*) pathcomp=./$pathcomp ;;
     esac
@@ -84,21 +128,21 @@
       mkdir "$pathcomp" || lasterr=$?
 
       if test ! -d "$pathcomp"; then
-  	errstatus=$lasterr
+	errstatus=$lasterr
       else
-  	if test ! -z "$dirmode"; then
+	if test ! -z "$dirmode"; then
 	  echo "chmod $dirmode $pathcomp"
-    	  lasterr=""
-  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+	  lasterr=
+	  chmod "$dirmode" "$pathcomp" || lasterr=$?
 
-  	  if test ! -z "$lasterr"; then
-  	    errstatus=$lasterr
-  	  fi
-  	fi
+	  if test ! -z "$lasterr"; then
+	    errstatus=$lasterr
+	  fi
+	fi
       fi
     fi
 
-    pathcomp="$pathcomp/"
+    pathcomp=$pathcomp/
   done
 done
 
@@ -107,5 +151,8 @@
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
 # End:
-# mkinstalldirs ends here

Modified: libgpod/trunk/po/de.po
===================================================================
--- libgpod/trunk/po/de.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/de.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: gtkpod 0.52\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
-"PO-Revision-Date: 2005-09-14 22:01+0900\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\n"
+"PO-Revision-Date: 2007-01-15 23:46+0900\n"
 "Last-Translator: Jörg Schuler <jcsjcs at users.sourceforge.net>\n"
 "Language-Team: none\n"
 "MIME-Version: 1.0\n"
@@ -16,205 +16,223 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
-msgstr ""
+msgstr "Unerwarteter mhod3 Stringtyp: %d\n"
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+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"
 
-#: ../src/db-artwork-parser.c:515
+#: ../src/db-artwork-parser.c:291
 #, 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:459
+#, c-format
 msgid "Unexpected mhsd index: %d\n"
-msgstr ""
+msgstr "Unerwarteter mhsd-Index: %d\n"
 
 #: ../src/db-image-parser.c:118
 #, c-format
 msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr ""
+msgstr "Unerwarter Bildtyp in mhni: Größe: %ux%u (%d), Offset: %d\n"
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:198
 #, c-format
+msgid "Could not access file '%s'."
+msgstr "Datei nicht auf Datei zugreifen: '%s'."
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
+msgstr "Artwork-Unterstützung ist nicht in libgpod einkompiliert worden."
+
+#: ../src/itdb_artwork.c:334
+#, c-format
 msgid "Illegal filename: '%s'.\n"
-msgstr ""
+msgstr "Nicht zulässiger Dateiname: '%s'.\n"
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
-msgstr ""
+msgstr "Mountpoint wurde nicht gesetzt.\n"
 
-#: ../src/itdb_artwork.c:387
-#, fuzzy, c-format
+#: ../src/itdb_artwork.c:493
+#, c-format
 msgid "Could not find on iPod: '%s'\n"
-msgstr "Datei nicht gefunden: '%s'."
+msgstr "Nicht auf dem iPod gefunden: '%s'\n"
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive 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_device.c:170
 msgid "Invalid"
-msgstr ""
+msgstr "Ungültig"
 
 #: ../src/itdb_device.c:171 ../src/itdb_device.c:197
 msgid "Unknown"
-msgstr ""
+msgstr "Unbekannt"
 
 #: ../src/itdb_device.c:172
 msgid "Color"
-msgstr ""
+msgstr "Color"
 
 #: ../src/itdb_device.c:173
 msgid "Color U2"
-msgstr ""
+msgstr "Color U2"
 
 #: ../src/itdb_device.c:174
 msgid "Grayscale"
-msgstr ""
+msgstr "Grayscale"
 
 #: ../src/itdb_device.c:175
 msgid "Grayscale U2"
-msgstr ""
+msgstr "Grayscale U2"
 
 #: ../src/itdb_device.c:176
 msgid "Mini (Silver)"
-msgstr ""
+msgstr "Mini (silber)"
 
 #: ../src/itdb_device.c:177
 msgid "Mini (Blue)"
-msgstr ""
+msgstr "Mini (blau)"
 
 #: ../src/itdb_device.c:178
 msgid "Mini (Pink)"
-msgstr ""
+msgstr "Mini (pink)"
 
 #: ../src/itdb_device.c:179
 msgid "Mini (Green)"
-msgstr ""
+msgstr "Mini (grün)"
 
 #: ../src/itdb_device.c:180
 msgid "Mini (Gold)"
-msgstr ""
+msgstr "Mini (gold)"
 
 #: ../src/itdb_device.c:181
 msgid "Shuffle"
-msgstr ""
+msgstr "Shuffle"
 
 #: ../src/itdb_device.c:182
 msgid "Nano (White)"
-msgstr ""
+msgstr "Nano (weiß)"
 
 #: ../src/itdb_device.c:183
 msgid "Nano (Black)"
-msgstr ""
+msgstr "Nano (schwarz)"
 
 #: ../src/itdb_device.c:184
 msgid "Video (White)"
-msgstr ""
+msgstr "Video (weiß)"
 
 #: ../src/itdb_device.c:185
 msgid "Video (Black)"
-msgstr ""
+msgstr "Video (schwarz)"
 
 #: ../src/itdb_device.c:186
 msgid "Mobile (1)"
-msgstr ""
+msgstr "Mobiltelefon (1)"
 
 #: ../src/itdb_device.c:187
 msgid "Video U2"
-msgstr ""
+msgstr "Video U2"
 
 #: ../src/itdb_device.c:188
 msgid "Nano (Silver)"
-msgstr ""
+msgstr "Nano (silber)"
 
+# Nano (blau)
 #: ../src/itdb_device.c:189
 msgid "Nano (Blue)"
-msgstr ""
+msgstr "Nano (blau)"
 
 #: ../src/itdb_device.c:190
 msgid "Nano (Green)"
-msgstr ""
+msgstr "Nano (grün)"
 
 #: ../src/itdb_device.c:191
 msgid "Nano (Pink)"
-msgstr ""
+msgstr "Nano (pink)"
 
 #: ../src/itdb_device.c:198
 msgid "First Generation"
-msgstr ""
+msgstr "Erste Generation"
 
 #: ../src/itdb_device.c:199
 msgid "Second Generation"
-msgstr ""
+msgstr "Zweite Generation"
 
 #: ../src/itdb_device.c:200
 msgid "Third Generation"
-msgstr ""
+msgstr "Dritte Generation"
 
 #: ../src/itdb_device.c:201
 msgid "Fourth Generation"
-msgstr ""
+msgstr "Vierte Generation"
 
 #: ../src/itdb_device.c:202
 msgid "Fifth Generation"
-msgstr ""
+msgstr "Fünfte Generation"
 
 #: ../src/itdb_device.c:203
 msgid "Sixth Generation"
-msgstr ""
+msgstr "Sechste Generation"
 
 #: ../src/itdb_device.c:204
 msgid "Mobile Phone"
-msgstr ""
+msgstr "Mobiltelefon"
 
-#: ../src/itdb_device.c:449
-#, fuzzy, c-format
+#: ../src/itdb_device.c:450
+#, c-format
 msgid "Could not open '%s' for writing."
-msgstr "Fehler beim Öffnen von '%s' zum Schreiben (%s)."
+msgstr "'%s' konnte nicht zum Schreiben geöffnet werden."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
-msgstr ""
+msgstr "Das 'Device'-Verzeichnis existiert nicht."
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, 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:825
+#: ../src/itdb_itunesdb.c:873
 #, 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:840
+#: ../src/itdb_itunesdb.c:888
 #, 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:853
+#: ../src/itdb_itunesdb.c:902
 #, 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)."
 
-#: ../src/itdb_itunesdb.c:931
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:981
+#, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr ""
-"Play Counts Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<12)."
+"iTunesStats Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1250
+#: ../src/itdb_itunesdb.c:1300
 #, 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:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -223,12 +241,12 @@
 "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:1439
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1494
+#, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
-msgstr "iTunesDB beschädigt: kein MHOD bei Offset %ld in Datei '%s'."
+msgstr "iTunesDB beschädigt: kein SLst-Eintrag bei Offset %ld in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:1452
+#: ../src/itdb_itunesdb.c:1507
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -238,98 +256,108 @@
 "versucht fortzufahren.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, 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'."
 
-#: ../src/itdb_itunesdb.c:1527
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1590
+#, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
-msgstr "iTunesDB beschädigt: kein MHOD bei Offset %ld in Datei '%s'."
+msgstr ""
+"iTunesDB beschädigt: kein '%s'-Eintrag in Sektion '%s' (startend bei %ld) "
+"gefunden."
 
-#: ../src/itdb_itunesdb.c:1541
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1604
+#, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
 "'%s'."
 msgstr ""
-"iTunesDB ('%s'): Headerlänge des mhsd-Hunks is kleiner als erwartet (%"
-"ld<32). Breche ab."
+"Header-Länge des Abschnitts '%s' ist kleiner als erwartet (%d < %d) an "
+"Offset %ld in Datei '%s'."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "Keine iTunesDB Datei: '%s' (kein mhdb-Header)."
 
-#: ../src/itdb_itunesdb.c:1643
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1706
+#, 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 (%"
-"ld<32). Breche ab."
+"iTunesDB ('%s'): Headerlänge des mhsd-Hunks is kleiner als erwartet (%d<32). "
+"Breche ab."
 
-#: ../src/itdb_itunesdb.c:1664
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1727
+#, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
-msgstr "iTunesDB beschädigt: mhyp bei Offset %ld in Datei '%s' gefunden."
+msgstr ""
+"Die iTunesDB '%s' ist beschädigt: bei Offset %ld wird ein mhsd-Abschnitt "
+"erwartet."
 
-#: ../src/itdb_itunesdb.c:1781
+#: ../src/itdb_itunesdb.c:1844
 #, 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."
 
-#: ../src/itdb_itunesdb.c:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "Itdb_Track ID '%d' nicht gefunden.\n"
 
-#: ../src/itdb_itunesdb.c:1956
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2024
+#, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
-msgstr "iTunesDB beschädigt: mhyp bei Offset %ld in Datei '%s' gefunden."
+msgstr ""
+"Anzahl der MHOD-Abschnitte in der mhyp-Sektion bei Offset %ld in der Datei '%"
+"s' ist inkonsistent."
 
-#: ../src/itdb_itunesdb.c:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr "Haupt-PL"
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
-msgstr ""
+msgstr "Podcasts"
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "Wiedergabeliste"
 
-#: ../src/itdb_itunesdb.c:1994
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2062
+#, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
 "ld in file '%s'."
-msgstr "iTunesDB beschädigt: mhyp bei Offset %ld in Datei '%s' gefunden."
+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:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "OTG-Wiedergabeliste"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, 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:2311
+#: ../src/itdb_itunesdb.c:2407
 #, 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)."
 
-#: ../src/itdb_itunesdb.c:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file file ('%s'): entry length smaller than expected (%d<4)."
@@ -337,30 +365,29 @@
 "OTG (On-The-Go) Wiedergabelistendatei ('%s'): Länge der Einträge kleiner als "
 "erwartet (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, 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)."
 
-#: ../src/itdb_itunesdb.c:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "OTG-Wiedergabeliste %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
-#, fuzzy
+#: ../src/itdb_itunesdb.c:2567
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
 msgstr ""
-"iTunesDB möglicherweise beschädigt: Anzahl der Stücke (mhit-Hunks) ist nicht "
+"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:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -368,123 +395,169 @@
 "iTunesDB möglicherweise beschädigt: Anzahl der Wiedergabelisten (mhyp-Hunks) "
 "ist nicht konsistent. Versuche fortzufahren.\n"
 
-#: ../src/itdb_itunesdb.c:2581
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2677
+#, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
 "found)"
 msgstr ""
-"iTunesDB '%s' beschädigt: bereits zwei Wiedergabelisten mhsds-Hunks "
-"gefunden. Breche ab."
+"Die iTunesDB '%s' ist beschädigt: die Trackliste konnte nicht gefunden "
+"werden (kein mhsd-Abschnitt des Typs 1 gefunden)."
 
-#: ../src/itdb_itunesdb.c:2610
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2706
+#, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
 "sections found)"
 msgstr ""
-"iTunesDB '%s' beschädigt: bereits zwei Wiedergabelisten mhsds-Hunks "
-"gefunden. Breche ab."
+"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:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr ""
+"Das 'iTunes'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr ""
+"Das 'Music'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr ""
+"Das 'Control'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Datei nicht gefunden: '%s'."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
 msgstr "Schreiben eines mhod-Hunks vom Typ %d ist nicht unterstützt.\n"
 
-#: ../src/itdb_itunesdb.c:4098
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4245
+#, c-format
 msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Öffnen der Datei '%s' zum Schreiben ist fehlgeschlagen."
+msgstr "Öffnen der Datei '%s' zum Schreiben ist fehlgeschlagen (%s)."
 
-#: ../src/itdb_itunesdb.c:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
 msgstr "Schreiben in die Datei '%s' ist fehlgeschlagen (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4617
+#, c-format
 msgid "Path not found: '%s' (or similar)."
-msgstr "Pfad nicht gefunden: '%s'."
+msgstr "Pfad nicht gefunden: '%s' (oder ähnlich)."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Fehler beim Umbenennen von '%s' nach '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Fehler beim Entfernen von '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "No 'F..' directories were found in '%s'."
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Pfad nicht gefunden: '%s'."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Fehler beim Öffnen von '%s' zum Lesen (%s)."
 
-#: ../src/itdb_itunesdb.c:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Fehler beim Öffnen von '%s' zum Schreiben (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Fehler beim Lesen aus '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Fehler beim Schreiben in die Datei '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Fehler beim Schließen der Datei '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
-msgstr ""
+msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr ""
+"Problem beim Erstellen eines Verzeichnisses oder einer Datei auf dem iPod: '%"
+"s'."
 
-#: ../src/itdb_photoalbum.c:25
-#, fuzzy, c-format
+#: ../src/itdb_photoalbum.c:107
+#, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr "Pfad nicht gefunden: '%s'."
+msgstr ""
+"Der Pfad zum Fotoverzeichnis konnte nicht gefunden werden: '%s' (oder "
+"ähnlich)."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr "Fotoarchiv"
+
+#: ../src/itdb_photoalbum.c:357
+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."
+
+#: ../src/itdb_photoalbum.c:378
+#, 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)."
+
+#: ../src/itdb_photoalbum.c:390
+#, 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:430
+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:450
+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:78
 #, c-format
@@ -492,64 +565,145 @@
 msgstr ""
 "Unbekannte Aktion (%d) in intelligenter Wiedergabeliste wird ignoriert.\n"
 
-#: ../tests/test-photos.c:116
-msgid "Usage to add photos:\n"
+#: ../tests/test-photos.c:39
+#, 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 ""
+"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:117
+#: ../tests/test-photos.c:40
 #, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
 msgstr ""
+"Syntax, um alle vorhandenen Fotos nach <Verzeichnis> zu kopieren:\n"
+"  %s dump <mountpoint> <Verzeichnis>\n"
 
-#: ../tests/test-photos.c:118
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
+"Syntax,  um eine Liste der IDs aller vorhandenen Fotos auszugeben:\n"
+"  %s list <mountpoint>\n"
 
-#: ../tests/test-photos.c:119
-msgid "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
+"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"
+"  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:120
-msgid "Usage to dump all photos to <output_dir>:\n"
-msgstr ""
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
+msgstr "Falsche Anzahl an Kommandozeilenargumenten.\n"
 
-#: ../tests/test-photos.c:121
+#: ../tests/test-photos.c:135
 #, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr ""
-
-#: ../tests/test-photos.c:133
-#, fuzzy, c-format
 msgid "Error creating '%s' (mkdir)\n"
-msgstr "Fehler beim Entfernen von '%s' (%s)."
+msgstr "Fehler beim Erstellen von '%s' (mkdir).\n"
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
-msgstr ""
+msgstr "Fehler: '%s' ist kein Verzeichnis\n"
 
-#: ../tests/test-photos.c:148
-#, fuzzy, c-format
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database (%s).\n"
-msgstr "Fehler beim Umbenennen von '%s' nach '%s' (%s)."
+msgstr "Fehler beim Lesen des iPod Fotobarchivs (%s).\n"
 
-#: ../tests/test-photos.c:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 msgid "Error reading iPod photo database.\n"
-msgstr ""
+msgstr "Fehler beim Lesen der iPod Fotodatenbank.\n"
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
+#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Unzureichende Anzahl von Kommandozeilenargumenten.\n"
+
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr "<Unbenannt>"
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
+msgstr "<Keine Einträge>\n"
+
+#: ../tests/test-photos.c:243
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
 "Will attempt to create a new database.\n"
 msgstr ""
+"Fehler beim Lesen der iPod Fotobibliothek (%s).\n"
+"Es wird versucht, eine neue Datenbank zu erstellen.\n"
 
-#: ../tests/test-photos.c:174
+#: ../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:274
+#, 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:320
+msgid "Error reading iPod photo database"
+msgstr "Fehler beim Lesen des iPod Fotoarchivs"
+
+#: ../tests/test-photos.c:331
+#, 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
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+"Es ist nicht möglich, die 'Fotoarchiv'-Wiedergabeliste zu entfernen. Breche "
+"ab.\n"
+
+#: ../tests/test-photos.c:364
+#, 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"
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Unbekanntes Kommando: '%s'\n"
+
 #~ msgid "Writing to '%s' failed."
 #~ msgstr "Fehler beim Schreiben in die Datei '%s'."
 

Modified: libgpod/trunk/po/es.po
===================================================================
--- libgpod/trunk/po/es.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/es.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,37 +1,44 @@
-# translation of es.po to 
-# translation of gtkpod.po to Spanish
+# translation of libgpod.po to
+# translation of es.po to
 # This file is distributed under the same license as the gtkpod package.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
-# Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>, 2006.
 #
 #
+# Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>, 2006, 2007.
 msgid ""
 msgstr ""
-"Project-Id-Version: es\n"
+"Project-Id-Version: libgpod\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
-"PO-Revision-Date: 2006-07-29 22:01+0200\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\n"
+"PO-Revision-Date: 2007-01-15 01:20+0900\n"
 "Last-Translator: Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>\n"
 "Language-Team:  <es_ES>\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: KBabel 1.11.4\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
 msgstr "Tipo de cadena mhod3 no esperado: %d\n"
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+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:291
+#, 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)"
+"= %d)\n"
 
-#: ../src/db-artwork-parser.c:515
+#: ../src/db-artwork-parser.c:459
 #, c-format
 msgid "Unexpected mhsd index: %d\n"
 msgstr "Índice mhsd no esperado: %d\n"
@@ -42,21 +49,30 @@
 msgstr ""
 "Tipo de imágen en mhni no esperado: tamaño: %ux%u (%d), desplazamiento: %d\n"
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:198
 #, c-format
+msgid "Could not access file '%s'."
+msgstr "No se ha podido acceder al fichero '%s'"
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
+msgstr "libgpod compilado sin soporte de carátulas."
+
+#: ../src/itdb_artwork.c:334
+#, c-format
 msgid "Illegal filename: '%s'.\n"
 msgstr "Nombre de fichero no válido: '%s'.\n"
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
 msgstr "Punto de montaje no configurado.\n"
 
-#: ../src/itdb_artwork.c:387
+#: ../src/itdb_artwork.c:493
 #, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Fichero no encontrado en el iPod: '%s'\n"
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive thumbnail (appears to be on iPod, but no image info "
@@ -135,27 +151,23 @@
 
 #: ../src/itdb_device.c:187
 msgid "Video U2"
-msgstr ""
+msgstr "Video U2"
 
 #: ../src/itdb_device.c:188
-#, fuzzy
 msgid "Nano (Silver)"
-msgstr "Mini (Plata)"
+msgstr "Nano (Plata)"
 
 #: ../src/itdb_device.c:189
-#, fuzzy
 msgid "Nano (Blue)"
-msgstr "Nano (Negro)"
+msgstr "Nano (Azul)"
 
 #: ../src/itdb_device.c:190
-#, fuzzy
 msgid "Nano (Green)"
-msgstr "Mini (Verde)"
+msgstr "Nano (Verde)"
 
 #: ../src/itdb_device.c:191
-#, fuzzy
 msgid "Nano (Pink)"
-msgstr "Mini (Rosa)"
+msgstr "Nano (Rosa)"
 
 #: ../src/itdb_device.c:198
 msgid "First Generation"
@@ -178,61 +190,60 @@
 msgstr "Quinta generación"
 
 #: ../src/itdb_device.c:203
-#, fuzzy
 msgid "Sixth Generation"
-msgstr "Quinta generación"
+msgstr "Sexta generación"
 
 #: ../src/itdb_device.c:204
 msgid "Mobile Phone"
 msgstr "Teléfono móvil"
 
-#: ../src/itdb_device.c:449
+#: ../src/itdb_device.c:450
 #, c-format
 msgid "Could not open '%s' for writing."
 msgstr "Error al abrir '%s' para su escritura."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
 msgstr "No existe el directorio del dispositivo."
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, 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:825
+#: ../src/itdb_itunesdb.c:873
 #, 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:840
+#: ../src/itdb_itunesdb.c:888
 #, 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:853
+#: ../src/itdb_itunesdb.c:902
 #, 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:931
+#: ../src/itdb_itunesdb.c:981
 #, 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:1250
+#: ../src/itdb_itunesdb.c:1300
 #, 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'."
 
-#: ../src/itdb_itunesdb.c:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -241,13 +252,13 @@
 "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:1439
+#: ../src/itdb_itunesdb.c:1494
 #, 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'."
 
-#: ../src/itdb_itunesdb.c:1452
+#: ../src/itdb_itunesdb.c:1507
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -257,12 +268,12 @@
 "Ignorando.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, 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:1527
+#: ../src/itdb_itunesdb.c:1590
 #, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
@@ -270,7 +281,7 @@
 "iTunesDB corrupta: no se ha encontrado la sección '%s' en la sección '%s' "
 "empezando en %ld."
 
-#: ../src/itdb_itunesdb.c:1541
+#: ../src/itdb_itunesdb.c:1604
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -279,12 +290,12 @@
 "Tamaño de la cabecera de '%s' menor del esperado (%d<%d). en el "
 "desplazamiento %ld del fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, 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:1643
+#: ../src/itdb_itunesdb.c:1706
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -293,41 +304,41 @@
 "iTunesDB ('%s'): tamaño de la cabecera de la zona mhsd menor del esperado (%"
 "d<32). Cancelando."
 
-#: ../src/itdb_itunesdb.c:1664
+#: ../src/itdb_itunesdb.c:1727
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunesDB '%s' corrupta: se esperaba mhsd en %ld."
 
-#: ../src/itdb_itunesdb.c:1781
+#: ../src/itdb_itunesdb.c:1844
 #, 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'."
 
-#: ../src/itdb_itunesdb.c:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "Itdb_Track ID '%d' no encontrada.\n"
 
-#: ../src/itdb_itunesdb.c:1956
+#: ../src/itdb_itunesdb.c:2024
 #, 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'."
 
-#: ../src/itdb_itunesdb.c:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr "Lista de reproducción principal"
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
 msgstr "Podcasts"
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "Lista de reproducción"
 
-#: ../src/itdb_itunesdb.c:1994
+#: ../src/itdb_itunesdb.c:2062
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
@@ -336,23 +347,23 @@
 "iTunesDB corrupta: el número de secciones mhip no es consistente en mhyp "
 "empezando en %ld en el fichero '%s'."
 
-#: ../src/itdb_itunesdb.c:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "Lista de reproducción OTG"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, 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:2311
+#: ../src/itdb_itunesdb.c:2407
 #, 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:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file file ('%s'): entry length smaller than expected (%d<4)."
@@ -360,20 +371,20 @@
 "Fichero de lista de reproducción OTG ('%s'): tamaño de la entrada menor del "
 "esperado (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, 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:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "Lista de reproducción OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
+#: ../src/itdb_itunesdb.c:2567
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
@@ -382,7 +393,7 @@
 "Intentando continuar.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -390,7 +401,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:2581
+#: ../src/itdb_itunesdb.c:2677
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
@@ -399,7 +410,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:2610
+#: ../src/itdb_itunesdb.c:2706
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
@@ -408,105 +419,142 @@
 "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:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "Directorio 'iTunes' no encontrado: '%s' (o similar)."
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Directorio 'Music' no encontrado: '%s' (o similar)"
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Directorio 'iPod Control' no encontrado: '%s' (o similar)."
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Fichero no encontrado: '%s'."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
 msgstr "No se puede escribir el mhod de tipo %d\n"
 
-#: ../src/itdb_itunesdb.c:4098
+#: ../src/itdb_itunesdb.c:4245
 #, 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:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
 msgstr "No se ha podido escribir '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
+#: ../src/itdb_itunesdb.c:4617
 #, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Ruta no encontrada: '%s' (o similar)."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Error al renombrar '%s' a '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Error al borrar '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "No se ha encontrado ningún directorio en '%s'."
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Ruta no encontrada: '%s'."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Error al abrir '%s' para su lectura (%s)."
 
-#: ../src/itdb_itunesdb.c:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Error al abrir '%s' para su escritura (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Error durante la lectura de '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Error durante la escritura de '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Error al cerrar '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
 msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, 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:25
+#: ../src/itdb_photoalbum.c:107
 #, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "Directorio 'Photos' no encontrado: '%s' (o similar)."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr "Biblioteca de fotos"
+
+#: ../src/itdb_photoalbum.c:357
+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."
+
+#: ../src/itdb_photoalbum.c:378
+#, 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 ""
+"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:390
+#, 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:430
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Error inesperado en  itdb_photodb_add_photo_internal() mientras se añadía la "
+"foto. Informe, por favor."
+
+#: ../src/itdb_photoalbum.c:450
+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:78
 #, c-format
@@ -515,55 +563,98 @@
 "Acción desconocida (%d) en la lista de reproducción inteligente. Será "
 "ignorada.\n"
 
-#: ../tests/test-photos.c:116
-msgid "Usage to add photos:\n"
-msgstr "Uso para añadir fotos:\n"
+#: ../tests/test-photos.c:39
+#, 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 ""
+"Uso para añadir fotos:\n"
+"  %s add <punto_de_montaje> <nombre_de_álbum> [<nombre_de_fichero(s)>]\n"
+"  Para añadir fotos al álbum maestro de fotos, debe ponerse "
+"<nombre_de_álbum> como 'NULL' \n"
+"  (Sólo para la biblioteca de fotos). Si no se especifica ningún nombre, se "
+"creará\n"
+" un álbum vacío.\n"
 
-#: ../tests/test-photos.c:117
+#: ../tests/test-photos.c:40
 #, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
-msgstr "%s <punto de montaje> <nombre del álbum> <fichero(s)>\n"
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Uso para volcar todas las fotos a <directorio_de_salida>:\n"
+"  %s dump <punto_de_montaje> <directorio_de_salida>\n"
 
-#: ../tests/test-photos.c:118
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
-"'Nombre del álbum' debe marcarse como 'maestro' para añadir fotos al álbum "
-"de fotos maestro\n"
+"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:119
-msgid "\n"
-msgstr "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
+"Uso para borrar IDs de fotos de la biblioteca de fotos:\n"
+"  %s remove <punto_de_montaje> <nombre_de_álbum> [<ID(s)>]\n"
+"  Para borrar las fotos también del iPod, debe ponerse <nombre_de_álbum> "
+"como 'NULL'.\n"
+"  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:120
-msgid "Usage to dump all photos to <output_dir>:\n"
-msgstr "Uso para volcar todas las fotos a <directorio de salida>:\n"
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
+msgstr "Número de argumentos incorrecto.\n"
 
-#: ../tests/test-photos.c:121
+#: ../tests/test-photos.c:135
 #, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr "%s volcar <punto de montaje> <directorio de salida>\n"
-
-#: ../tests/test-photos.c:133
-#, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Error al crear '%s' (mkdir)\n"
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr "Error: '%s' no es un directorio\n"
 
-#: ../tests/test-photos.c:148
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
 #, 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:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 msgid "Error reading iPod photo database.\n"
 msgstr "Error al leer la base de datos de fotos del iPod.\n"
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
+#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Número de argumentos insuficiente.\n"
+
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr "<Sin nombre>"
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
+msgstr "<No miembros>\n"
+
+#: ../tests/test-photos.c:243
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
@@ -572,9 +663,39 @@
 "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:174
+#: ../tests/test-photos.c:249
 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
+#, 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:320
+msgid "Error reading iPod photo database"
+msgstr "Error al leer la base de datos de fotos del iPod"
+
+#: ../tests/test-photos.c:331
+#, 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
+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
+#, fuzzy, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "Error: no se puede encontrar la foto con ID <%d>. Ignorando...\n"
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Comando desconocido '%s'\n"

Modified: libgpod/trunk/po/fr.po
===================================================================
--- libgpod/trunk/po/fr.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/fr.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,16 +1,16 @@
 # French language translation for gtkpod 
-# Copyright (C) 2005 Éric Lassauge
-# Éric Lassauge <lassauge at users.sf.net>, 2005.
+# Copyright (C) 2005-2006 Éric Lassauge
+# Éric Lassauge <lassauge at users.sf.net>, 2006.
 # Copyright (C) 2003 David Le Brun
 # David Le Brun <david at dyn-ns.net>, 2003.
 #
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gtkpod 0.94\n"
+"Project-Id-Version: libgpod-0.4.0Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
-"PO-Revision-Date: 2005-09-14 21:46+0900\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\n"
+"PO-Revision-Date: 2006-12-05 11:35+01000\n"
 "Last-Translator: Éric Lassauge <lassauge at users.sf.net>\n"
 "Language-Team: FR\n"
 "MIME-Version: 1.0\n"
@@ -18,209 +18,226 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n>1;\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
-msgstr ""
+msgstr "Type de chaîne mhod3 inattendu : %d\n"
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr ""
 
-#: ../src/db-artwork-parser.c:515
+#: ../src/db-artwork-parser.c:291
+#, fuzzy, 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)"
+
+#: ../src/db-artwork-parser.c:459
 #, c-format
 msgid "Unexpected mhsd index: %d\n"
-msgstr ""
+msgstr "Index mhsd inattendu : %d\n"
 
 #: ../src/db-image-parser.c:118
 #, 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"
+
+#: ../src/itdb_artwork.c:198
+#, fuzzy, c-format
+msgid "Could not access file '%s'."
+msgstr "Impossible de trouver sur le iPod : «%s»\n"
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
 msgstr ""
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:334
 #, c-format
 msgid "Illegal filename: '%s'.\n"
-msgstr ""
+msgstr "Nom de fichier illégal : «%s».\n"
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
-msgstr ""
+msgstr "Point de montage non défini.\n"
 
-#: ../src/itdb_artwork.c:387
-#, fuzzy, c-format
+#: ../src/itdb_artwork.c:493
+#, c-format
 msgid "Could not find on iPod: '%s'\n"
-msgstr "Fichier introuvable : «%s»."
+msgstr "Impossible de trouver sur le iPod : «%s»\n"
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive thumbnail (appears to be on iPod, but no image info "
 "available): type: %d, 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"
 
 #: ../src/itdb_device.c:170
 msgid "Invalid"
-msgstr ""
+msgstr "Invalide"
 
 #: ../src/itdb_device.c:171 ../src/itdb_device.c:197
 msgid "Unknown"
-msgstr ""
+msgstr "Inconnu"
 
 #: ../src/itdb_device.c:172
 msgid "Color"
-msgstr ""
+msgstr "Couleur"
 
 #: ../src/itdb_device.c:173
 msgid "Color U2"
-msgstr ""
+msgstr "U2 Couleur"
 
 #: ../src/itdb_device.c:174
 msgid "Grayscale"
-msgstr ""
+msgstr "Niveaux de gris"
 
 #: ../src/itdb_device.c:175
 msgid "Grayscale U2"
-msgstr ""
+msgstr "U2 niveaux de gris"
 
 #: ../src/itdb_device.c:176
 msgid "Mini (Silver)"
-msgstr ""
+msgstr "Mini (Argent)"
 
 #: ../src/itdb_device.c:177
 msgid "Mini (Blue)"
-msgstr ""
+msgstr "Mini (Bleu)"
 
 #: ../src/itdb_device.c:178
 msgid "Mini (Pink)"
-msgstr ""
+msgstr "Mini (Rose)"
 
 #: ../src/itdb_device.c:179
 msgid "Mini (Green)"
-msgstr ""
+msgstr "Mini (Vert)"
 
 #: ../src/itdb_device.c:180
 msgid "Mini (Gold)"
-msgstr ""
+msgstr "Mini (Or)"
 
 #: ../src/itdb_device.c:181
 msgid "Shuffle"
-msgstr ""
+msgstr "Shuffle"
 
 #: ../src/itdb_device.c:182
 msgid "Nano (White)"
-msgstr ""
+msgstr "Nano (Blanc)"
 
 #: ../src/itdb_device.c:183
 msgid "Nano (Black)"
-msgstr ""
+msgstr "Nano (Noir)"
 
 #: ../src/itdb_device.c:184
 msgid "Video (White)"
-msgstr ""
+msgstr "Vidéo (Blanc)"
 
 #: ../src/itdb_device.c:185
 msgid "Video (Black)"
-msgstr ""
+msgstr "Vidéo (Noir)"
 
 #: ../src/itdb_device.c:186
 msgid "Mobile (1)"
-msgstr ""
+msgstr "Mobile (1)"
 
 #: ../src/itdb_device.c:187
 msgid "Video U2"
-msgstr ""
+msgstr "U2 Vidéo"
 
 #: ../src/itdb_device.c:188
 msgid "Nano (Silver)"
-msgstr ""
+msgstr "Nano (Argent)"
 
 #: ../src/itdb_device.c:189
 msgid "Nano (Blue)"
-msgstr ""
+msgstr "Nano (Bleu)"
 
 #: ../src/itdb_device.c:190
 msgid "Nano (Green)"
-msgstr ""
+msgstr "Nano (Vert)"
 
 #: ../src/itdb_device.c:191
 msgid "Nano (Pink)"
-msgstr ""
+msgstr "Nano (Rose)"
 
 #: ../src/itdb_device.c:198
 msgid "First Generation"
-msgstr ""
+msgstr "Premiére Génération"
 
 #: ../src/itdb_device.c:199
 msgid "Second Generation"
-msgstr ""
+msgstr "Seconde Génération"
 
 #: ../src/itdb_device.c:200
 msgid "Third Generation"
-msgstr ""
+msgstr "Troisième Génération"
 
 #: ../src/itdb_device.c:201
 msgid "Fourth Generation"
-msgstr ""
+msgstr "Quatrième Génération"
 
 #: ../src/itdb_device.c:202
 msgid "Fifth Generation"
-msgstr ""
+msgstr "Cinquième Génération"
 
 #: ../src/itdb_device.c:203
 msgid "Sixth Generation"
-msgstr ""
+msgstr "Sixième Génération"
 
 #: ../src/itdb_device.c:204
 msgid "Mobile Phone"
-msgstr ""
+msgstr "Téléphone Mobile"
 
-#: ../src/itdb_device.c:449
-#, fuzzy, c-format
+#: ../src/itdb_device.c:450
+#, c-format
 msgid "Could not open '%s' for writing."
-msgstr "Ne peut ouvrir en écriture le fichier «%s» (%s)."
+msgstr "Ne peut ouvrir en écriture le fichier «%s»."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
-msgstr ""
+msgstr "Le répertoire «Device» n'existe pas."
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, 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:825
+#: ../src/itdb_itunesdb.c:873
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
-msgstr "«%s» n»est pas un fichier de compteurs (entête mhdp manquant)"
+msgstr "«%s» n'est pas un fichier de compteurs (entête mhdp manquant)"
 
-#: ../src/itdb_itunesdb.c:840
+#: ../src/itdb_itunesdb.c:888
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr ""
-"Fichier de compteurs ('%s') : longueur de l'entête plus petite que prévue (%"
-"d<96)."
+"Fichier de compteurs («%s») : longueur de l'entête plus petite que prévue (%"
+"d < 96)."
 
-#: ../src/itdb_itunesdb.c:853
+#: ../src/itdb_itunesdb.c:902
 #, 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)."
+"Fichier de compteur («%s») : longueur des données plus petite que prévue (%"
+"d < 12)."
 
-#: ../src/itdb_itunesdb.c:931
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:981
+#, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr ""
-"Fichier de compteur ('%s') : longueur des données plus petite que prévue (%"
-"d<12)."
+"Fichier iTunesStats («%s») : longueur des données plus petite que prévue (%"
+"d < 18)."
 
-#: ../src/itdb_itunesdb.c:1250
+#: ../src/itdb_itunesdb.c:1300
 #, 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:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -229,137 +246,141 @@
 "Longueur du champ de la règle (%d) de la liste intelligente inattendue. "
 "Tentative pour continuer quand même.\n"
 
-#: ../src/itdb_itunesdb.c:1439
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1494
+#, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
-msgstr "Corruption d'iTunesDB : pas de MHOD à l'offset %ld du fichier «%s»."
+msgstr "Corruption d'iTunesDB : pas de SLst à l'offset %ld du fichier «%s»."
 
-#: ../src/itdb_itunesdb.c:1452
+#: ../src/itdb_itunesdb.c:1507
 #, 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. Ignorance de l'erreur.\n"
+msgstr "Type MHOD inconnu (%d) lors du parcours de iTunesDB. Erreur ignorée.\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, 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:1527
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1590
+#, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
-msgstr "Corruption d'iTunesDB : pas de MHOD à l'offset %ld du fichier «%s»."
+msgstr ""
+"Corruption d'iTunesDB : pas de section «%s» dans la section «%s» débutant à "
+"l'offset %ld."
 
-#: ../src/itdb_itunesdb.c:1541
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1604
+#, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
 "'%s'."
 msgstr ""
-"iTunesDB ('%s') : longueur de l'entête mhsd plus petite que prévue (%ld<32). "
-"Interruption."
+"longueur de l'entête «%s» plus petite que prévue (%d <  %d) à l'offset %ld "
+"du fichier «%s»."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
-msgstr "«%s» n»est pas un fichier iTunesDB (entête mhdb manquante)"
+msgstr "«%s» n'est pas un fichier iTunesDB (entête mhdb manquante)."
 
-#: ../src/itdb_itunesdb.c:1643
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1706
+#, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
 "Aborting."
 msgstr ""
-"iTunesDB ('%s') : longueur de l'entête mhsd plus petite que prévue (%ld<32). "
-"Interruption."
+"iTunesDB («%s») : longueur de l'entête mhsd plus petite que prévue (%"
+"d < 32). Interruption."
 
-#: ../src/itdb_itunesdb.c:1664
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:1727
+#, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
-msgstr "Corruption d'iTunesDB : trouvé mhyp à %ld du fichier «%s»."
+msgstr "Corruption d'iTunesDB «%s» : mhsd attendu à l'offset %ld."
 
-#: ../src/itdb_itunesdb.c:1781
+#: ../src/itdb_itunesdb.c:1844
 #, 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:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
-msgstr "Itdb_Track ID «%d» non trouvé.\n"
+msgstr "Itdb_Track ID «%d» introuvable.\n"
 
-#: ../src/itdb_itunesdb.c:1956
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2024
+#, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
-msgstr "Corruption d'iTunesDB : trouvé mhyp à %ld du fichier «%s»."
+msgstr ""
+"Nombre de MHODs dans mhyp à l'offset %ld inconsistant dans le fichier «%s»."
 
-#: ../src/itdb_itunesdb.c:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr "Liste principale"
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
-msgstr ""
+msgstr "Podcasts"
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "Liste de lecture"
 
-#: ../src/itdb_itunesdb.c:1994
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2062
+#, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
 "ld in file '%s'."
-msgstr "Corruption d'iTunesDB : trouvé mhyp à %ld du fichier «%s»."
+msgstr ""
+"Corruption d'iTunesDB : nombre de sections mhip inconsistant dans mhyp à "
+"l'offset %ld du fichier «%s»."
 
-#: ../src/itdb_itunesdb.c:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "Liste de lecture OTG"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, 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)."
+"Le fichier «%s» n'est pas un fichier de liste OTG (entête mhpo manquant)."
 
-#: ../src/itdb_itunesdb.c:2311
+#: ../src/itdb_itunesdb.c:2407
 #, 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)."
+msgstr "Fichier de liste OTG («%s») : entête plus petit que prévu (%d < 20)."
 
-#: ../src/itdb_itunesdb.c:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file 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)."
+"Fichier de liste OTG («%s») : longueur de données plus petite que prévue (%"
+"d < 4)."
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, 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:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "Liste de lecture OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
-#, fuzzy
+#: ../src/itdb_itunesdb.c:2567
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
 msgstr ""
-"Corruption possible de iTunesDB : nombre de fichiers (mhit) incohérent. "
-"Tentative pour continuer quand même.\n"
+"Corruption d'iTunesDB : nombre de morceaux (mhit) incohérent. Tentative pour "
+"continuer quand même.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -367,199 +388,296 @@
 "Corruption possible d'iTunesDB : nombre de listes (mhyp) incohérent. "
 "Tentative pour continuer quand même.\n"
 
-#: ../src/itdb_itunesdb.c:2581
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2677
+#, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
 "found)"
 msgstr ""
-"Corruption de iTunesDB ('%s') : déjà trouvés deux listes mhsds -- abandon."
+"Corruption de iTunesDB («%s») : impossible de trouver la liste des morceaux "
+"(pas de section mhsd de type 1)"
 
-#: ../src/itdb_itunesdb.c:2610
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:2706
+#, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
 "sections found)"
 msgstr ""
-"Corruption de iTunesDB ('%s') : déjà trouvés deux listes mhsds -- abandon."
+"Corruption de iTunesDB («%s») :  impossible de trouver les listes de lecture "
+"(pas de section mhsd de type 1 ou 3)"
 
-#: ../src/itdb_itunesdb.c:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "Répertoire iTunes introuvable : «%s» (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "Répertoire «Music» introuvable : «%s» (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "Répertoire de contrôle introuvable :  «%s» (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Fichier introuvable : «%s»."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
 msgstr "Impossible d'écrire mhod du type %d\n"
 
-#: ../src/itdb_itunesdb.c:4098
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4245
+#, c-format
 msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Échec de l'ouverture en écriture de «%s»."
+msgstr "Échec de l'ouverture en écriture de «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
 msgstr "Échec de l'écriture dans «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4617
+#, c-format
 msgid "Path not found: '%s' (or similar)."
-msgstr "Chemin non trouvé : «%s»."
+msgstr "Chemin introuvable : «%s» (ou similaire)."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Impossible de renommer «%s» en «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Erreur de suppression du fichier «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
-msgstr ""
+msgstr "Répertoires «F..» introuvables dans «%s»."
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
-msgstr "Chemin non trouvé : «%s»."
+msgstr "Chemin introuvable : «%s»."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
-msgstr "Ne peut ouvrir en lecture le fichier «%s» (%s)."
+msgstr "Échec de l'ouverture en lecture de «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
-msgstr "Ne peut ouvrir en écriture le fichier «%s» (%s)."
+msgstr "Échec de l'ouverture en écriture de «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
-msgstr "Erreur lors de la lecture à partir de : %s (%s)."
+msgstr "Erreur lors de la lecture à partir de «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
-msgstr "Erreur d'écriture dans «%s» (%s)."
+msgstr "Erreur lors de l'écriture dans «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
-msgstr "Erreur à la fermeture «%s» (%s)."
+msgstr "Erreur à la fermeture de «%s» (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
-msgstr ""
+msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
-msgstr ""
+msgstr "Problème à la création du répertoire ou du fichier iPod : «%s»."
 
-#: ../src/itdb_photoalbum.c:25
-#, fuzzy, c-format
+#: ../src/itdb_photoalbum.c:107
+#, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr "Chemin non trouvé : «%s»."
+msgstr "Répertoire «Photos» introuvable : «%s» (ou similaire)."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:357
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:378
+#, 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 ""
+
+#: ../src/itdb_photoalbum.c:390
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:430
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:450
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+
 #. New action!
 #: ../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:116
-msgid "Usage to add photos:\n"
+#: ../tests/test-photos.c:39
+#, 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 ""
 
-#: ../tests/test-photos.c:117
-#, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+#: ../tests/test-photos.c:40
+#, fuzzy, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
 msgstr ""
+"Utilisation pour copier toutes les photos dans <répertoire_de_copie> :\n"
 
-#: ../tests/test-photos.c:118
+#: ../tests/test-photos.c:41
+#, fuzzy, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
+"Utilisation pour copier toutes les photos dans <répertoire_de_copie> :\n"
 
-#: ../tests/test-photos.c:119
-msgid "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
 
-#: ../tests/test-photos.c:120
-msgid "Usage to dump all photos to <output_dir>:\n"
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:121
+#: ../tests/test-photos.c:135
 #, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr ""
-
-#: ../tests/test-photos.c:133
-#, fuzzy, c-format
 msgid "Error creating '%s' (mkdir)\n"
-msgstr "Erreur de suppression du fichier «%s» (%s)."
+msgstr "Erreur à la création de «%s» (mkdir)\n"
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
-msgstr ""
+msgstr "Erreur : «%s» n'est pas un répertoire\n"
 
-#: ../tests/test-photos.c:148
-#, fuzzy, c-format
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database (%s).\n"
-msgstr "Impossible de renommer «%s» en «%s» (%s)."
+msgstr "Erreur à la lecture de la base de données des photos iPod (%s).\n"
 
-#: ../tests/test-photos.c:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 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
+msgid "Insufficient number of command line arguments.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr ""
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
+msgstr ""
+
+#: ../tests/test-photos.c:243
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
 "Will attempt to create a new database.\n"
 msgstr ""
+"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:174
+#: ../tests/test-photos.c:249
 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"
 
-#~ msgid "Writing to '%s' failed."
-#~ msgstr "Erreur d'écriture du fichier «%s»."
+#: ../tests/test-photos.c:274
+#, fuzzy, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "Erreur à la lecture de la base de données des photos iPod (%s).\n"
 
-#~ msgid "Did not find SLst hunk as expected. Trying to continue.\n"
-#~ msgstr ""
-#~ "Ne peut trouver le SLst attendu. Tentative pour continuer quand même.\n"
+#: ../tests/test-photos.c:320
+#, fuzzy
+msgid "Error reading iPod photo database"
+msgstr "Erreur à la lecture de la base de données des photos iPod.\n"
 
-#~ msgid "Database in memory corrupt (track pointer == NULL). Aborting export."
-#~ msgstr ""
-#~ "Base de données en mémoire corrompue (track pointer == NULL). Abandon de "
-#~ "l'export."
+#: ../tests/test-photos.c:331
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr ""
 
+#: ../tests/test-photos.c:343
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:364
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr ""
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr ""
+
+#~ msgid "Usage to add photos:\n"
+#~ msgstr "Utilisation pour ajouter des photos :\n"
+
+#~ msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+#~ msgstr "%s <point_de_montage> <album> <fichier(s)>\n"
+
 #~ msgid ""
-#~ "Database in memory corrupt (playlist pointer == NULL). Aborting export."
+#~ "albumname should be set to 'master' to add photos to the master photo "
+#~ "album\n"
 #~ msgstr ""
-#~ "Base de données en mémoire corrompue (playlist pointer == NULL). Abandon "
-#~ "de l'export."
+#~ "Le nom de l'album doit être «master» pour ajouter des photos dans l'album "
+#~ "photo principal\n"
+
+#~ msgid "\n"
+#~ msgstr "\n"
+
+#~ msgid "%s dump <mountpoint> <output_dir>\n"
+#~ msgstr "%s dump <point_de_montage> <répertoire_de_copie>\n"

Modified: libgpod/trunk/po/he.po
===================================================================
--- libgpod/trunk/po/he.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/he.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gtkpod\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\n"
 "PO-Revision-Date: 2005-08-02 21:19+0300\n"
 "Last-Translator: Assaf Gillat\n"
 "Language-Team: HEBREW <kde-il at yahoogroups.com>\n"
@@ -17,18 +17,23 @@
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Generator: KBabel 1.9.1\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
 msgstr ""
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr ""
 
-#: ../src/db-artwork-parser.c:515
+#: ../src/db-artwork-parser.c:291
 #, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+
+#: ../src/db-artwork-parser.c:459
+#, c-format
 msgid "Unexpected mhsd index: %d\n"
 msgstr ""
 
@@ -37,21 +42,30 @@
 msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
 msgstr ""
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:198
+#, fuzzy, c-format
+msgid "Could not access file '%s'."
+msgstr "קובץ לא קיים: '%s'."
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
+msgstr ""
+
+#: ../src/itdb_artwork.c:334
 #, c-format
 msgid "Illegal filename: '%s'.\n"
 msgstr ""
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
 msgstr ""
 
-#: ../src/itdb_artwork.c:387
+#: ../src/itdb_artwork.c:493
 #, fuzzy, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "קובץ לא קיים: '%s'."
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive thumbnail (appears to be on iPod, but no image info "
@@ -174,46 +188,46 @@
 msgid "Mobile Phone"
 msgstr ""
 
-#: ../src/itdb_device.c:449
+#: ../src/itdb_device.c:450
 #, fuzzy, c-format
 msgid "Could not open '%s' for writing."
 msgstr "תקלה בפתיחת '%s' לכתיבה (%s)."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "חיפוש לא חוקי בהיסט %ld (אורך %ld) בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:825
+#: ../src/itdb_itunesdb.c:873
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "זהו לא קובץ ספירת השמעה: '%s' (חסר תחילית mhdp)"
 
-#: ../src/itdb_itunesdb.c:840
+#: ../src/itdb_itunesdb.c:888
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr "קובץ ספירת השמעה ('%s'): אורך תחילית קטן מהצפוי (%d<96)."
 
-#: ../src/itdb_itunesdb.c:853
+#: ../src/itdb_itunesdb.c:902
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr "קובץ ספירת השמעה ('%s'): אורך רשומה קטן מהצפוי (%d<12)."
 
-#: ../src/itdb_itunesdb.c:931
+#: ../src/itdb_itunesdb.c:981
 #, fuzzy, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr "קובץ ספירת השמעה ('%s'): אורך רשומה קטן מהצפוי (%d<12)."
 
-#: ../src/itdb_itunesdb.c:1250
+#: ../src/itdb_itunesdb.c:1300
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr "iTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -221,12 +235,12 @@
 msgstr ""
 "אורך שדה של חוק (%d) רשימת השמעה חכמה הוא לא כצפוי. מנסה להמשיך בכל זאת.\n"
 
-#: ../src/itdb_itunesdb.c:1439
+#: ../src/itdb_itunesdb.c:1494
 #, fuzzy, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr "iTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1452
+#: ../src/itdb_itunesdb.c:1507
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -235,18 +249,18 @@
 "נתקלנו בסוג לא ידוע של MHOD (%d) בזמן ניתוח ה-iTuneDB. מתעלם.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
 msgstr "iTunesDB שבור: אורך חתיכה 0 בחתיכה  %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1527
+#: ../src/itdb_itunesdb.c:1590
 #, 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:1541
+#: ../src/itdb_itunesdb.c:1604
 #, fuzzy, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -254,12 +268,12 @@
 msgstr ""
 "iTunesDB ('%s'): גודל תחילית של החתיכה mhsd קטנה מהצפוי (%ld<32). מבטל."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "זהו לא iTunesDB: '%s' (חסרה תחילית mhdb)."
 
-#: ../src/itdb_itunesdb.c:1643
+#: ../src/itdb_itunesdb.c:1706
 #, fuzzy, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -267,77 +281,77 @@
 msgstr ""
 "iTunesDB ('%s'): גודל תחילית של החתיכה mhsd קטנה מהצפוי (%ld<32). מבטל."
 
-#: ../src/itdb_itunesdb.c:1664
+#: ../src/itdb_itunesdb.c:1727
 #, fuzzy, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunesDB שבור: נמצא mhyp ב %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1781
+#: ../src/itdb_itunesdb.c:1844
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "מזהה Itdb_Track '%d' לא נמצא.\n"
 
-#: ../src/itdb_itunesdb.c:1956
+#: ../src/itdb_itunesdb.c:2024
 #, fuzzy, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
 msgstr "iTunesDB שבור: נמצא mhyp ב %ld בקובץ '%s'."
 
-#: ../src/itdb_itunesdb.c:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr "רשימת ראשית"
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "רשימת השמעה"
 
-#: ../src/itdb_itunesdb.c:1994
+#: ../src/itdb_itunesdb.c:2062
 #, 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:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "רשימת השמעה OTG"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "זהו לא קובץ רשימת השמעה OTG: '%s' (חסרה תחילת קובץ mhpo)."
 
-#: ../src/itdb_itunesdb.c:2311
+#: ../src/itdb_itunesdb.c:2407
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr "קובץ רשימת השמעה OTG ('%s'): גודל תחילית קטן מהצפוי (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file file ('%s'): entry length smaller than expected (%d<4)."
 msgstr "קובץ רשימת השמעה OTG ('%s'): גודל רשומה קטן מהצפוי (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr "רשימת השמעה OTG '%s': התייחסות לרצועה לא קיימת (%d)."
 
-#: ../src/itdb_itunesdb.c:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "רשימת השמעה OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
+#: ../src/itdb_itunesdb.c:2567
 #, fuzzy
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
@@ -347,7 +361,7 @@
 "להמשיך.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -355,183 +369,271 @@
 "יכול להיות ש-iTuneDB שבור: מספר רשימות השמעה (mhyp חתיכות) לא עקביות. מנסה "
 "להמשיך.\n"
 
-#: ../src/itdb_itunesdb.c:2581
+#: ../src/itdb_itunesdb.c:2677
 #, 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:2610
+#: ../src/itdb_itunesdb.c:2706
 #, 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:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
 msgstr "קובץ לא קיים: '%s'."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
 msgstr "לא יכול לכתוב mhod של סוג %d\n"
 
-#: ../src/itdb_itunesdb.c:4098
+#: ../src/itdb_itunesdb.c:4245
 #, fuzzy, c-format
 msgid "Opening of '%s' for writing failed (%s)."
 msgstr "פתיחת '%s' לכתיבה נכשלה."
 
-#: ../src/itdb_itunesdb.c:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
 msgstr "נכשלה כתיבה ל '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
+#: ../src/itdb_itunesdb.c:4617
 #, fuzzy, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "נתיב לא נמצא: '%s'."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "תקלה בהסרת '%s' (%s)"
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "נתיב לא נמצא: '%s'."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "תקלה בפתיחת '%s' לקריאה (%s)."
 
-#: ../src/itdb_itunesdb.c:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "תקלה בפתיחת '%s' לכתיבה (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "תקלה בזמן קריאה מ '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "תקלה בזמן כתיבה ל '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "תקלה בזמן סגירה '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr ""
 
-#: ../src/itdb_photoalbum.c:25
+#: ../src/itdb_photoalbum.c:107
 #, fuzzy, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "נתיב לא נמצא: '%s'."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:357
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:378
+#, 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 ""
+
+#: ../src/itdb_photoalbum.c:390
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:430
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:450
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+
 #. New action!
 #: ../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:116
-msgid "Usage to add photos:\n"
+#: ../tests/test-photos.c:39
+#, 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 ""
 
-#: ../tests/test-photos.c:117
+#: ../tests/test-photos.c:40
 #, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
 msgstr ""
 
-#: ../tests/test-photos.c:118
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
 
-#: ../tests/test-photos.c:119
-msgid "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
 
-#: ../tests/test-photos.c:120
-msgid "Usage to dump all photos to <output_dir>:\n"
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:121
-#, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr ""
-
-#: ../tests/test-photos.c:133
+#: ../tests/test-photos.c:135
 #, fuzzy, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "תקלה בהסרת '%s' (%s)"
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr ""
 
-#: ../tests/test-photos.c:148
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
 #, fuzzy, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
 
-#: ../tests/test-photos.c:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 msgid "Error reading iPod photo database.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
+#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+msgid "Insufficient number of command line arguments.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr ""
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
+msgstr ""
+
+#: ../tests/test-photos.c:243
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
 "Will attempt to create a new database.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:174
+#: ../tests/test-photos.c:249
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
 
+#: ../tests/test-photos.c:274
+#, fuzzy, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
+
+#: ../tests/test-photos.c:320
+#, fuzzy
+msgid "Error reading iPod photo database"
+msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
+
+#: ../tests/test-photos.c:331
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:343
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:364
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr ""
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr ""
+
 #~ msgid "Writing to '%s' failed."
 #~ msgstr "נכשלה כתיבה ל '%s'."
 

Modified: libgpod/trunk/po/it.po
===================================================================
--- libgpod/trunk/po/it.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/it.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -11,7 +11,7 @@
 msgstr ""
 "Project-Id-Version: it2\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\n"
 "PO-Revision-Date: 2005-06-20 23:25+0900\n"
 "Last-Translator: \n"
 "Language-Team:  <it at li.org>\n"
@@ -21,18 +21,23 @@
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Generator: KBabel 1.9.1\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
 msgstr ""
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
 msgstr ""
 
-#: ../src/db-artwork-parser.c:515
+#: ../src/db-artwork-parser.c:291
 #, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+
+#: ../src/db-artwork-parser.c:459
+#, c-format
 msgid "Unexpected mhsd index: %d\n"
 msgstr ""
 
@@ -41,21 +46,30 @@
 msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
 msgstr ""
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:198
+#, fuzzy, c-format
+msgid "Could not access file '%s'."
+msgstr "file non trovato: '%s'."
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
+msgstr ""
+
+#: ../src/itdb_artwork.c:334
 #, c-format
 msgid "Illegal filename: '%s'.\n"
 msgstr ""
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
 msgstr ""
 
-#: ../src/itdb_artwork.c:387
+#: ../src/itdb_artwork.c:493
 #, fuzzy, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "file non trovato: '%s'."
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive thumbnail (appears to be on iPod, but no image info "
@@ -178,52 +192,52 @@
 msgid "Mobile Phone"
 msgstr ""
 
-#: ../src/itdb_device.c:449
+#: ../src/itdb_device.c:450
 #, fuzzy, c-format
 msgid "Could not open '%s' for writing."
 msgstr "Errore nell'apertura in scrittura di '%s' (%s)."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
 msgstr "ricerca illegale all'offest %ld (lunghezza %ld) nel file '%s'"
 
-#: ../src/itdb_itunesdb.c:825
+#: ../src/itdb_itunesdb.c:873
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "Non è un file conta riproduzioni: '%s' (intestazione mhdp mancante)"
 
-#: ../src/itdb_itunesdb.c:840
+#: ../src/itdb_itunesdb.c:888
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
 msgstr ""
 "File conta-riproduzioni ('%s'): lunghezza della intestazione più piccolo di "
 "quanto ci si aspettava (%d<96)"
 
-#: ../src/itdb_itunesdb.c:853
+#: ../src/itdb_itunesdb.c:902
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
 msgstr ""
 "File conta-riproduzioni ('%s'): lunghezza della voce più piccoladi quanto ci "
 "si aspettava (%d<12)"
 
-#: ../src/itdb_itunesdb.c:931
+#: ../src/itdb_itunesdb.c:981
 #, fuzzy, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
 msgstr ""
 "File conta-riproduzioni ('%s'): lunghezza della voce più piccoladi quanto ci "
 "si aspettava (%d<12)"
 
-#: ../src/itdb_itunesdb.c:1250
+#: ../src/itdb_itunesdb.c:1300
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr "iTunesDB corrotto: nessun MHOD all'offest %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -232,12 +246,12 @@
 "La lunghezza del campo della regola della playlist intelligente (%d) non è "
 "come la si aspettava. Si prova a continuare.\n"
 
-#: ../src/itdb_itunesdb.c:1439
+#: ../src/itdb_itunesdb.c:1494
 #, fuzzy, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr "iTunesDB corrotto: nessun MHOD all'offest %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1452
+#: ../src/itdb_itunesdb.c:1507
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -247,18 +261,18 @@
 "Ignorato.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, 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 %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1527
+#: ../src/itdb_itunesdb.c:1590
 #, fuzzy, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
 msgstr "iTunesDB corrotto: nessun MHOD all'offest %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1541
+#: ../src/itdb_itunesdb.c:1604
 #, fuzzy, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -267,12 +281,12 @@
 "iTunesDB ('%s'): lunghezza della intestazione del hunk mhsd più piccolo "
 "delle aspettative (%ld<32). Interrompo."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "Non è un file iTunesDB: '%s' (intestazione mhdb mancante)"
 
-#: ../src/itdb_itunesdb.c:1643
+#: ../src/itdb_itunesdb.c:1706
 #, fuzzy, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -281,62 +295,62 @@
 "iTunesDB ('%s'): lunghezza della intestazione del hunk mhsd più piccolo "
 "delle aspettative (%ld<32). Interrompo."
 
-#: ../src/itdb_itunesdb.c:1664
+#: ../src/itdb_itunesdb.c:1727
 #, fuzzy, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
 msgstr "iTunesDB corrotto: trovato mhyp a %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1781
+#: ../src/itdb_itunesdb.c:1844
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "itDB_Track ID '%d' non trovato.\n"
 
-#: ../src/itdb_itunesdb.c:1956
+#: ../src/itdb_itunesdb.c:2024
 #, fuzzy, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
 msgstr "iTunesDB corrotto: trovato mhyp a %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr "PL principale"
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "Playlist"
 
-#: ../src/itdb_itunesdb.c:1994
+#: ../src/itdb_itunesdb.c:2062
 #, fuzzy, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
 "ld in file '%s'."
 msgstr "iTunesDB corrotto: trovato mhyp a %ld nel file '%s'."
 
-#: ../src/itdb_itunesdb.c:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "Playlist OTG"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
 msgstr "Non è una file playlist OTG: '%s' (manca l'intestazione mhpo)"
 
-#: ../src/itdb_itunesdb.c:2311
+#: ../src/itdb_itunesdb.c:2407
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
 msgstr ""
 "File playlist OTG ('%s'): lunghezza della intestazione più piccola delle "
 "aspettative (%d<20)"
 
-#: ../src/itdb_itunesdb.c:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file file ('%s'): entry length smaller than expected (%d<4)."
@@ -344,18 +358,18 @@
 "File playlist OTG ('%s'): lunghezza della voce più piccola delle aspettative "
 "(%d<4)"
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr "Playlist OTG '%s': Punta ad una traccia non esistente (%d)."
 
-#: ../src/itdb_itunesdb.c:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "Playlist OTG %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
+#: ../src/itdb_itunesdb.c:2567
 #, fuzzy
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
@@ -365,7 +379,7 @@
 "inconsistente. Provo a continuare.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -373,183 +387,271 @@
 "L'iTunes è probabilmente corrotto: il numero di playlist (mhyp hunks) è "
 "inconsistente. Provo a continuare.\n"
 
-#: ../src/itdb_itunesdb.c:2581
+#: ../src/itdb_itunesdb.c:2677
 #, fuzzy, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
 "found)"
 msgstr "iTunesDB '%s' corrotto: trovate già due playlist mhsds -- ci rinuncio."
 
-#: ../src/itdb_itunesdb.c:2610
+#: ../src/itdb_itunesdb.c:2706
 #, fuzzy, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
 "sections found)"
 msgstr "iTunesDB '%s' corrotto: trovate già due playlist mhsds -- ci rinuncio."
 
-#: ../src/itdb_itunesdb.c:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
 msgstr "file non trovato: '%s'."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
 msgstr "Impossibile scrivere il mhod del tipo %d\n"
 
-#: ../src/itdb_itunesdb.c:4098
+#: ../src/itdb_itunesdb.c:4245
 #, fuzzy, c-format
 msgid "Opening of '%s' for writing failed (%s)."
 msgstr "Apertura di '%s' in scrittura fallita."
 
-#: ../src/itdb_itunesdb.c:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
 msgstr "Scrittura verso '%s' falita (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
+#: ../src/itdb_itunesdb.c:4617
 #, fuzzy, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Percorso non trovato: '%s'."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Errore nella rinominazione da '%s' a '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Errore nella rimozione di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "Nessuna directory 'F..' trovata in '%s'"
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Percorso non trovato: '%s'."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
 msgstr "Errore nell'apertura in lettura di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Errore nell'apertura in scrittura di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Errore nella lettura da '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Errore nella scrittura verso '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Errore nella chiusura di '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
 msgstr ""
 
-#: ../src/itdb_photoalbum.c:25
+#: ../src/itdb_photoalbum.c:107
 #, fuzzy, c-format
 msgid "Photos directory not found: '%s' (or similar)."
 msgstr "Percorso non trovato: '%s'."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:357
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:378
+#, 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 ""
+
+#: ../src/itdb_photoalbum.c:390
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:430
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+
+#: ../src/itdb_photoalbum.c:450
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+
 #. New action!
 #: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
 msgstr "Azione sconosciuta (%d) nella playlist intelligente verrà ignorata.\n"
 
-#: ../tests/test-photos.c:116
-msgid "Usage to add photos:\n"
+#: ../tests/test-photos.c:39
+#, 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 ""
 
-#: ../tests/test-photos.c:117
+#: ../tests/test-photos.c:40
 #, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
 msgstr ""
 
-#: ../tests/test-photos.c:118
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
 
-#: ../tests/test-photos.c:119
-msgid "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
 
-#: ../tests/test-photos.c:120
-msgid "Usage to dump all photos to <output_dir>:\n"
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:121
-#, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr ""
-
-#: ../tests/test-photos.c:133
+#: ../tests/test-photos.c:135
 #, fuzzy, c-format
 msgid "Error creating '%s' (mkdir)\n"
 msgstr "Errore nella rimozione di '%s' (%s)."
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
 msgstr ""
 
-#: ../tests/test-photos.c:148
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
 #, fuzzy, c-format
 msgid "Error reading iPod photo database (%s).\n"
 msgstr "Errore nella rinominazione da '%s' a '%s' (%s)."
 
-#: ../tests/test-photos.c:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 msgid "Error reading iPod photo database.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
+#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+msgid "Insufficient number of command line arguments.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr ""
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
+msgstr ""
+
+#: ../tests/test-photos.c:243
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
 "Will attempt to create a new database.\n"
 msgstr ""
 
-#: ../tests/test-photos.c:174
+#: ../tests/test-photos.c:249
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
 
+#: ../tests/test-photos.c:274
+#, fuzzy, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "Errore nella rinominazione da '%s' a '%s' (%s)."
+
+#: ../tests/test-photos.c:320
+#, fuzzy
+msgid "Error reading iPod photo database"
+msgstr "Errore nella rinominazione da '%s' a '%s' (%s)."
+
+#: ../tests/test-photos.c:331
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:343
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+
+#: ../tests/test-photos.c:364
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr ""
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr ""
+
 #~ msgid "Writing to '%s' failed."
 #~ msgstr "Scrittura verso '%s' fallita."
 

Modified: libgpod/trunk/po/ja.po
===================================================================
--- libgpod/trunk/po/ja.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/ja.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gtkpod 0.40\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\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,54 +16,72 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
-msgstr ""
+msgstr "ͽ´ü¤»¤Ì mhod3 string type ¤Ç¤¹: %d\n"
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "¥¢¡¼¥È¥ï¡¼¥¯¤ËÂбþ¤¹¤ë¶Ê (dbid: %s) ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
+
+#: ../src/db-artwork-parser.c:291
+#, 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:515
+#: ../src/db-artwork-parser.c:459
 #, c-format
 msgid "Unexpected mhsd index: %d\n"
-msgstr ""
+msgstr "ͽ´ü¤»¤Ì mhsd index: %d\n"
 
 #: ../src/db-image-parser.c:118
 #, c-format
 msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr ""
+msgstr "mhni ¤Ëͽ´ü¤»¤Ì¥¤¥á¡¼¥¸¥¿¥¤¥×: size: %ux%u (%d), offset: %d\n"
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:198
 #, c-format
+msgid "Could not access file '%s'."
+msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿."
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
+msgstr "libgpod ¤Ë¥¢¡¼¥È¥ï¡¼¥¯¤Î¥µ¥Ý¡¼¥È¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó."
+
+#: ../src/itdb_artwork.c:334
+#, c-format
 msgid "Illegal filename: '%s'.\n"
-msgstr ""
+msgstr "ÉÔÀµ¤Ê¥Õ¥¡¥¤¥ë̾: '%s'.\n"
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
-msgstr ""
+msgstr "¥Þ¥¦¥ó¥È¾ì½ê¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó.\n"
 
-#: ../src/itdb_artwork.c:387
-#, fuzzy, c-format
+#: ../src/itdb_artwork.c:493
+#, c-format
 msgid "Could not find on iPod: '%s'\n"
-msgstr "¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'"
+msgstr "iPod ¤ÎÃæ¤Ë¸«Åö¤¿¤ê¤Þ¤»¤ó: '%s'\n"
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive thumbnail (appears to be on iPod, but no image info "
 "available): type: %d, filename: '%s'\n"
 msgstr ""
+"¥µ¥à¥Í¥¤¥ë¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó (iPod ¤ÎÃæ¤Ë¤¢¤ëȦ¤Ç¤¹¤¬, ²èÁü¾ðÊ󤬸«¤Ä¤«¤ê¤Þ¤»"
+"¤ó): type: %d, filename: '%s'\n"
 
 #: ../src/itdb_device.c:170
 msgid "Invalid"
-msgstr ""
+msgstr "°Û¾ï"
 
 #: ../src/itdb_device.c:171 ../src/itdb_device.c:197
 msgid "Unknown"
-msgstr ""
+msgstr "ÉÔÌÀ"
 
 #: ../src/itdb_device.c:172
 msgid "Color"
@@ -83,23 +101,23 @@
 
 #: ../src/itdb_device.c:176
 msgid "Mini (Silver)"
-msgstr ""
+msgstr "Mini (¶ä)"
 
 #: ../src/itdb_device.c:177
 msgid "Mini (Blue)"
-msgstr ""
+msgstr "Mini (ÀÄ)"
 
 #: ../src/itdb_device.c:178
 msgid "Mini (Pink)"
-msgstr ""
+msgstr "Mini (¥Ô¥ó¥¯)"
 
 #: ../src/itdb_device.c:179
 msgid "Mini (Green)"
-msgstr ""
+msgstr "Mini (ÎÐ)"
 
 #: ../src/itdb_device.c:180
 msgid "Mini (Gold)"
-msgstr ""
+msgstr "Mini (¶â)"
 
 #: ../src/itdb_device.c:181
 msgid "Shuffle"
@@ -107,19 +125,19 @@
 
 #: ../src/itdb_device.c:182
 msgid "Nano (White)"
-msgstr ""
+msgstr "Nano (Çò)"
 
 #: ../src/itdb_device.c:183
 msgid "Nano (Black)"
-msgstr ""
+msgstr "Nano (¹õ)"
 
 #: ../src/itdb_device.c:184
 msgid "Video (White)"
-msgstr ""
+msgstr "Video (Çò)"
 
 #: ../src/itdb_device.c:185
 msgid "Video (Black)"
-msgstr ""
+msgstr "Video (¹õ)"
 
 #: ../src/itdb_device.c:186
 msgid "Mobile (1)"
@@ -131,423 +149,531 @@
 
 #: ../src/itdb_device.c:188
 msgid "Nano (Silver)"
-msgstr ""
+msgstr "Nano (¶ä)"
 
 #: ../src/itdb_device.c:189
 msgid "Nano (Blue)"
-msgstr ""
+msgstr "Nano (ÀÄ)"
 
 #: ../src/itdb_device.c:190
 msgid "Nano (Green)"
-msgstr ""
+msgstr "Nano (ÎÐ)"
 
 #: ../src/itdb_device.c:191
 msgid "Nano (Pink)"
-msgstr ""
+msgstr "Nano (¥Ô¥ó¥¯)"
 
 #: ../src/itdb_device.c:198
 msgid "First Generation"
-msgstr ""
+msgstr "1G"
 
 #: ../src/itdb_device.c:199
 msgid "Second Generation"
-msgstr ""
+msgstr "2G"
 
 #: ../src/itdb_device.c:200
 msgid "Third Generation"
-msgstr ""
+msgstr "3G"
 
 #: ../src/itdb_device.c:201
 msgid "Fourth Generation"
-msgstr ""
+msgstr "4G"
 
 #: ../src/itdb_device.c:202
 msgid "Fifth Generation"
-msgstr ""
+msgstr "5G"
 
 #: ../src/itdb_device.c:203
 msgid "Sixth Generation"
-msgstr ""
+msgstr "6G"
 
 #: ../src/itdb_device.c:204
 msgid "Mobile Phone"
-msgstr ""
+msgstr "·ÈÂÓÅÅÏÃ"
 
-#: ../src/itdb_device.c:449
-#, fuzzy, c-format
+#: ../src/itdb_device.c:450
+#, c-format
 msgid "Could not open '%s' for writing."
-msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£(%s)"
+msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
-msgstr ""
+msgstr "¥Ç¥Ð¥¤¥¹¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, c-format
 msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
-msgstr "ÉÔÀµ¤Ê¥·¡¼¥¯: '%3$s', ¥ª¥Õ¥»¥Ã¥È %1$ld, Ťµ (%2$ld)"
+msgstr "ÉÔÀµ¤Ê¥·¡¼¥¯: '%3$s', ¥ª¥Õ¥»¥Ã¥È %1$ld (Ťµ %2$ld)"
 
-#: ../src/itdb_itunesdb.c:825
+#: ../src/itdb_itunesdb.c:873
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdp ¥Ø¥Ã¥À¤¬Ìµ¤¤)"
 
-#: ../src/itdb_itunesdb.c:840
+#: ../src/itdb_itunesdb.c:888
 #, c-format
 msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
-msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó¡£(%d<96)"
+msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<96)."
 
-#: ../src/itdb_itunesdb.c:853
+#: ../src/itdb_itunesdb.c:902
 #, c-format
 msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
-msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó¡£(%d<12)"
+msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<12)."
 
-#: ../src/itdb_itunesdb.c:931
+#: ../src/itdb_itunesdb.c:981
 #, c-format
 msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
-msgstr "iTunesStats ¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó¡£(%d<18)"
+msgstr "iTunesStats ¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<18)."
 
-#: ../src/itdb_itunesdb.c:1250
+#: ../src/itdb_itunesdb.c:1300
 #, c-format
 msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
 msgstr ""
-"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: MHOD ¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó¡£(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È "
-"%1$ld)"
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: MHOD ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
+"1$ld)."
 
-#: ../src/itdb_itunesdb.c:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
 "anyhow.\n"
 msgstr ""
-"¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥È¤Î¥ë¡¼¥ë¤ÎŤµ (%d) ¤¬´üÂÔ¤µ¤ì¤ëŤµ¤È°Û¤Ê¤ê¤Þ¤¹¡£½èÍý¤ò"
-"³¤±¤Þ¤¹¡£\n"
+"¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥È¤Î¥ë¡¼¥ë¤ÎŤµ (%d) ¤¬´üÂÔ¤µ¤ì¤ëŤµ¤È°Û¤Ê¤ê¤Þ¤¹. ½èÍý¤ò"
+"³¤±¤Þ¤¹.\n"
 
-#: ../src/itdb_itunesdb.c:1439
+#: ../src/itdb_itunesdb.c:1494
 #, c-format
 msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
 msgstr ""
-"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: SLst ¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó¡£(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È "
-"%1$ld)"
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: SLst ¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
+"1$ld)."
 
-#: ../src/itdb_itunesdb.c:1452
+#: ../src/itdb_itunesdb.c:1507
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
 "\n"
 msgstr ""
-"iTunesDB ¤ÎÆɤ߹þ¤ßÃæ¤Ë¡¢Ì¤ÃΤΠMHOD ¥¿¥¤¥× (%d) ¤òȯ¸«¤·¤Þ¤·¤¿¡£Ìµ»ë¤·¤Þ"
-"¤¹¡£\n"
+"iTunesDB ¤ÎÆɤ߹þ¤ßÃæ¤Ë, ̤ÃΤΠMHOD ¥¿¥¤¥× (%d) ¤òȯ¸«¤·¤Þ¤·¤¿. ̵»ë¤·¤Þ"
+"¤¹.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, c-format
 msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
 msgstr ""
-"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: hunk ¤ÎŤµ¤¬ 0 ¤Ç¤¹¡£(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
-"1$ld)"
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: hunk ¤ÎŤµ¤¬ 0 ¤Ç¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1"
+"$ld)."
 
-#: ../src/itdb_itunesdb.c:1527
+#: ../src/itdb_itunesdb.c:1590
 #, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
 msgstr ""
 "iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: %3$ld ¤Î°ÌÃ֤ˤ¢¤ë¥»¥¯¥·¥ç¥ó '%2$s' ¤ÎÃæ¤Ë¥»¥¯¥·¥ç"
-"¥ó '%1$s' ¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+"¥ó '%1$s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:1541
+#: ../src/itdb_itunesdb.c:1604
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
 "'%s'."
 msgstr ""
 "'%1$s' ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%2$d < %3$d) (¥Õ¥¡¥¤¥ë '%5$s', ¥ª¥Õ¥»¥Ã¥È "
-"%4$ld)"
+"%4$ld)."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
-msgstr "iTunesDB ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdb ¥Ø¥Ã¥À¤¬Ìµ¤¤)"
+msgstr "iTunesDB ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdb ¥Ø¥Ã¥À¤¬Ìµ¤¤)."
 
-#: ../src/itdb_itunesdb.c:1643
+#: ../src/itdb_itunesdb.c:1706
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
 "Aborting."
-msgstr "iTunesDB ('%s'): mhsd ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó(%d<32)¡£Ãæ»ß¤·¤Þ¤¹¡£"
+msgstr "iTunesDB ('%s'): mhsd ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<32). Ãæ»ß¤·¤Þ¤¹."
 
-#: ../src/itdb_itunesdb.c:1664
+#: ../src/itdb_itunesdb.c:1727
 #, c-format
 msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
-msgstr "iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhsd ¤¬ %ld ¤Î°ÌÃ֤˸«ÉÕ¤«¤ê¤Þ¤»¤ó¡£"
+msgstr "iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhsd ¤¬ %ld ¤Î°ÌÃ֤˸«¤Ä¤«¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:1781
+#: ../src/itdb_itunesdb.c:1844
 #, c-format
 msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
 msgstr ""
-"mhip ¤ÎÃæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹¡£(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)"
+"mhip Ãæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
 
-#: ../src/itdb_itunesdb.c:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
-msgstr "Itdb_Track ID '%d' ¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó¡£\n"
+msgstr "Itdb_Track ID '%d' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
 
-#: ../src/itdb_itunesdb.c:1956
+#: ../src/itdb_itunesdb.c:2024
 #, c-format
 msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
 msgstr ""
-"mhyp ¤ÎÃæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹¡£(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)"
+"mhyp Ãæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
 
-#: ../src/itdb_itunesdb.c:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "¥×¥ì¥¤¥ê¥¹¥È"
 
-#: ../src/itdb_itunesdb.c:1994
+#: ../src/itdb_itunesdb.c:2062
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
 "ld in file '%s'."
 msgstr ""
-"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhyp ¤ÎÃæ¤Î mhip ¥»¥¯¥·¥ç¥ó¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹¡£"
-"(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)"
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhyp Ãæ¤Î mhip ¥»¥¯¥·¥ç¥ó¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ "
+"(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
 
-#: ../src/itdb_itunesdb.c:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, c-format
 msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
-msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhpo ¥Ø¥Ã¥À¤¬Ìµ¤¤)"
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhpo ¥Ø¥Ã¥À¤¬Ìµ¤¤)."
 
-#: ../src/itdb_itunesdb.c:2311
+#: ../src/itdb_itunesdb.c:2407
 #, c-format
 msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
-msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó¡£(%d<20)"
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<20)."
 
-#: ../src/itdb_itunesdb.c:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file file ('%s'): entry length smaller than expected (%d<4)."
-msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó¡£(%d<4)"
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<4)."
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, c-format
 msgid "OTG playlist file '%s': reference to non-existent track (%d)."
 msgstr ""
-"OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¸ºß¤·¤Ê¤¤¶ÊÈÖ¹æ (%d) ¤Ø¤Î»²¾È¤¬¤¢¤ê¤Þ¤¹¡£"
+"OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¸ºß¤·¤Ê¤¤¶ÊÈÖ¹æ (%d) ¤Ø¤Î»²¾È¤¬¤¢¤ê¤Þ¤¹."
 
-#: ../src/itdb_itunesdb.c:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
+#: ../src/itdb_itunesdb.c:2567
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
 msgstr ""
-"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¿ô (mhit ¤Î¿ô) ¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹¡£½èÍý¤ò³¤±¤Þ"
-"¤¹¡£\n"
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¿ô (mhit ¤Î¿ô) ¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹. ½èÍý¤ò³¤±¤Þ"
+"¤¹.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
 msgstr ""
 "iTunesDB ¤¬Â¿Ê¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¥×¥ì¥¤¥ê¥¹¥È¤Î¿ô (mhyp ¤Î¿ô) ¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ"
-"¤¹¡£½èÍý¤ò³¤±¤Þ¤¹¡£\n"
+"¤¹. ½èÍý¤ò³¤±¤Þ¤¹.\n"
 
-#: ../src/itdb_itunesdb.c:2581
+#: ../src/itdb_itunesdb.c:2677
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
 "found)"
 msgstr ""
-"iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó¡£(mhsd ¥¿¥¤¥× 1 ¥»¥¯"
-"¥·¥ç¥ó¤¬¸«ÉÕ¤«¤é¤Ê¤¤)"
+"iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó. (mhsd ¥¿¥¤¥× 1 ¥»¥¯"
+"¥·¥ç¥ó¤¬¸«¤Ä¤«¤é¤Ê¤¤)"
 
-#: ../src/itdb_itunesdb.c:2610
+#: ../src/itdb_itunesdb.c:2706
 #, 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 ¤Î¥»¥¯¥·¥ç¥ó¤¬¸«ÉÕ¤«¤é¤Ê¤¤)"
+"iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¥×¥ì¥¤¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó. (mhsd ¥¿¥¤¥× 2 "
+"¤È ¥¿¥¤¥× 3 ¤Î¥»¥¯¥·¥ç¥ó¤¬¸«¤Ä¤«¤é¤Ê¤¤)"
 
-#: ../src/itdb_itunesdb.c:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "iTunes ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "Music ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
-msgstr ""
+msgstr "Control ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
-msgstr "¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'"
+msgstr "¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
-msgstr "mhod ¥¿¥¤¥× %d ¤¬½ñ¤­¹þ¤á¤Þ¤»¤ó¡£\n"
+msgstr "mhod ¥¿¥¤¥× %d ¤¬½ñ¤­¹þ¤á¤Þ¤»¤ó.\n"
 
-#: ../src/itdb_itunesdb.c:4098
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4245
+#, c-format
 msgid "Opening of '%s' for writing failed (%s)."
-msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£"
+msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
-msgstr "'%s'¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£(%s)"
+msgstr "'%s'¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4617
+#, c-format
 msgid "Path not found: '%s' (or similar)."
-msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'"
+msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
-msgstr "'%s' ¤ò '%s' ¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£(%s)"
+msgstr "'%s' ¤ò '%s' ¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
-msgstr "'%s' ¤Îºï½üÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£(%s)"
+msgstr "'%s' ¤Îºï½üÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
-msgstr "'F..' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ '%s' ¤ÎÃæ¤Ë¤¢¤ê¤Þ¤»¤ó¡£"
+msgstr "'F..' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ '%s' ¤ÎÃæ¤Ë¤¢¤ê¤Þ¤»¤ó."
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
-msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'"
+msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, c-format
 msgid "Error opening '%s' for reading (%s)."
-msgstr "'%s' ¤òÆɤ߹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£(%s)"
+msgstr "'%s' ¤òÆɤ߹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
-msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£(%s)"
+msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
-msgstr "'%s' ¤ÎÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£(%s)"
+msgstr "'%s' ¤ÎÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
-msgstr "'%s' ¤Î½ñ¤­¹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£(%s)"
+msgstr "'%s' ¤Î½ñ¤­¹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
-msgstr "'%s' ¤òÊĤ¸¤ëºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£(%s)"
+msgstr "'%s' ¤òÊĤ¸¤ëºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
 msgstr ""
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
-msgstr ""
+msgstr "iPod ¥Ç¥£¥ì¥¯¥È¥ê¤ÎºîÀ®¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë '%s' ¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿."
 
-#: ../src/itdb_photoalbum.c:25
-#, fuzzy, c-format
+#: ../src/itdb_photoalbum.c:107
+#, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'"
+msgstr "Photos ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr "¼Ì¿¿¥é¥¤¥Ö¥é¥ê"
+
+#: ../src/itdb_photoalbum.c:357
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"¼Ì¿¿¤òÄɲ乤ëÁ°¤Ë, »ÈÍѤ·¤Æ¤¤¤ë iPod ¤Î¥â¥Ç¥ë¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹."
+
+#: ../src/itdb_photoalbum.c:378
+#, 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:390
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. ¼Ì¿¿¤ÏÄɲ䵤ì¤Þ¤»¤ó."
+
+#: ../src/itdb_photoalbum.c:430
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"¼Ì¿¿¤ÎÄɲÃÃæ¤Ë itdb_photodb_add_photo_internal() Æâ¤Çͽ´ü¤»¤Ì¥¨¥é¡¼¤¬È¯À¸¤·¤Þ"
+"¤·¤¿. ³«È¯¼Ô¤Ø¤ÎÊó¹ð¤ò¤ª´ê¤¤¤·¤Þ¤¹."
+
+#: ../src/itdb_photoalbum.c:450
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"¤³¤Î¥½¥Õ¥È¤¬ gdkpixbuf ¤ò»È¤ï¤º¤Ë¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Æ¤¤¤Þ¤¹. ¼Ì¿¿¤Î¥µ¥Ý¡¼¥È¤Ï̵¸ú"
+"¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹."
+
 #. New action!
 #: ../src/itdb_playlist.c:78
 #, c-format
 msgid "Unknown action (%d) in smart playlist will be ignored.\n"
-msgstr "¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥ÈÆâ¤Î̤ÃΤΥ¢¥¯¥·¥ç¥ó (%d) ¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£\n"
+msgstr "¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥ÈÆâ¤Î̤ÃΤΥ¢¥¯¥·¥ç¥ó (%d) ¤Ï̵»ë¤µ¤ì¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:116
-msgid "Usage to add photos:\n"
+#: ../tests/test-photos.c:39
+#, 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 <¥Þ¥¦¥ó¥È¾ì½ê> <¥¢¥ë¥Ð¥à̾> [<¥Õ¥¡¥¤¥ë̾>]\n"
+"  ¥Þ¥¹¥¿¡¼¥¢¥ë¥Ð¥à¤Ë¤Î¤ß¼Ì¿¿¤òÄɲ乤ë¾ì¹ç¤Ï, <albumname> ¤ò 'NULL' ¤È¤·¤Æ¤¯"
+"¤À\n"
+"  ¤µ¤¤. ¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Ê¤¤¤È, ¶õ¤Î¥¢¥ë¥Ð¥à¤¬ºîÀ®¤µ¤ì¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:117
+#: ../tests/test-photos.c:40
 #, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+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:118
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
+"¤¹¤Ù¤Æ¤Î¼Ì¿¿¤Î ID ¤òɸ½à½ÐÎϤ˽ÐÎϤ¹¤ë:\n"
+"  %s list <¥Þ¥¦¥ó¥È¾ì½ê>\n"
 
-#: ../tests/test-photos.c:119
-msgid "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
+"¼Ì¿¿ ID ¤ò ¥é¥¤¥Ö¥é¥ê¤«¤éºï½ü¤¹¤ë:\n"
+"  %s remove <¥Þ¥¦¥ó¥È¾ì½ê> <¥¢¥ë¥Ð¥à̾> [<ID(s)>]\n"
+"  <¥¢¥ë¥Ð¥à̾> ¤ò 'NULL' ¤Ë¤¹¤ë¤È¤½¤Î¼Ì¿¿¤ò iPod ¤«¤é´°Á´¤Ëºï½ü¤·¤Þ¤¹.\n"
+"  ID ¤ò»ØÄꤷ¤Ê¤¤¤È, ¥¢¥ë¥Ð¥à¤½¤Î¤â¤Î¤òºï½ü¤·¤Þ¤¹.\n"
+"  ·Ù¹ð: PhotoDB ¥Õ¥¡¥¤¥ë¤ò¹¹¿·¤¹¤ë¤È ID ¤âÊѲ½¤·¤Æ¤¤¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹.\n"
 
-#: ../tests/test-photos.c:120
-msgid "Usage to dump all photos to <output_dir>:\n"
-msgstr ""
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
+msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¿ô¤Î¿ô¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó.\n"
 
-#: ../tests/test-photos.c:121
+#: ../tests/test-photos.c:135
 #, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr ""
-
-#: ../tests/test-photos.c:133
-#, fuzzy, c-format
 msgid "Error creating '%s' (mkdir)\n"
-msgstr "'%s' ¤Îºï½üÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£(%s)"
+msgstr "'%s' ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó (mkdir)\n"
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
-msgstr ""
+msgstr "'%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó\n"
 
-#: ../tests/test-photos.c:148
-#, fuzzy, c-format
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database (%s).\n"
-msgstr "'%s' ¤ò '%s' ¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£(%s)"
+msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s).\n"
 
-#: ../tests/test-photos.c:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 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
+msgid "Insufficient number of command line arguments.\n"
+msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¿ô¤Î¿ô¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó.\n"
+
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr "<̵̾¤·>"
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
 msgstr ""
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:243
 #, 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:174
+#: ../tests/test-photos.c:249
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
 msgstr ""
+"iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó. ¿·µ¬¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Þ¤¹.\n"
 
-#~ msgid "Writing to '%s' failed."
-#~ msgstr "'%s'¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"
+#: ../tests/test-photos.c:274
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "¼Ì¿¿ (%s) ¤ÎÄɲä˼ºÇÔ¤·¤Þ¤·¤¿: %s\n"
+
+#: ../tests/test-photos.c:320
+msgid "Error reading iPod photo database"
+msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó"
+
+#: ../tests/test-photos.c:331
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "»ØÄꤵ¤ì¤¿¥¢¥ë¥Ð¥à '%s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó. Ãæ»ß¤·¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:343
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "¼Ì¿¿¥é¥¤¥Ö¥é¥ê¤òºï½ü¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. Ãæ»ß¤·¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:364
+#, fuzzy, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "¼Ì¿¿ ID <%d> ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó. Èô¤Ð¤·¤Þ¤¹...\n"
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "̤ÃΤΥ³¥Þ¥ó¥É '%s'\n"

Modified: libgpod/trunk/po/sv.po
===================================================================
--- libgpod/trunk/po/sv.po	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/po/sv.po	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,34 +1,39 @@
 # Translation of gtkpod to Swedish.
 # This file is distributed under the same license as gtkpod.
-# Copyright (C) Stefan Asserhäll <stefan.asserhall at comhem.se>, 2004, 2005.
+# Copyright (C) Stefan Asserhäll <stefan.asserhall at comhem.se>, 2004, 2005, 2007.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: sv\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 18:02+0900\n"
-"PO-Revision-Date: 2006-05-26 00:41+0900\n"
+"POT-Creation-Date: 2007-01-15 22:30+0900\n"
+"PO-Revision-Date: 2007-01-14 15:53+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"
 "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.2\n"
+"X-Generator: KBabel 1.11.4\n"
 
-#: ../src/db-artwork-parser.c:133
+#: ../src/db-artwork-parser.c:131
 #, c-format
 msgid "Unexpected mhod3 string type: %d\n"
 msgstr "Oväntad mhod3 strängtyp; %d\n"
 
-#: ../src/db-artwork-parser.c:360
+#: ../src/db-artwork-parser.c:265
 #, c-format
-msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"
+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:291
+#, 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)"
+"= %d)\n"
 
-#: ../src/db-artwork-parser.c:515
+#: ../src/db-artwork-parser.c:459
 #, c-format
 msgid "Unexpected mhsd index: %d\n"
 msgstr "Oväntat mhsd index: %d\n"
@@ -36,23 +41,32 @@
 #: ../src/db-image-parser.c:118
 #, c-format
 msgid "Unexpected image type in mhni: size: %ux%u (%d), offset: %d\n"
-msgstr ""
+msgstr "Oväntad bildtyp i mhni: storlek: %ux%u (%d), position: %d\n"
 
-#: ../src/itdb_artwork.c:306
+#: ../src/itdb_artwork.c:198
 #, c-format
+msgid "Could not access file '%s'."
+msgstr "Kunde inte komma åt filen '%s'."
+
+#: ../src/itdb_artwork.c:215 ../src/itdb_artwork.c:276
+msgid "Artwork support not compiled into libgpod."
+msgstr "Grafikstöd inte kompilerat i libgpod."
+
+#: ../src/itdb_artwork.c:334
+#, c-format
 msgid "Illegal filename: '%s'.\n"
 msgstr "Ogiltigt filnamn: '%s'.\n"
 
-#: ../src/itdb_artwork.c:312
+#: ../src/itdb_artwork.c:340
 msgid "Mountpoint not set.\n"
 msgstr "Monteringsplats inte inställd.\n"
 
-#: ../src/itdb_artwork.c:387
+#: ../src/itdb_artwork.c:493
 #, c-format
 msgid "Could not find on iPod: '%s'\n"
 msgstr "Kunde inte hitta på iPod: '%s'\n"
 
-#: ../src/itdb_artwork.c:587
+#: ../src/itdb_artwork.c:701
 #, c-format
 msgid ""
 "Unable to retreive thumbnail (appears to be on iPod, but no image info "
@@ -63,160 +77,160 @@
 
 #: ../src/itdb_device.c:170
 msgid "Invalid"
-msgstr ""
+msgstr "Ogiltig"
 
 #: ../src/itdb_device.c:171 ../src/itdb_device.c:197
 msgid "Unknown"
-msgstr ""
+msgstr "Okänd"
 
 #: ../src/itdb_device.c:172
 msgid "Color"
-msgstr ""
+msgstr "Färg"
 
 #: ../src/itdb_device.c:173
 msgid "Color U2"
-msgstr ""
+msgstr "Färg U2"
 
 #: ../src/itdb_device.c:174
 msgid "Grayscale"
-msgstr ""
+msgstr "Gråskala"
 
 #: ../src/itdb_device.c:175
 msgid "Grayscale U2"
-msgstr ""
+msgstr "Gråskala U2"
 
 #: ../src/itdb_device.c:176
 msgid "Mini (Silver)"
-msgstr ""
+msgstr "Mini (silver)"
 
 #: ../src/itdb_device.c:177
 msgid "Mini (Blue)"
-msgstr ""
+msgstr "Mini (blå)"
 
 #: ../src/itdb_device.c:178
 msgid "Mini (Pink)"
-msgstr ""
+msgstr "Mini (rosa)"
 
 #: ../src/itdb_device.c:179
 msgid "Mini (Green)"
-msgstr ""
+msgstr "Mini (grön)"
 
 #: ../src/itdb_device.c:180
 msgid "Mini (Gold)"
-msgstr ""
+msgstr "Mini (guld)"
 
 #: ../src/itdb_device.c:181
 msgid "Shuffle"
-msgstr ""
+msgstr "Shuffle"
 
 #: ../src/itdb_device.c:182
 msgid "Nano (White)"
-msgstr ""
+msgstr "Nano (vit)"
 
 #: ../src/itdb_device.c:183
 msgid "Nano (Black)"
-msgstr ""
+msgstr "Nano (svart)"
 
 #: ../src/itdb_device.c:184
 msgid "Video (White)"
-msgstr ""
+msgstr "Video (vit)"
 
 #: ../src/itdb_device.c:185
 msgid "Video (Black)"
-msgstr ""
+msgstr "Video (svart)"
 
 #: ../src/itdb_device.c:186
 msgid "Mobile (1)"
-msgstr ""
+msgstr "Mobil (1)"
 
 #: ../src/itdb_device.c:187
 msgid "Video U2"
-msgstr ""
+msgstr "Video U2"
 
 #: ../src/itdb_device.c:188
 msgid "Nano (Silver)"
-msgstr ""
+msgstr "Nano (silver)"
 
 #: ../src/itdb_device.c:189
 msgid "Nano (Blue)"
-msgstr ""
+msgstr "Nano (blå)"
 
 #: ../src/itdb_device.c:190
 msgid "Nano (Green)"
-msgstr ""
+msgstr "Nano (grön)"
 
 #: ../src/itdb_device.c:191
 msgid "Nano (Pink)"
-msgstr ""
+msgstr "Nano (rosa)"
 
 #: ../src/itdb_device.c:198
 msgid "First Generation"
-msgstr ""
+msgstr "Första generationen"
 
 #: ../src/itdb_device.c:199
 msgid "Second Generation"
-msgstr ""
+msgstr "Andra generationen"
 
 #: ../src/itdb_device.c:200
 msgid "Third Generation"
-msgstr ""
+msgstr "Tredje generationen"
 
 #: ../src/itdb_device.c:201
 msgid "Fourth Generation"
-msgstr ""
+msgstr "Fjärde generationen"
 
 #: ../src/itdb_device.c:202
 msgid "Fifth Generation"
-msgstr ""
+msgstr "Femte generationen"
 
 #: ../src/itdb_device.c:203
 msgid "Sixth Generation"
-msgstr ""
+msgstr "Sjätte generationen"
 
 #: ../src/itdb_device.c:204
 msgid "Mobile Phone"
-msgstr ""
+msgstr "Mobiltelefon"
 
-#: ../src/itdb_device.c:449
-#, fuzzy, c-format
+#: ../src/itdb_device.c:450
+#, c-format
 msgid "Could not open '%s' for writing."
-msgstr "Fel när '%s' skulle öppnas för skrivning (%s)."
+msgstr "Kunde inte öppna '%s' för skrivning."
 
-#: ../src/itdb_device.c:458
+#: ../src/itdb_device.c:459
 msgid "Device directory does not exist."
-msgstr ""
+msgstr "Enhetskatalog finns inte."
 
-#: ../src/itdb_itunesdb.c:371
+#: ../src/itdb_itunesdb.c:419
 #, 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:825
+#: ../src/itdb_itunesdb.c:873
 #, c-format
 msgid "Not a Play Counts file: '%s' (missing mhdp header)."
 msgstr "Inte en uppspelningsdatafil: '%s' (saknar mhdp-huvud)."
 
-#: ../src/itdb_itunesdb.c:840
+#: ../src/itdb_itunesdb.c:888
 #, 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:853
+#: ../src/itdb_itunesdb.c:902
 #, 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:931
+#: ../src/itdb_itunesdb.c:981
 #, 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:1250
+#: ../src/itdb_itunesdb.c:1300
 #, 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:1407
+#: ../src/itdb_itunesdb.c:1462
 #, c-format
 msgid ""
 "Length of smart playlist rule field (%d) not as expected. Trying to continue "
@@ -225,12 +239,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:1439
+#: ../src/itdb_itunesdb.c:1494
 #, 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:1452
+#: ../src/itdb_itunesdb.c:1507
 #, c-format
 msgid ""
 "Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
@@ -240,13 +254,13 @@
 "den.\n"
 "\n"
 
-#: ../src/itdb_itunesdb.c:1514
+#: ../src/itdb_itunesdb.c:1577
 #, 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'."
 
-#: ../src/itdb_itunesdb.c:1527
+#: ../src/itdb_itunesdb.c:1590
 #, c-format
 msgid ""
 "iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
@@ -254,7 +268,7 @@
 "iTunes databas skadad: NÃ¥gon sektion '%s' hittades inte i sektion '%s' med "
 "början på %ld."
 
-#: ../src/itdb_itunesdb.c:1541
+#: ../src/itdb_itunesdb.c:1604
 #, c-format
 msgid ""
 "header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
@@ -262,12 +276,12 @@
 msgstr ""
 "Huvudlängd för '%s' mindre än väntat (%d < %d) på position %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:1626
+#: ../src/itdb_itunesdb.c:1689
 #, c-format
 msgid "Not a iTunesDB: '%s' (missing mhdb header)."
 msgstr "Inte en iTunes databas: '%s' (saknar mhdb-huvud)."
 
-#: ../src/itdb_itunesdb.c:1643
+#: ../src/itdb_itunesdb.c:1706
 #, c-format
 msgid ""
 "iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
@@ -276,39 +290,39 @@
 "iTunes databas ('%s'): Huvudlängd för mhsd-data mindre än väntat (%d < 32). "
 "Avbryter."
 
-#: ../src/itdb_itunesdb.c:1664
+#: ../src/itdb_itunesdb.c:1727
 #, 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:1781
+#: ../src/itdb_itunesdb.c:1844
 #, 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:1799
+#: ../src/itdb_itunesdb.c:1862
 #, c-format
 msgid "Itdb_Track ID '%d' not found.\n"
 msgstr "ITunes databas spår-id '%d' hittades inte.\n"
 
-#: ../src/itdb_itunesdb.c:1956
+#: ../src/itdb_itunesdb.c:2024
 #, 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:1966
+#: ../src/itdb_itunesdb.c:2034
 msgid "Master-PL"
 msgstr "Huvudspellista"
 
-#: ../src/itdb_itunesdb.c:1970
+#: ../src/itdb_itunesdb.c:2038
 msgid "Podcasts"
 msgstr "Podradiosändningar"
 
-#: ../src/itdb_itunesdb.c:1972
+#: ../src/itdb_itunesdb.c:2040
 msgid "Playlist"
 msgstr "Spellista"
 
-#: ../src/itdb_itunesdb.c:1994
+#: ../src/itdb_itunesdb.c:2062
 #, c-format
 msgid ""
 "iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
@@ -317,38 +331,38 @@
 "iTunes databas skadad: Antal mhip sektioner inte konsekvent i mhyp med "
 "början på %ld i filen '%s'."
 
-#: ../src/itdb_itunesdb.c:2279
+#: ../src/itdb_itunesdb.c:2375
 msgid "OTG Playlist"
 msgstr "OTG-spellista"
 
-#: ../src/itdb_itunesdb.c:2297
+#: ../src/itdb_itunesdb.c:2393
 #, 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:2311
+#: ../src/itdb_itunesdb.c:2407
 #, 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:2323
+#: ../src/itdb_itunesdb.c:2419
 #, c-format
 msgid ""
 "OTG playlist file file ('%s'): entry length smaller than expected (%d<4)."
 msgstr "OTG-spellistefil ('%s'): Postlängd mindre än väntat (%d < 4)"
 
-#: ../src/itdb_itunesdb.c:2358
+#: ../src/itdb_itunesdb.c:2454
 #, 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:2403
+#: ../src/itdb_itunesdb.c:2499
 #, c-format
 msgid "OTG Playlist %d"
 msgstr "OTG-spellista %d"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2471
+#: ../src/itdb_itunesdb.c:2567
 msgid ""
 "iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
 "continue.\n"
@@ -357,7 +371,7 @@
 "fortsätta.\n"
 
 #. this should not be -- issue warning
-#: ../src/itdb_itunesdb.c:2534
+#: ../src/itdb_itunesdb.c:2630
 msgid ""
 "iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
 "Trying to continue.\n"
@@ -365,7 +379,7 @@
 "iTunes databas möjligen skadad: Antal spellistor (mhyp-data) inte "
 "konsekvent. Försöker fortsätta.\n"
 
-#: ../src/itdb_itunesdb.c:2581
+#: ../src/itdb_itunesdb.c:2677
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
@@ -374,7 +388,7 @@
 "iTunes databas '%s' skadad: Kunde inte hitta spårlista (någon mhsd av typ 1 "
 "hittades inte)"
 
-#: ../src/itdb_itunesdb.c:2610
+#: ../src/itdb_itunesdb.c:2706
 #, c-format
 msgid ""
 "iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
@@ -383,168 +397,275 @@
 "iTunes databas '%s' skadad: Kunde inte hitta spellistor (någon mhsd av typ 2 "
 "eller typ 3 hittades)"
 
-#: ../src/itdb_itunesdb.c:2632
+#: ../src/itdb_itunesdb.c:2728
 #, c-format
 msgid "iTunes directory not found: '%s' (or similar)."
 msgstr "iTunes katalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:2649
+#: ../src/itdb_itunesdb.c:2745
 #, c-format
 msgid "Music directory not found: '%s' (or similar)."
 msgstr "Musikkatalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:2667
+#: ../src/itdb_itunesdb.c:2763
 #, c-format
 msgid "Control directory not found: '%s' (or similar)."
 msgstr "Styrkatalog hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:2740
+#: ../src/itdb_itunesdb.c:2836
 #, c-format
 msgid "File not found: '%s'."
 msgstr "Filen hittades inte: '%s'."
 
-#: ../src/itdb_itunesdb.c:3542
+#: ../src/itdb_itunesdb.c:3654
 #, c-format
 msgid "Cannot write mhod of type %d\n"
 msgstr "Kan inte skriva mhod av typen %d\n"
 
-#: ../src/itdb_itunesdb.c:4098
-#, fuzzy, c-format
+#: ../src/itdb_itunesdb.c:4245
+#, c-format
 msgid "Opening of '%s' for writing failed (%s)."
-msgstr "Fel när '%s' skulle öppnas för skrivning."
+msgstr "Fel när '%s' skulle öppnas för skrivning (%s)."
 
-#: ../src/itdb_itunesdb.c:4109 ../src/itdb_itunesdb.c:4120
+#: ../src/itdb_itunesdb.c:4256 ../src/itdb_itunesdb.c:4267
 #, c-format
 msgid "Writing to '%s' failed (%s)."
 msgstr "Fel vid skrivning till '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4470
+#: ../src/itdb_itunesdb.c:4617
 #, c-format
 msgid "Path not found: '%s' (or similar)."
 msgstr "Sökväg hittades inte: '%s' (eller liknande)."
 
-#: ../src/itdb_itunesdb.c:4689
+#: ../src/itdb_itunesdb.c:4836
 #, c-format
 msgid "Error renaming '%s' to '%s' (%s)."
 msgstr "Fel vid byte av namn på '%s' till '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4706 ../src/itdb_itunesdb.c:4723
+#: ../src/itdb_itunesdb.c:4853 ../src/itdb_itunesdb.c:4870
 #, c-format
 msgid "Error removing '%s' (%s)."
 msgstr "Fel vid borttagning av '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:4909
+#: ../src/itdb_itunesdb.c:5056
 #, c-format
 msgid "No 'F..' directories found in '%s'."
 msgstr "NÃ¥gra 'F..'-kataloger hittades inte i '%s'."
 
-#: ../src/itdb_itunesdb.c:4937
+#: ../src/itdb_itunesdb.c:5084
 #, c-format
 msgid "Path not found: '%s'."
 msgstr "Sökväg hittades inte: '%s'."
 
-#: ../src/itdb_itunesdb.c:5096
+#: ../src/itdb_itunesdb.c:5243
 #, 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:5107
+#: ../src/itdb_itunesdb.c:5254
 #, c-format
 msgid "Error opening '%s' for writing (%s)."
 msgstr "Fel när '%s' skulle öppnas för skrivning (%s)."
 
-#: ../src/itdb_itunesdb.c:5124
+#: ../src/itdb_itunesdb.c:5271
 #, c-format
 msgid "Error while reading from '%s' (%s)."
 msgstr "Fel vid läsning från '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5140
+#: ../src/itdb_itunesdb.c:5287
 #, c-format
 msgid "Error while writing to '%s' (%s)."
 msgstr "Fel vid skrivning till '%s' (%s)."
 
-#: ../src/itdb_itunesdb.c:5153 ../src/itdb_itunesdb.c:5163
+#: ../src/itdb_itunesdb.c:5300 ../src/itdb_itunesdb.c:5310
 #, c-format
 msgid "Error when closing '%s' (%s)."
 msgstr "Fel när '%s' skulle stängas (%s)."
 
-#: ../src/itdb_itunesdb.c:5526
+#: ../src/itdb_itunesdb.c:5673
 msgid "iPod"
-msgstr ""
+msgstr "iPod"
 
-#: ../src/itdb_itunesdb.c:5919
+#: ../src/itdb_itunesdb.c:6066
 #, c-format
 msgid "Problem creating iPod directory or file: '%s'."
-msgstr ""
+msgstr "Problem att skapa iPod-katalog eller fil: '%s'."
 
-#: ../src/itdb_photoalbum.c:25
-#, fuzzy, c-format
+#: ../src/itdb_photoalbum.c:107
+#, c-format
 msgid "Photos directory not found: '%s' (or similar)."
-msgstr "Styrkatalog hittades inte: '%s' (eller liknande)."
+msgstr "Fotokatalog hittades inte: '%s' (eller liknande)."
 
+#: ../src/itdb_photoalbum.c:245 ../src/itdb_photoalbum.c:442
+msgid "Photo Library"
+msgstr "Fotobibliotek"
+
+#: ../src/itdb_photoalbum.c:357
+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."
+
+#: ../src/itdb_photoalbum.c:378
+#, 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 ""
+"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:390
+#, 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:430
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Oväntat fel i itdb_photodb_add_photo_internal() vid tillägg av foto. "
+"Rapportera gärna felet."
+
+#: ../src/itdb_photoalbum.c:450
+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: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:116
-msgid "Usage to add photos:\n"
+#: ../tests/test-photos.c:39
+#, 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 ""
+"Användning för att lägga till foton:\n"
+"  %s add <monteringsplats> <albumnamn> [<filnamn>]\n"
+"  <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:117
+#: ../tests/test-photos.c:40
 #, c-format
-msgid "%s <mountpoint> <albumname> <filename(s)>\n"
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
 msgstr ""
+"Användning för att lagra alla foton i <utdatakatalog>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
 
-#: ../tests/test-photos.c:118
+#: ../tests/test-photos.c:41
+#, c-format
 msgid ""
-"albumname should be set to 'master' to add photos to the master photo album\n"
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
 msgstr ""
+"Användning för att lista id för alla foton på standardutmatningen:\n"
+"  %s list <mountpoint>\n"
 
-#: ../tests/test-photos.c:119
-msgid "\n"
+#: ../tests/test-photos.c:42
+#, 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 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 ""
+"Användning för att ta bort id för foton från fotobiblioteket:\n"
+"  %s remove <monteringsplats> <albumnamn> [<id>]\n"
+"  <albumnamn> ska vara 'NULL' för att ta bort foton från iPod\n"
+"  permanent. Om inget id anges, tas fotoalbumet bort\n"
+"  instället.\n"
+"  VARNING: Id kan ändras när filen PhotoDB skrivs.\n"
 
-#: ../tests/test-photos.c:120
-msgid "Usage to dump all photos to <output_dir>:\n"
-msgstr ""
+#: ../tests/test-photos.c:126
+msgid "Wrong number of command line arguments.\n"
+msgstr "Fel antal kommandoradsväljare.\n"
 
-#: ../tests/test-photos.c:121
+#: ../tests/test-photos.c:135
 #, c-format
-msgid "%s dump <mountpoint> <output_dir>\n"
-msgstr ""
-
-#: ../tests/test-photos.c:133
-#, fuzzy, c-format
 msgid "Error creating '%s' (mkdir)\n"
-msgstr "Fel vid borttagning av '%s' (%s)."
+msgstr "Fel när '%s' skulle skapas (mkdir)\n"
 
-#: ../tests/test-photos.c:139
+#: ../tests/test-photos.c:141
 #, c-format
 msgid "Error: '%s' is not a directory\n"
-msgstr ""
+msgstr "Fel: '%s' är inte en katalog\n"
 
-#: ../tests/test-photos.c:148
-#, fuzzy, c-format
+#: ../tests/test-photos.c:150 ../tests/test-photos.c:184
+#: ../tests/test-photos.c:313
+#, c-format
 msgid "Error reading iPod photo database (%s).\n"
-msgstr "Fel vid byte av namn på '%s' till '%s' (%s)."
+msgstr "Fel vid vid läsning av iPod fotodatabas (%s).\n"
 
-#: ../tests/test-photos.c:154
+#: ../tests/test-photos.c:156 ../tests/test-photos.c:190
 msgid "Error reading iPod photo database.\n"
-msgstr ""
+msgstr "Fel vid läsning av iPod fotodatabas.\n"
 
-#: ../tests/test-photos.c:168
+#: ../tests/test-photos.c:174 ../tests/test-photos.c:233
+#: ../tests/test-photos.c:303 ../tests/test-photos.c:386
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Otillräckligt antal kommandoradsväljare.\n"
+
+#: ../tests/test-photos.c:201
+msgid "<Unnamed>"
+msgstr "<Namnlös>"
+
+#: ../tests/test-photos.c:216
+msgid "<No members>\n"
+msgstr "<Inga medlemmar>\n"
+
+#: ../tests/test-photos.c:243
 #, c-format
 msgid ""
 "Error reading iPod photo database (%s).\n"
 "Will attempt to create a new database.\n"
 msgstr ""
+"Fel vid läsning av iPod fotodatabas (%s).\n"
+"Försöker skapa en ny databas.\n"
 
-#: ../tests/test-photos.c:174
+#: ../tests/test-photos.c:249
 msgid ""
 "Error reading iPod photo database, will attempt to create a new database\n"
-msgstr ""
+msgstr "Fel vid läsning av iPod fotodatabas, försöker skapa en ny databas\n"
 
-#~ msgid "Writing to '%s' failed."
-#~ msgstr "Fel vid skrivning till '%s'."
+#: ../tests/test-photos.c:274
+#, 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:320
+msgid "Error reading iPod photo database"
+msgstr "Fel vid läsning av iPod fotodatabas"
+
+#: ../tests/test-photos.c:331
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "Angivet album '%s' hittades inte. Avbryter.\n"
+
+#: ../tests/test-photos.c:343
+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
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "Fel: Kunde inte hitta foto med id <%d>. Hoppar över det...\n"
+
+#: ../tests/test-photos.c:410
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Okänt kommando '%s'\n"

Copied: libgpod/trunk/py-compile (from rev 167, libgpod/branches/upstream/current/py-compile)

Modified: libgpod/trunk/src/Makefile.am
===================================================================
--- libgpod/trunk/src/Makefile.am	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/Makefile.am	2007-01-25 10:46:30 UTC (rev 168)
@@ -22,13 +22,14 @@
 	itdb_device.c \
 	itdb_device.h \
 	itdb_endianness.h \
+	pixmaps.c \
+	pixmaps.h \
 	glib-compat.h
 
 
 libgpod_la_headers = itdb.h
 libgpod_la_noinst_headers = itdb_private.h hal-common.h
-libgpod_la_LDFLAGS = -version-info $(LIBGPOD_CURRENT):$(LIBGPOD_REVISION):$(LIBGPOD_AGE) \
-        -no-undefined
+libgpod_la_LDFLAGS = -version-info $(LIBGPOD_SO_VERSION) -no-undefined
 
 libgpodincludedir = $(includedir)/gpod-1.0/gpod
 libgpodinclude_HEADERS = $(libgpod_la_headers)

Modified: libgpod/trunk/src/Makefile.in
===================================================================
--- libgpod/trunk/src/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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,6 +14,7 @@
 
 @SET_MAKE@
 
+
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -21,7 +22,6 @@
 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
@@ -35,7 +35,55 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+subdir = src
+DIST_COMMON = $(libgpodinclude_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+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 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(libgpodincludedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libgpod_la_LIBADD =
+am_libgpod_la_OBJECTS = itdb_artwork.lo itdb_itunesdb.lo \
+	itdb_playlist.lo itdb_photoalbum.lo itdb_track.lo \
+	db-artwork-parser.lo db-parse-context.lo db-artwork-debug.lo \
+	db-image-parser.lo db-artwork-writer.lo ithumb-writer.lo \
+	itdb_device.lo pixmaps.lo
+libgpod_la_OBJECTS = $(am_libgpod_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -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)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libgpod_la_SOURCES)
+DIST_SOURCES = $(libgpod_la_SOURCES)
+libgpodincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(libgpodinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +168,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = $(LIBGPOD_LIBS)
@@ -178,6 +224,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +251,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -217,7 +266,6 @@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 lib_LTLIBRARIES = libgpod.la
-
 libgpod_la_SOURCES = \
 	itdb.h           \
 	itdb_artwork.c   \
@@ -240,97 +288,73 @@
 	itdb_device.c \
 	itdb_device.h \
 	itdb_endianness.h \
+	pixmaps.c \
+	pixmaps.h \
 	glib-compat.h
 
-
 libgpod_la_headers = itdb.h
 libgpod_la_noinst_headers = itdb_private.h hal-common.h
-libgpod_la_LDFLAGS = -version-info $(LIBGPOD_CURRENT):$(LIBGPOD_REVISION):$(LIBGPOD_AGE) \
-        -no-undefined
-
-
+libgpod_la_LDFLAGS = -version-info $(LIBGPOD_SO_VERSION) -no-undefined
 libgpodincludedir = $(includedir)/gpod-1.0/gpod
 libgpodinclude_HEADERS = $(libgpod_la_headers)
-
 INCLUDES = $(LIBGPOD_CFLAGS)
-subdir = src
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(lib_LTLIBRARIES)
-
-libgpod_la_LIBADD =
-am_libgpod_la_OBJECTS = itdb_artwork.lo itdb_itunesdb.lo \
-	itdb_playlist.lo itdb_photoalbum.lo itdb_track.lo \
-	db-artwork-parser.lo db-parse-context.lo db-artwork-debug.lo \
-	db-image-parser.lo db-artwork-writer.lo ithumb-writer.lo \
-	itdb_device.lo
-libgpod_la_OBJECTS = $(am_libgpod_la_OBJECTS)
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
- at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/db-artwork-debug.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/db-artwork-parser.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/db-artwork-writer.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/db-image-parser.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/db-parse-context.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/itdb_artwork.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/itdb_device.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/itdb_itunesdb.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/itdb_photoalbum.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/itdb_playlist.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/itdb_track.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/ithumb-writer.Plo
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
-	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(libgpod_la_SOURCES)
-HEADERS = $(libgpodinclude_HEADERS)
-
-DIST_COMMON = $(libgpodinclude_HEADERS) $(srcdir)/Makefile.in \
-	Makefile.am
-SOURCES = $(libgpod_la_SOURCES)
-
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  src/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-libLTLIBRARIES_INSTALL = $(INSTALL)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
 	  if test -f $$p; then \
-	    f="`echo $$p | sed -e 's|^.*/||'`"; \
-	    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; \
+	    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"; \
 	  else :; fi; \
 	done
 
 uninstall-libLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	    p="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
-	  $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+	@set -x; 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"; \
 	done
 
 clean-libLTLIBRARIES:
 	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
 	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" = "$$p" && dir=.; \
+	  test "$$dir" != "$$p" || dir=.; \
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
@@ -338,7 +362,7 @@
 	$(LINK) -rpath $(libdir) $(libgpod_la_LDFLAGS) $(libgpod_la_OBJECTS) $(libgpod_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
 	-rm -f *.tab.c
@@ -355,39 +379,28 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_playlist.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_track.Plo at am__quote@
 @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@
 
 .c.o:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -398,33 +411,24 @@
 distclean-libtool:
 	-rm -f libtool
 uninstall-info-am:
-libgpodincludeHEADERS_INSTALL = $(INSTALL_HEADER)
 install-libgpodincludeHEADERS: $(libgpodinclude_HEADERS)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(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="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(libgpodincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libgpodincludedir)/$$f"; \
-	  $(libgpodincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libgpodincludedir)/$$f; \
+	  f=$(am__strip_dir) \
+	  echo " $(libgpodincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libgpodincludedir)/$$f'"; \
+	  $(libgpodincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libgpodincludedir)/$$f"; \
 	done
 
 uninstall-libgpodincludeHEADERS:
 	@$(NORMAL_UNINSTALL)
 	@list='$(libgpodinclude_HEADERS)'; for p in $$list; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(libgpodincludedir)/$$f"; \
-	  rm -f $(DESTDIR)$(libgpodincludedir)/$$f; \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libgpodincludedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(libgpodincludedir)/$$f"; \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -433,6 +437,7 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -444,10 +449,11 @@
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -470,11 +476,7 @@
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -487,7 +489,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -505,9 +507,10 @@
 check-am: all-am
 check: check-am
 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(libgpodincludedir)
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgpodincludedir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -527,7 +530,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -547,6 +550,8 @@
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
@@ -585,8 +590,8 @@
 .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 info info-am install \
-	install-am install-data install-data-am install-exec \
+	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-libLTLIBRARIES install-libgpodincludeHEADERS \
 	install-man install-strip installcheck installcheck-am \

Modified: libgpod/trunk/src/db-artwork-debug.c
===================================================================
--- libgpod/trunk/src/db-artwork-debug.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/db-artwork-debug.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -148,10 +148,10 @@
 	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 ("\tUnknown4: %08x\n", GINT_FROM_LE (mhii->unknown4));
-	g_print ("\tUnknown5: %08x\n", GINT_FROM_LE (mhii->unknown5));
+	g_print ("\tRating: %08x\n", GINT_FROM_LE (mhii->rating));
 	g_print ("\tUnknown6: %08x\n", GINT_FROM_LE (mhii->unknown6));
 	g_print ("\tOrig Date: %08x\n", GINT_FROM_LE (mhii->orig_date));
-	g_print ("\tDigitised Date: %08x\n", GINT_FROM_LE (mhii->digitised_date));
+	g_print ("\tDigitised Date: %08x\n", GINT_FROM_LE (mhii->digitized_date));
 	g_print ("\tImage size: %d bytes\n", GINT_FROM_LE (mhii->orig_img_size));
 }
 

Modified: libgpod/trunk/src/db-artwork-parser.c
===================================================================
--- libgpod/trunk/src/db-artwork-parser.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/db-artwork-parser.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -42,7 +42,6 @@
 
 typedef int (*ParseListItem)(DBParseContext *ctx, GError *error);
 
-#ifndef NOT_DEFINED_DEBUG_ARTWORKDB
 static Itdb_Track *
 get_song_by_dbid (Itdb_iTunesDB *db, guint64 id)
 {
@@ -58,7 +57,6 @@
 	}
 	return NULL;
 }
-#endif
 
 
 static int
@@ -79,7 +77,7 @@
 parse_mhia (DBParseContext *ctx, Itdb_PhotoAlbum *photo_album, GError *error)
 {
 	MhiaHeader *mhia;
-	gint image_id;
+	guint32 image_id;
 
 	mhia = db_parse_context_get_m_header (ctx, MhiaHeader, "mhia");
 	if (mhia == NULL) {
@@ -88,7 +86,7 @@
 	dump_mhia (mhia);
 	image_id = get_gint32 (mhia->image_id, ctx->byte_order);
 	photo_album->members = g_list_append (photo_album->members,
-					      GINT_TO_POINTER(image_id));
+					      GUINT_TO_POINTER(image_id));
 	db_parse_context_set_total_len (ctx,
 					get_gint32_db (ctx->db, mhia->total_len));
 	return 0;
@@ -195,42 +193,11 @@
 }
 
 static int
-parse_mhni (DBParseContext *ctx, iPodSong *song, GError *error)
-{
-	MhniHeader *mhni;
-	DBParseContext *mhod_ctx; 
-	Itdb_Thumb *thumb;
-
-	mhni = db_parse_context_get_m_header (ctx, MhniHeader, "mhni");
-	if (mhni == NULL) {
-		return -1;
-	}
-	db_parse_context_set_total_len (ctx, get_gint32 (mhni->total_len, ctx->byte_order));
-	dump_mhni (mhni);
-	thumb = ipod_image_new_from_mhni (mhni, ctx->db);
-	if (thumb == NULL) {
-		return 0;
-	}
-
-	song->artwork->thumbnails =
-		g_list_append (song->artwork->thumbnails, thumb);
-
-	mhod_ctx = db_parse_context_get_sub_context (ctx, ctx->header_len);
-	if (mhod_ctx == NULL) {
-	  return -1;
-	}
-	parse_mhod_3 (mhod_ctx, thumb, error);
-	g_free (mhod_ctx);
-
-	return 0;
-}
-
-static int
 parse_photo_mhod (DBParseContext *ctx, Itdb_Artwork *artwork, GError *error)
 {
 	ArtworkDB_MhodHeader *mhod;
 	DBParseContext *mhni_ctx;
-	int type;
+	gint32 type;
 
 	mhod = db_parse_context_get_m_header (ctx, ArtworkDB_MhodHeader, "mhod");
 	if (mhod == NULL) {
@@ -238,13 +205,7 @@
 	}
 	db_parse_context_set_total_len (ctx, get_gint32 (mhod->total_len, ctx->byte_order));
 
-	/* The MHODs found in the ArtworkDB and Photo Database files are
-	 * significantly different than those found in the iTunesDB.
-	 * For example, the "type" is split like this:
-	 * - low 3 bytes are actual type;
-	 * - high byte is padding length of string (0-3).
-	 */
-	type = get_gint16 (mhod->type, ctx->byte_order) & 0x00FFFFFF;
+	type = get_gint16 (mhod->type, ctx->byte_order);
 
 	if ( type == MHOD_ARTWORK_TYPE_ALBUM_NAME) {
 		dump_mhod_type_1 ((MhodHeaderArtworkType1 *)mhod);
@@ -265,117 +226,86 @@
 	return 0;
 }
 static int
-parse_mhod (DBParseContext *ctx, iPodSong *song, GError *error)
-{
-	ArtworkDB_MhodHeader *mhod;
-	DBParseContext *mhni_ctx;
-	int type;
-	gint32 total_len;
-
-	mhod = db_parse_context_get_m_header (ctx, ArtworkDB_MhodHeader, "mhod");
-	if (mhod == NULL) {
-		return -1;
-	}
-	total_len = get_gint32 (mhod->total_len, ctx->byte_order);
-	db_parse_context_set_total_len (ctx, total_len);
-
-	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);
-	}
-
-	/* if this is a container... */
-	if (type == MHOD_ARTWORK_TYPE_THUMBNAIL) {
-		mhni_ctx = db_parse_context_get_sub_context (ctx, ctx->header_len);
-		if (mhni_ctx == NULL) {
-			return -1;
-		}
-		parse_mhni (mhni_ctx, song, NULL);
-		g_free (mhni_ctx);
-	}
-
-	return 0;
-}
-
-
-static int
 parse_mhii (DBParseContext *ctx, GError *error)
 {
 	MhiiHeader *mhii;
 	DBParseContext *mhod_ctx;
 	int num_children;
 	off_t cur_offset;
-	iPodSong *song;
+	iPodSong *song = NULL;
 	Itdb_Artwork *artwork;
 	Itdb_PhotoDB *photodb;
 	Itdb_iTunesDB *itunesdb;
+	guint64 dbid;
 
 	mhii = db_parse_context_get_m_header (ctx, MhiiHeader, "mhii");
-	if (mhii == NULL) {
-		return -1;
+	if (mhii == NULL)
+	{
+	    return -1;
 	}
 	db_parse_context_set_total_len (ctx, get_gint32 (mhii->total_len, ctx->byte_order));
 	dump_mhii (mhii);
 
-	switch (ctx->db->db_type) {
+	switch (ctx->db->db_type)
+	{
 	case DB_TYPE_PHOTO:
-		artwork = g_new0( Itdb_Artwork, 1 );
-		artwork->artwork_size = get_gint32 (mhii->orig_img_size, ctx->byte_order);
-		artwork->id = get_gint32 (mhii->image_id, ctx->byte_order);
-		artwork->creation_date = itdb_time_mac_to_host( get_gint32 (mhii->digitised_date, ctx->byte_order) );
-
-		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);
-			num_children--;
-			cur_offset += mhod_ctx->total_len;
-			g_free (mhod_ctx);
-			mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
-		}
-		photodb = db_get_photodb (ctx->db);
-		g_return_val_if_fail (photodb, -1);
-		photodb->photos = g_list_append (photodb->photos,
-						 artwork);
-		break;
+	    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:
-#ifdef NOT_DEFINED_DEBUG_ARTWORKDB
-		song = NULL;
-#else
-		itunesdb = db_get_itunesdb (ctx->db);
-		g_return_val_if_fail (itunesdb, -1);
-		song = get_song_by_dbid (itunesdb,
-					 get_gint64 (mhii->song_id,
-						     ctx->byte_order));
-		if (song == NULL) {
-			return -1;
-		}
-		song->artwork->artwork_size = get_gint32 (mhii->orig_img_size, ctx->byte_order);
-		if ((song->artwork_size+song->artwork_count) !=
-				song->artwork->artwork_size) {
-			g_warning (_("iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)"), song->artwork_size, song->artwork_count, song->artwork->artwork_size);
-		}
-		song->artwork->id = get_gint32 (mhii->image_id, ctx->byte_order);
-#endif
-
-		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_mhod (mhod_ctx, song, NULL);
-			num_children--;
-			cur_offset += mhod_ctx->total_len;
-			g_free (mhod_ctx);
-			mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
-		}
-		break;
+	    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);
+	    g_return_val_if_reached (-1);
 	}
+
+	artwork->id = get_gint32 (mhii->image_id, ctx->byte_order);
+	artwork->unk028 = get_gint32 (mhii->unknown4, ctx->byte_order);
+	artwork->rating = get_gint32 (mhii->rating, ctx->byte_order);
+	artwork->unk036 = get_gint32 (mhii->unknown6, ctx->byte_order);
+	artwork->creation_date = get_gint32 (mhii->orig_date, ctx->byte_order);
+	artwork->digitized_date = get_gint32 (mhii->digitized_date,
+					      ctx->byte_order);
+	artwork->artwork_size = get_gint32 (mhii->orig_img_size,
+					    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);
+	    }
+	}
+
+	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);
+	    num_children--;
+	    cur_offset += mhod_ctx->total_len;
+	    g_free (mhod_ctx);
+	    mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	}
 	return 0;
 }
 
@@ -386,7 +316,7 @@
 	ArtworkDB_MhodHeader *mhod;
 	DBParseContext *mhod_ctx;
 	DBParseContext *mhia_ctx;
-	Itdb_PhotoAlbum *photo_album;
+	Itdb_PhotoAlbum *album;
 	Itdb_PhotoDB *photodb;
 	int num_children;
 	off_t cur_offset;
@@ -399,11 +329,25 @@
 
 	dump_mhba (mhba);
 
-	photo_album = g_new0 (Itdb_PhotoAlbum, 1);
-	photo_album->num_images = get_gint32( mhba->num_mhias, ctx->byte_order);
-	photo_album->album_id = get_gint32( mhba->playlist_id, ctx->byte_order);
-	photo_album->master = get_gint32( mhba->master, ctx->byte_order);
-	photo_album->prev_album_id = get_gint32( mhba->prev_playlist_id, ctx->byte_order);
+	album = g_new0 (Itdb_PhotoAlbum, 1);
+	album->album_id = get_gint32(mhba->album_id, ctx->byte_order);
+	album->unk024 = get_gint32(mhba->unk024, ctx->byte_order);
+	album->unk028 = get_gint16(mhba->unk028, ctx->byte_order);
+	album->album_type = mhba->album_type;
+	album->playmusic = mhba->playmusic;
+	album->repeat = mhba->repeat;
+	album->random = mhba->random;
+	album->show_titles = mhba->show_titles;
+	album->transition_direction = mhba->transition_direction;
+	album->slide_duration = get_gint32(mhba->slide_duration,
+					   ctx->byte_order);
+	album->transition_duration = get_gint32(mhba->transition_duration,
+						ctx->byte_order);
+	album->unk044 = get_gint32(mhba->unk044, ctx->byte_order);
+	album->unk048 = get_gint32(mhba->unk048, ctx->byte_order);
+	album->song_id = get_gint64(mhba->song_id, ctx->byte_order);
+	album->prev_album_id = get_gint32(mhba->prev_album_id,
+					  ctx->byte_order);
 
 	cur_offset = ctx->header_len;
 	mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
@@ -415,7 +359,7 @@
 			return -1;
 		}
 		db_parse_context_set_total_len (mhod_ctx,  get_gint32(mhod->total_len, ctx->byte_order));
-		photo_album->name = g_strdup( (char *)((MhodHeaderArtworkType1*)mhod)->string );
+		album->name = g_strdup( (char *)((MhodHeaderArtworkType1*)mhod)->string );
 		cur_offset += mhod_ctx->total_len;
 		dump_mhod_type_1 ((MhodHeaderArtworkType1*)mhod);
 		g_free (mhod_ctx);
@@ -425,7 +369,7 @@
 	mhia_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
 	num_children = get_gint32 (mhba->num_mhias, ctx->byte_order);
 	while ((num_children > 0) && (mhia_ctx != NULL)) {
-		parse_mhia (mhia_ctx, photo_album, NULL);
+		parse_mhia (mhia_ctx, album, NULL);
 		num_children--;
 		cur_offset += mhia_ctx->total_len;
 		g_free (mhia_ctx);
@@ -434,7 +378,7 @@
 	photodb = db_get_photodb (ctx->db);
 	g_return_val_if_fail (photodb, -1);
 	photodb->photoalbums = g_list_append (photodb->photoalbums,
-					      photo_album);
+					      album);
 	return 0;
 }
 
@@ -766,6 +710,9 @@
 	char *filename;
 	Itdb_DB db;
 
+	GList *gl;
+	GHashTable *hash;
+
 	db.db.photodb = photodb;
 	db.db_type = DB_TYPE_PHOTO;
 
@@ -784,6 +731,35 @@
 	parse_mhfd (ctx, NULL);
 	db_parse_context_destroy (ctx, TRUE);
 
+	/* Now we need to replace references to artwork_ids in the
+	 * photo albums with references to the actual artwork
+	 * structure. Since we cannot guarantee that the list with the
+	 * photos is read before the album list, we cannot safely do
+	 * this at the time of reading the ids. */
+
+	/* Create a hash for faster lookup */
+	hash = g_hash_table_new (g_int_hash, g_int_equal);
+	for (gl=photodb->photos; gl; gl=gl->next)
+	{
+	    Itdb_Artwork *photo = gl->data;
+	    g_return_val_if_fail (photo, -1);
+	    g_hash_table_insert (hash, &photo->id, photo);
+/*	    printf ("id: %d, photo: %p\n", photo->id, photo);*/
+	}
+	for (gl=photodb->photoalbums; gl; gl=gl->next)
+	{
+	    GList *glp;
+	    Itdb_PhotoAlbum *album = gl->data;
+	    g_return_val_if_fail (album, -1);
+	    for (glp=album->members; glp; glp=glp->next)
+	    {
+		guint image_id = GPOINTER_TO_UINT (glp->data);
+		Itdb_Artwork *photo = g_hash_table_lookup (hash, &image_id);
+/*		printf ("id: %d, photo: %p\n", image_id, photo);*/
+		glp->data = photo;
+	    }
+	}
+	g_hash_table_destroy (hash);
 	return 0;
 }
 

Modified: libgpod/trunk/src/db-artwork-writer.c
===================================================================
--- libgpod/trunk/src/db-artwork-writer.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/db-artwork-writer.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -541,23 +541,26 @@
 	switch( buffer->db_type) {
 	case DB_TYPE_ITUNES:
 		song = (Itdb_Track *)data;
+		artwork = song->artwork;
 		mhii->song_id = get_gint64 (song->dbid, buffer->byte_order);
-		mhii->image_id = get_guint32 (song->artwork->id, buffer->byte_order);
-		mhii->orig_img_size = get_gint32 (song->artwork->artwork_size, 
-				buffer->byte_order);
-		it = song->artwork->thumbnails;
 		break;
 	case DB_TYPE_PHOTO:
 		artwork = (Itdb_Artwork *)data;
 		mhii->song_id = get_gint64 (artwork->id + 2, buffer->byte_order);
-		mhii->image_id = get_guint32 (artwork->id, buffer->byte_order);
-		mhii->orig_date = get_guint32 (itdb_time_host_to_mac( artwork->creation_date )
-				, buffer->byte_order);
-		mhii->digitised_date = get_guint32 (itdb_time_host_to_mac( artwork->creation_date )
-				, buffer->byte_order);
-		it = artwork->thumbnails;
 		break;
+	default:
+	        g_return_val_if_reached (-1);
 	}
+	mhii->image_id = get_guint32 (artwork->id, buffer->byte_order);
+	mhii->unknown4 = get_gint32 (artwork->unk028, buffer->byte_order);
+	mhii->rating = get_gint32 (artwork->rating, buffer->byte_order);
+	mhii->unknown6 = get_gint32 (artwork->unk036, buffer->byte_order);
+	mhii->orig_date = get_guint32 (artwork->creation_date, buffer->byte_order);
+	mhii->digitized_date = get_guint32 (artwork->digitized_date,
+					    buffer->byte_order);
+	mhii->orig_img_size = get_gint32 (artwork->artwork_size, 
+					  buffer->byte_order);
+	it = artwork->thumbnails;
 	num_children = 0;
 	while (it != NULL) {
 		iPodBuffer *sub_buffer;
@@ -628,7 +631,7 @@
 
 		if (buffer->db_type == DB_TYPE_ITUNES) {
 			song = (Itdb_Track*)it->data;
-			if (song->artwork->id == 0) {
+			if (!song->artwork || (song->artwork->id == 0)) {
 				it = it->next;
 				continue;
 			}
@@ -671,7 +674,7 @@
 }
 
 static int
-write_mhba (Itdb_PhotoAlbum *photo_album, iPodBuffer *buffer)
+write_mhba (Itdb_PhotoAlbum *album, iPodBuffer *buffer)
 {
 	GList *it;
 	MhbaHeader *mhba;
@@ -684,10 +687,27 @@
 		return -1;
 	}
 	mhba->num_mhods = get_gint32(1, buffer->byte_order);
-	mhba->playlist_id = get_gint32(photo_album->album_id, buffer->byte_order);
-	mhba->master = get_gint32(photo_album->master, buffer->byte_order);
-	mhba->prev_playlist_id = get_gint32(photo_album->prev_album_id, buffer->byte_order);
-	mhba->num_mhias = get_gint32(photo_album->num_images, buffer->byte_order);
+	mhba->num_mhias = get_gint32(g_list_length (album->members),
+				     buffer->byte_order);
+	mhba->album_id = get_gint32(album->album_id, buffer->byte_order);
+	mhba->unk024 = get_gint32(album->unk024, buffer->byte_order);
+	mhba->unk028 = get_gint16(album->unk028, buffer->byte_order);
+	mhba->album_type = album->album_type;
+	mhba->playmusic = album->playmusic;
+	mhba->repeat = album->repeat;
+	mhba->random = album->random;
+	mhba->show_titles = album->show_titles;
+	mhba->transition_direction = album->transition_direction;
+	mhba->slide_duration = get_gint32(album->slide_duration,
+					  buffer->byte_order);
+	mhba->transition_duration = get_gint32(album->transition_duration,
+					       buffer->byte_order);
+	mhba->unk044 = get_gint32(album->unk044, buffer->byte_order);
+	mhba->unk048 = get_gint32(album->unk048, buffer->byte_order);
+	mhba->song_id = get_gint64(album->song_id, buffer->byte_order);
+	mhba->prev_album_id = get_gint32(album->prev_album_id,
+					 buffer->byte_order);
+
 	total_bytes = get_gint32 (mhba->header_len, buffer->byte_order);
 
 	/* FIXME: Write other mhods */
@@ -696,21 +716,22 @@
 	if (sub_buffer == NULL) {
 	    return -1;
 	}
-	bytes_written = write_mhod_type_1 (photo_album->name, sub_buffer);
+	bytes_written = write_mhod_type_1 (album->name, sub_buffer);
 	ipod_buffer_destroy (sub_buffer);
 	if (bytes_written == -1) {
 	    return -1;
 	} 
 	total_bytes += bytes_written;
 
-	for (it = photo_album->members; it != NULL; it = it->next) {
-		gint image_id = GPOINTER_TO_INT(it->data);
+	for (it = album->members; it != NULL; it = it->next) {
+	        Itdb_Artwork *photo = it->data;
+		g_return_val_if_fail (photo, -1);
 
 		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
 		if (sub_buffer == NULL) {
 		    return -1;
 		}
-		bytes_written = write_mhia (image_id, sub_buffer);
+		bytes_written = write_mhia (photo->id, sub_buffer);
 		ipod_buffer_destroy (sub_buffer);
 		if (bytes_written == -1) {
 		    return -1;
@@ -739,13 +760,13 @@
 	    unsigned int bytes_written;
 
 	    for (it = db_get_photodb(db)->photoalbums; it != NULL; it = it->next) {
-		Itdb_PhotoAlbum *photo_album = (Itdb_PhotoAlbum *)it->data;
+		Itdb_PhotoAlbum *album = (Itdb_PhotoAlbum *)it->data;
 
 		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
 		if (sub_buffer == NULL) {
 		    return -1;
 		}
-		bytes_written = write_mhba (photo_album, sub_buffer);
+		bytes_written = write_mhba (album, sub_buffer);
 		ipod_buffer_destroy (sub_buffer);
 		if (bytes_written == -1) {
 		    return -1;

Modified: libgpod/trunk/src/db-itunes-parser.h
===================================================================
--- libgpod/trunk/src/db-itunes-parser.h	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/db-itunes-parser.h	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,5 @@
-/*
+/*  Time-stamp: <2006-11-11 20:38:32 jcs>
+ *
  *  Copyright (C) 2005 Christophe Fergeau
  *
  * 
@@ -20,6 +21,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
+ * $Id: db-itunes-parser.h,v 1.9 2006/11/11 13:44:29 jcsjcs Exp $
  */
 
 
@@ -331,7 +333,7 @@
 	 * phones with iPod support).
 	 */
 	gint16 type;
-    gint16 unknown014;
+        gint16 unknown014;
 	gint32 unknown1;
 	gint32 unknown2;
 };
@@ -573,10 +575,10 @@
 	gint32 image_id;
 	gint64 song_id;
 	gint32 unknown4;
-	gint32 unknown5;
+	gint32 rating;
 	gint32 unknown6;
 	gint32 orig_date;
-	gint32 digitised_date;
+	gint32 digitized_date;
 	gint32 orig_img_size;
 	unsigned char padding[];
 } __attribute__((__packed__));
@@ -612,24 +614,29 @@
 	unsigned char header_id[4];
 	gint32 header_len;
 	gint32 total_len;
-	gint32 num_mhods; /* number of Data Objects in the List, probably always 1 */
-	gint32 num_mhias; /* number of pictures in the album */
-	gint32 playlist_id; /* starts out at $64 and increments by 1 */
-	gint32 unknown2; /* unknown, seems to be always 0 */
-	gint16 unknown3; /* unknown, seems to be always 0 */
-	gchar master;
-	/* FIXME: not sure if I have these right; iPod doesn't seem to listen to them */
-	guint8 playmusic;
-	guint8 repeat;
-	guint8 random;
-	guint8 show_titles;
-	guint8 transition_direction;
-	gint32 slide_duration;
-	gint32 transition_duration;
-	gint32 unknown4;
-	gint32 unknown5;
-	gint64 song_id;
-	gint32 prev_playlist_id; /* the id of the previous playlist */
+	gint32 num_mhods;  /* number of Data Objects in the List,
+			      probably always 1 */
+	gint32 num_mhias;  /* number of pictures in the album */
+	gint32 album_id;   /* starts out at $64 and increments by 1 */
+	gint32 unk024;     /* unknown, seems to be always 0 */
+	gint16 unk028;     /* unknown, seems to be always 0 */
+	guint8 album_type; /* 1 = master photo list ("Photo Library"),
+			      2 = normal album, 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) */
+        gint32 unk044;     /* unknown, seems to always be 0 */
+	gint32 unk048;     /* unknown, seems to always be 0 */
+	gint64 song_id;    /* dbid2 of track in iTunesDB to play during
+			      slideshow (from iPhoto setting) */
+	gint32 prev_album_id; /* the id of the previous photoalbum */
 	unsigned char padding[];
 };
 
@@ -656,7 +663,7 @@
 	gint32 total_len; /* probably the size of the header and all child records;
 			   * as there aren't any child records this is equal to header length */
 	gint32 unknown1; /* seems to be zero */
-	gint32 image_id; /* the id of the mhii record this mhia refers to */
+	guint32 image_id; /* the id of the mhii record this mhia refers to */
 	unsigned char padding[];
 };
 

Modified: libgpod/trunk/src/itdb.h
===================================================================
--- libgpod/trunk/src/itdb.h	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb.h	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,6 +1,6 @@
-/* Time-stamp: <2006-09-23 21:25:40 jcs>
+/* Time-stamp: <2007-01-09 23:44:56 jcs>
 |
-|  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
 | 
 |  URL: http://www.gtkpod.org/
@@ -30,7 +30,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb.h,v 1.43 2006/09/23 12:28:23 jcsjcs Exp $
+|  $Id: itdb.h,v 1.57 2007/01/11 07:10:55 tmzullinger Exp $
 */
 
 #ifndef __ITUNESDB_H__
@@ -70,74 +70,6 @@
 
 /* ------------------------------------------------------------ *\
  *
- * Thumbnail-relevant definitions
- *
-\* ------------------------------------------------------------ */
-
-/* Types of thumbnails in Itdb_Image */
-typedef enum { 
-    ITDB_THUMB_COVER_SMALL,
-    ITDB_THUMB_COVER_LARGE,
-    ITDB_THUMB_PHOTO_SMALL,
-    ITDB_THUMB_PHOTO_LARGE,
-    ITDB_THUMB_PHOTO_FULL_SCREEN,
-    ITDB_THUMB_PHOTO_TV_SCREEN
-} 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
- */
-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 */
-    guint32 offset;
-    guint32 size;
-    gint16 width;
-    gint16 height;
-    gint16 horizontal_padding;
-    gint16 vertical_padding;
-};
-
-struct _Itdb_Artwork {
-    GList *thumbnails;    /* list of Itdb_Thumbs */
-    guint32 artwork_size; /* Size in bytes of the original source image */
-    guint32 id;           /* Artwork id used by photoalbums, starts at
-			   * 0x40... libgpod will set this on sync. */
-    gint32 creation_date; /* Date the image was created */
-    /* below is for use by application */
-    guint64 usertype;
-    gpointer userdata;
-    /* function called to duplicate userdata */
-    ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
-    ItdbUserDataDestroyFunc userdata_destroy;
-};
-
-
-/* ------------------------------------------------------------ *\
- *
  * iPod model-relevant definitions
  *
 \* ------------------------------------------------------------ */
@@ -459,24 +391,94 @@
 
 /* ------------------------------------------------------------ *\
  *
- * iTunesDB, Playlists, Tracks
+ * iTunesDB, Playlists, Tracks, PhotoDB, Artwork, Thumbnails
  *
 \* ------------------------------------------------------------ */
 
 /* one star is how much (track->rating) */
 #define ITDB_RATING_STEP 20
 
+/* Types of thumbnails in Itdb_Image */
+typedef enum { 
+    ITDB_THUMB_COVER_SMALL,
+    ITDB_THUMB_COVER_LARGE,
+    ITDB_THUMB_PHOTO_SMALL,
+    ITDB_THUMB_PHOTO_LARGE,
+    ITDB_THUMB_PHOTO_FULL_SCREEN,
+    ITDB_THUMB_PHOTO_TV_SCREEN
+} 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
+ */
+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 */
+    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_Artwork {
+    GList *thumbnails;     /* list of Itdb_Thumbs */
+    guint32 id;            /* Artwork id used by photoalbums, starts at
+			    * 0x40... libgpod will set this on sync. */
+    gint32  unk028;
+    guint32 rating;        /* Rating from iPhoto * 20 (PhotoDB only) */
+    gint32  unk036;
+    guint32 creation_date; /* Date the image file was created
+			      (creation date of image file (Mac type,
+			      PhotoDB only) */
+    guint32 digitized_date;/* Date the image was taken (EXIF
+			      information, Mac type, PhotoDB only) */
+    guint32 artwork_size;  /* Size in bytes of the original source
+			      image (PhotoDB only -- don't touch in
+			      case of ArtworkDB!) */
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+};
+
+
 struct _Itdb_PhotoDB
 {
-    GList *photos;
-    GList *photoalbums;
+    GList *photos;      /* (Itdb_Artwork *)     */
+    GList *photoalbums; /* (Itdb_PhotoAlbum *)  */
     Itdb_Device *device;/* iPod device info     */
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
@@ -491,26 +493,44 @@
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
 struct _Itdb_PhotoAlbum
 {
-    gchar *name;          /* name of photoalbum in UTF8            */
-    GList *members;       /* photos in album (Track *)             */
-    gint  num_images;     /* number of photos in album             */
-    gint  master;         /* 0x01 for master, 0x00 otherwise       */
-    gint  album_id;
-    gint  prev_album_id;
+    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;
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
@@ -525,34 +545,19 @@
     gint  num;            /* number of tracks in playlist          */
     GList *members;       /* tracks in playlist (Track *)          */
     gboolean is_spl;      /* smart playlist?                       */
-    guint32 timestamp;    /* some timestamp                        */
+    guint32 timestamp;    /* timestamp of playlist creation        */
     guint64 id;           /* playlist ID                           */
-    guint32 mhodcount;    /* This appears to be the number of string
-			     MHODs (type < 50) associated with this
-			     playlist (typically 0x01). Doesn't seem
-			     to be signficant unless you include Type
-			     52 MHODs. libgpod sets this to 1 when
-			     syncing */
-    guint16 libmhodcount; /* The number of Type 52 MHODs associated
-			     with this playlist. If you don't create
-			     Type 52 MHODs, this can be
-			     zero. Otherwise, if you have Type 52
-			     MHODs associated with this playlist and
-			     set this to zero, no songs appear on the
-			     iPod. jcsjcs: with iTunes 4.9 this seems
-			     to be set to 1 even without any Type 52
-			     MHODs present. libgpod sets this to 1
-			     when syncing */
     guint32 sortorder;    /* How to sort playlist -- see below     */
     guint32 podcastflag;  /* ITDB_PL_FLAG_NORM/_PODCAST            */
     SPLPref splpref;      /* smart playlist prefs                  */
     SPLRules splrules;    /* rules for smart playlists             */
+    gpointer reserved1;   /* reserved for MHOD100 implementation   */
+    gpointer reserved2;   /* reserved for MHOD100 implementation   */
     /* below is for use by application */
     guint64 usertype;
     gpointer userdata;
-    /* function called to duplicate userdata */
+    /* functions called to duplicate/free userdata */
     ItdbUserDataDuplicateFunc userdata_duplicate;
-    /* function called to free userdata */
     ItdbUserDataDestroyFunc userdata_destroy;
 };
 
@@ -646,6 +651,14 @@
   gchar   *podcastrss;       /* see note for MHOD_ID in itdb_itunesdb.c */
   gchar   *chapterdata;      /* see note for MHOD_ID in itdb_itunesdb.c */
   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 */
+  gchar   *reserved;         /* will probably be used for artistthe     */
+/* ... to here */
   guint32 id;                /* unique ID of track     */
   gint32  size;              /* size of file in bytes  */
   gint32  tracklen;          /* Length of track in ms  */
@@ -732,13 +745,18 @@
 			 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. */  
+			 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 unk156, unk160;
+  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) */
@@ -757,7 +775,9 @@
 			 (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 */
+			 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
@@ -766,17 +786,62 @@
 			   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) */
-  guint32 unk180, unk184;
-  guint32 samplecount;/* Number of samples in the song. First observed
+  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 (not MP3?!?). */
-  guint32 unk192, unk196, unk200;
-  guint32 unk204;     /*  unknown - added in dbversion 0x0c, first
-			  values observed in 0x0d. Observed to be 0x0
-			  or 0x1. */
-  guint32 unk208, unk212, unk216, unk220, unk224;
-  guint32 unk228, unk232, unk236, unk240;
+			 files (for gapless playback). */
+  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 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 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) */
+
     /* 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
@@ -791,9 +856,8 @@
   /* below is for use by application */
   guint64 usertype;
   gpointer userdata;
-  /* function called to duplicate userdata */
+  /* functions called to duplicate/free userdata */
   ItdbUserDataDuplicateFunc userdata_duplicate;
-  /* function called to free userdata */
   ItdbUserDataDestroyFunc userdata_destroy;
 };
 /* (gtkpod note: don't forget to add fields read from the file to
@@ -829,7 +893,7 @@
 /* functions for reading/writing database, general itdb functions */
 Itdb_iTunesDB *itdb_parse (const gchar *mp, GError **error);
 Itdb_iTunesDB *itdb_parse_file (const gchar *filename, GError **error);
-gboolean itdb_write (Itdb_iTunesDB *db, GError **error);
+gboolean itdb_write (Itdb_iTunesDB *itdb, GError **error);
 gboolean itdb_write_file (Itdb_iTunesDB *itdb, const gchar *filename,
 			  GError **error);
 gboolean itdb_shuffle_write (Itdb_iTunesDB *itdb, GError **error);
@@ -939,7 +1003,7 @@
 void itdb_spl_update_all (Itdb_iTunesDB *itdb);
 void itdb_spl_update_live (Itdb_iTunesDB *itdb);
 
-/* thumbnails functions */
+/* thumbnails functions for coverart */
 /* itdb_track_... */
 gboolean itdb_track_set_thumbnails (Itdb_Track *track,
 				    const gchar *filename);
@@ -948,25 +1012,42 @@
 					      gsize image_data_len);
 void itdb_track_remove_thumbnails (Itdb_Track *track);
 
-/* photoalbum functions */
+/* photoalbum functions -- see itdb_photoalbum.c for instructions on
+ * how to use. */
 Itdb_PhotoDB *itdb_photodb_parse (const gchar *mp, GError **error);
-gboolean itdb_photodb_add_photo (Itdb_PhotoDB *db,
-				 const gchar *albumname,
-				 const gchar *filename);
-gboolean itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
-					   const gchar *albumname,
-					   const guchar *image_data,
-					   gsize image_data_len);
-Itdb_PhotoAlbum *itdb_photodb_photoalbum_new (Itdb_PhotoDB *db,
-					      const gchar *album_name);
-Itdb_PhotoDB *itdb_photodb_new (void);
+Itdb_Artwork *itdb_photodb_add_photo (Itdb_PhotoDB *db, const gchar *filename,
+				      gint position, gint rotation,
+				      GError **error);
+Itdb_Artwork *itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
+						const guchar *image_data,
+						gsize image_data_len,
+						gint position,
+						gint rotation,
+						GError **error);
+void itdb_photodb_photoalbum_add_photo (Itdb_PhotoDB *db,
+					Itdb_PhotoAlbum *album,
+					Itdb_Artwork *photo,
+					gint position);
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_create (Itdb_PhotoDB *db,
+						 const gchar *albumname,
+						 gint pos);
+Itdb_PhotoDB *itdb_photodb_create (const gchar *mountpoint);
 void itdb_photodb_free (Itdb_PhotoDB *photodb);
-gboolean itdb_photodb_write (Itdb_PhotoDB *db, GError **error);
-void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *pa);
-gboolean itdb_photodb_remove_photo (Itdb_PhotoDB *db,
-        const gint photo_id );
+gboolean itdb_photodb_write (Itdb_PhotoDB *photodb, GError **error);
+void itdb_photodb_remove_photo (Itdb_PhotoDB *db,
+				Itdb_PhotoAlbum *album,
+				Itdb_Artwork *photo);
+void itdb_photodb_photoalbum_remove (Itdb_PhotoDB *db,
+				     Itdb_PhotoAlbum *album,
+				     gboolean remove_pics);
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_by_name(Itdb_PhotoDB *db,
+						 const gchar *albumname );
 
-/* itdb_artwork_... */
+/* 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 *itdb_artwork_new (void);
 Itdb_Artwork *itdb_artwork_duplicate (Itdb_Artwork *artwork);
 void itdb_artwork_free (Itdb_Artwork *artwork);
@@ -974,16 +1055,18 @@
 					    ItdbThumbType type);
 gboolean itdb_artwork_add_thumbnail (Itdb_Artwork *artwork,
 				     ItdbThumbType type,
-				     const gchar *filename);
+				     const gchar *filename,
+				     gint rotation, GError **error);
 gboolean itdb_artwork_add_thumbnail_from_data (Itdb_Artwork *artwork,
 					       ItdbThumbType type,
 					       const guchar *image_data,
-					       gsize image_data_len);
+					       gsize image_data_len,
+					       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 funciton returns a pointer to a GdkPixbuf if
+/* 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);
@@ -997,7 +1080,7 @@
 time_t itdb_time_mac_to_host (guint64 mactime);
 guint64 itdb_time_host_to_mac (time_t time);
 
-/* Initialise a blank ipod */
+/* Initialize a blank ipod */
 gboolean itdb_init_ipod (const gchar *mountpoint,
 			 const gchar *model_number,
 			 const gchar *ipod_name,

Modified: libgpod/trunk/src/itdb_artwork.c
===================================================================
--- libgpod/trunk/src/itdb_artwork.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_artwork.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-18 02:23:53 jcs>
+/* Time-stamp: <2006-11-26 23:31:45 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -24,11 +24,12 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_artwork.c,v 1.15 2006/09/17 17:27:21 jcsjcs Exp $
+|  $Id: itdb_artwork.c,v 1.18 2006/11/26 15:00:41 jcsjcs Exp $
 */
 
 #include <config.h>
 
+#include "itdb_device.h"
 #include "itdb_private.h"
 #include "db-image-parser.h"
 #include "itdb_endianness.h"
@@ -162,18 +163,27 @@
  * @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
  *
  * 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.
+ *
  * Return value: TRUE if the thumbnail could be successfully added, FALSE
- * otherwise
+ * otherwise. @error is set appropriately.
  **/
 gboolean
 itdb_artwork_add_thumbnail (Itdb_Artwork *artwork,
 			    ItdbThumbType type,
-			    const gchar *filename)
+			    const gchar *filename,
+			    gint rotation,
+			    GError **error)
 {
 #ifdef HAVE_GDKPIXBUF
 /* This operation doesn't make sense when we can't save thumbnail files */
@@ -184,6 +194,9 @@
     g_return_val_if_fail (filename, FALSE);
 
     if (g_stat  (filename, &statbuf) != 0) {
+	g_set_error (error, 0, -1,
+		     _("Could not access file '%s'."),
+		     filename);
 	return FALSE;
     }
 
@@ -193,10 +206,13 @@
     thumb = itdb_thumb_new ();
     thumb->filename = g_strdup (filename);
     thumb->type = type;
+    thumb->rotation = rotation;
     artwork->thumbnails = g_list_append (artwork->thumbnails, thumb);
 
     return TRUE;
 #else
+    g_set_error (error, 0, -1,
+		 _("Artwork support not compiled into libgpod."));
     return FALSE;
 #endif
 }
@@ -209,19 +225,28 @@
  * @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
  *
  * 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.
  *
+ * For the rotation angle you can also use the gdk constants
+ * GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
+ * ..._CLOCKWISE.
+ *
  * Return value: TRUE if the thumbnail could be successfully added, FALSE
- * otherwise
+ * otherwise. @error is set appropriately.
  **/
 gboolean
 itdb_artwork_add_thumbnail_from_data (Itdb_Artwork *artwork,
 				      ItdbThumbType type,
 				      const guchar *image_data,
-				      gsize image_data_len)
+				      gsize image_data_len,
+				      gint rotation,
+				      GError **error)
 {
 #ifdef HAVE_GDKPIXBUF
 /* This operation doesn't make sense when we can't save thumbnail files */
@@ -242,10 +267,13 @@
     memcpy (thumb->image_data,  image_data, image_data_len);
 
     thumb->type = type;
+    thumb->rotation = rotation;
     artwork->thumbnails = g_list_append (artwork->thumbnails, thumb);
 
     return TRUE;
 #else
+    g_set_error (error, 0, -1,
+		 _("Artwork support not compiled into libgpod."));
     return FALSE;
 #endif
 }
@@ -364,7 +392,85 @@
 }
 
 
+/* limit8bit() and unpack_UYVY() adapted from imgconvert.c from the
+ * GPixPod project (www.gpixpod.org) */
+static gint limit8bit (float x)
+{
+    if(x >= 255)
+    {
+	return 255;
+    }
+    if(x <= 0)
+    {
+	return 0;
+    }
+    return x;
+}
 static guchar *
+unpack_UYVY (guchar *yuvdata, gint bytes_len, gint width, gint height)
+{
+    gint imgsize = width*3*height;
+    guchar* rgbdata;
+    gint halfimgsize = imgsize/2;
+    gint halfyuv = halfimgsize/3*2;
+    gint x = 0;
+    gint z = 0;
+    gint z2 = 0;
+    gint u0, y0, v0, y1, u1, y2, v1, y3;
+    gint h = 0;
+
+    g_return_val_if_fail (bytes_len < 2*(G_MAXUINT/3), NULL);
+    g_return_val_if_fail (width * height * 2 == bytes_len, NULL);
+
+    rgbdata =  g_malloc(imgsize);
+
+    while(h < height)
+    {
+	gint w = 0;
+	if((h % 2) == 0)
+	{
+	    while(w < width)
+	    {
+		u0 = yuvdata[z];
+		y0 = yuvdata[z+1];
+		v0 = yuvdata[z+2];
+		y1 = yuvdata[z+3];
+		rgbdata[x] = limit8bit((y0-16)*1.164 + (v0-128)*1.596);/*R0*/
+		rgbdata[x+1] = limit8bit((y0-16)*1.164 - (v0-128)*0.813 - (u0-128)*0.391);/*G0*/
+		rgbdata[x+2] = limit8bit((y0-16)*1.164 + (u0-128)*2.018);/*B0*/
+		rgbdata[x+3] = limit8bit((y0-16)*1.164 + (v0-128)*1.596);/*R1*/
+		rgbdata[x+4] = limit8bit((y1-16)*1.164 - (v0-128)*0.813 - (u0-128)*0.391);/*G1*/
+		rgbdata[x+5] = limit8bit((y1-16)*1.164 + (u0-128)*2.018);/*B1*/
+		w += 2;
+		z += 4;
+		x += 6;
+	    }
+	}
+	else
+	{
+	    while(w < width)
+	    {
+		u1 = yuvdata[halfyuv+z2];
+		y2 = yuvdata[halfyuv+z2+1];
+		v1 = yuvdata[halfyuv+z2+2];
+		y3 = yuvdata[halfyuv+z2+3];
+		rgbdata[x] = limit8bit((y2-16)*1.164 + (v1-128)*1.596);
+		rgbdata[x+1] = limit8bit((y2-16)*1.164 - (v1-128)*0.813 - (u1-128)*0.391);
+		rgbdata[x+2] = limit8bit((y2-16)*1.164 + (u1-128)*2.018);
+		rgbdata[x+3] = limit8bit((y2-16)*1.164 + (v1-128)*1.596);
+		rgbdata[x+4] = limit8bit((y3-16)*1.164 - (v1-128)*0.813 - (u1-128)*0.391);
+		rgbdata[x+5] = limit8bit((y3-16)*1.164 + (u1-128)*2.018);
+		w += 2;
+		z2 += 4;
+		x += 6;
+	    }
+	}
+	h++;
+    }
+    return rgbdata;
+}
+
+static guchar *
 get_pixel_data (Itdb_Device *device, Itdb_Thumb *thumb)
 {
 	gchar *filename = NULL;
@@ -427,9 +533,8 @@
 static guchar *
 itdb_thumb_get_rgb_data (Itdb_Device *device, Itdb_Thumb *thumb)
 {
-	void *pixels565;
-	guchar *pixels;
-	guint byte_order;
+	void *pixels_raw;
+	guchar *pixels=NULL;
 	const Itdb_ArtworkFormat *img_info;
 
 	g_return_val_if_fail (device, NULL);
@@ -438,24 +543,30 @@
 	img_info = itdb_get_artwork_info_from_type (device, thumb->type);
 	g_return_val_if_fail (img_info, NULL);
 	
-	pixels565 = get_pixel_data (device, thumb);
-	if (pixels565 == NULL) {
+	pixels_raw = get_pixel_data (device, thumb);
+	if (pixels_raw == NULL) {
 		return NULL;
 	}
 
-	byte_order = device->byte_order; 
-	/* Swap the byte order on full screen nano photos */
-	if (img_info->correlation_id == 1023)
+	switch (img_info->format)
 	{
-	    if (byte_order == G_LITTLE_ENDIAN)
-		byte_order = G_BIG_ENDIAN;
-	    else
-		byte_order = G_LITTLE_ENDIAN; 
+	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 = unpack_RGB_565 (pixels_raw, thumb->size,
+				     itdb_thumb_get_byteorder (img_info->format));
+	    break;
+	case THUMB_FORMAT_UYVY:
+	    pixels = unpack_UYVY (pixels_raw, thumb->size,
+				  img_info->width, img_info->height);
+	    break;
 	}
+	g_free (pixels_raw);
 
-	pixels = unpack_RGB_565 (pixels565, thumb->size, byte_order);
-	g_free (pixels565);
-
 	return pixels;
 
 }
@@ -551,12 +662,15 @@
 					 NULL);
 		gdk_pixbuf_loader_close (loader, NULL);
 		pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
-		g_object_ref (pixbuf);
+		if (pixbuf)
+		    g_object_ref (pixbuf);
 		g_object_unref (loader);
 	}
 
 	if (!pixbuf)
+	{
 	    return NULL;
+	}
 
 	/* !! cannot write directly to &thumb->width/height because
 	   g_object_get() returns a gint, but thumb->width/height are
@@ -701,3 +815,21 @@
     }
     return new_thumb;
 }
+
+
+G_GNUC_INTERNAL gint
+itdb_thumb_get_byteorder (const ItdbThumbFormat format)
+{
+    switch (format)
+    {
+    case THUMB_FORMAT_RGB565_LE:
+    case THUMB_FORMAT_RGB565_LE_90:
+	return G_LITTLE_ENDIAN;
+    case THUMB_FORMAT_RGB565_BE:
+    case THUMB_FORMAT_RGB565_BE_90:
+	return G_BIG_ENDIAN;
+    case THUMB_FORMAT_UYVY:
+	return -1;
+    }
+    g_return_val_if_reached (-1);
+}

Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_device.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-21 20:37:09 jcs>
+/* Time-stamp: <2006-11-12 23:07:06 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -28,7 +28,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_device.c,v 1.13 2006/09/21 11:39:05 jcsjcs Exp $
+|  $Id: itdb_device.c,v 1.15 2007/01/10 13:25:10 jcsjcs Exp $
 */
 
 #include "itdb_device.h"
@@ -205,38 +205,38 @@
 	NULL
 };
 
-static const Itdb_ArtworkFormat ipod_color_artwork_info[] = {
-	{ITDB_THUMB_COVER_SMALL,        56,  56, 1017},
-	{ITDB_THUMB_COVER_LARGE,       140, 140, 1016},
-	{ITDB_THUMB_PHOTO_SMALL,        42,  30, 1009},
-	{ITDB_THUMB_PHOTO_LARGE,       130,  88, 1015},
-	{ITDB_THUMB_PHOTO_FULL_SCREEN, 220, 176, 1013},
-	{ITDB_THUMB_PHOTO_TV_SCREEN,   720, 480, 1019},
-	{-1,                            -1,  -1,   -1}
+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},
+    {-1,                           -1,  -1,   -1, -1}
 };
 
 static const Itdb_ArtworkFormat ipod_nano_artwork_info[] = {
-	{ITDB_THUMB_COVER_SMALL,        42,  42, 1031},
-	{ITDB_THUMB_COVER_LARGE,       100, 100, 1027},
-	{ITDB_THUMB_PHOTO_LARGE,        42,  37, 1032},
-	{ITDB_THUMB_PHOTO_FULL_SCREEN, 176, 132, 1023},
-	{-1,                            -1,  -1,   -1}
+    {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_video_artwork_info[] = {
-	{ITDB_THUMB_COVER_SMALL,       100, 100, 1028},
-	{ITDB_THUMB_COVER_LARGE,       200, 200, 1029},
-	{ITDB_THUMB_PHOTO_SMALL,        50,  41, 1036},
-	{ITDB_THUMB_PHOTO_LARGE,       130,  88, 1015},
-	{ITDB_THUMB_PHOTO_FULL_SCREEN, 320, 240, 1024},
-	{ITDB_THUMB_PHOTO_TV_SCREEN,   720, 480, 1019},
-	{-1,                            -1,  -1,   -1}
+    {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},
+    {-1,                           -1,  -1,   -1, -1}
 };
 
 static const Itdb_ArtworkFormat ipod_mobile_1_artwork_info[] = {
-	{ITDB_THUMB_COVER_SMALL,        50,  50, 2002},
-	{ITDB_THUMB_COVER_LARGE,       150, 150, 2003},
-	{-1,                            -1,  -1,   -1}
+    {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}
 };
 
 
@@ -244,8 +244,8 @@
 static const Itdb_ArtworkFormat *ipod_artwork_info_table[] = {
         NULL,                      /* Invalid       */
 	NULL,                      /* Unknown       */
-	ipod_color_artwork_info,   /* Color         */
-	ipod_color_artwork_info,   /* Color U2      */
+	ipod_photo_artwork_info,   /* Color         */
+	ipod_photo_artwork_info,   /* Color U2      */
 	NULL,                      /* Grayscale     */ 
 	NULL,                      /* Grayscale U2  */
 	NULL,                      /* Mini (Silver) */
@@ -413,6 +413,7 @@
 /** 
  * itdb_device_write_sysinfo:
  * @device: an #Itdb_Device
+ * @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.
@@ -733,7 +734,8 @@
 
 
 /**
- * itdb_info_get_ipod_model_string:
+ * itdb_info_get_ipod_model_name_string:
+ * @model: an #Itdb_IpodModel
  *
  * Return the iPod's generic model name, like "Color", "Nano"...
  *
@@ -757,6 +759,7 @@
 
 /**
  * itdb_info_get_ipod_generation_string:
+ * @generation: an #Itdb_IpodGeneration
  *
  * Return the iPod's generic generation name, like "First Generation",
  * "Mobile Phone"...

Modified: libgpod/trunk/src/itdb_device.h
===================================================================
--- libgpod/trunk/src/itdb_device.h	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_device.h	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-07 23:48:37 jcs>
+/* Time-stamp: <2006-11-12 23:03:35 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -30,7 +30,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_device.h,v 1.6 2006/06/07 15:41:50 jcsjcs Exp $
+|  $Id: itdb_device.h,v 1.7 2006/11/12 15:12:40 jcsjcs Exp $
 */
 
 #ifndef __ITDB_DEVICE_H__
@@ -47,7 +47,18 @@
 G_BEGIN_DECLS
 
 typedef struct _Itdb_ArtworkFormat Itdb_ArtworkFormat;
+typedef enum _ItdbThumbFormat ItdbThumbFormat;
 
+enum _ItdbThumbFormat
+{
+    THUMB_FORMAT_UYVY,
+    THUMB_FORMAT_RGB565_LE,
+    THUMB_FORMAT_RGB565_LE_90,
+    THUMB_FORMAT_RGB565_BE,
+    THUMB_FORMAT_RGB565_BE_90,
+};
+
+
 struct _Itdb_Device
 {
     gchar *mountpoint;    /* mountpoint of the iPod */
@@ -68,6 +79,7 @@
 	gint16 width;
 	gint16 height;
 	gint16 correlation_id;
+        ItdbThumbFormat format;
 };
 
 G_GNUC_INTERNAL const Itdb_ArtworkFormat *itdb_device_get_artwork_formats (Itdb_Device *device);

Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_itunesdb.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-21 20:12:24 jcs>
+/* Time-stamp: <2007-01-15 01:55:47 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -31,7 +31,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_itunesdb.c,v 1.68 2006/09/21 11:39:05 jcsjcs Exp $
+|  $Id: itdb_itunesdb.c,v 1.76 2007/01/14 14:28:37 jcsjcs Exp $
 */
 
 /* Some notes on how to use the functions in this file:
@@ -133,9 +133,37 @@
 #define ITUNESDB_COPYBLK (1024*1024*4)      /* blocksize for cp () */
 
 
+/* NOTE for developers:
+
+   Sometimes new MHOD string fields are added by Apple in the
+   iTunesDB. In that case you need to modify the code in the following
+   places:
+
+   itdb_itunesdb.c:
+   - enum MHOD_ID
+   - get_mhod(): inside the switch() statement. Currently no compiler
+     warning is given.
+   - get_mhod_string(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - get_playlist(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - get_mhit(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - mk_mhod(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - write_mhsd_tracks(): inside the for() loop.
+
+   itdb_track.c:
+   - itdb_track_free()
+   - itdb_track_duplicate()
+
+   itdb_playlists.c:
+   Analogous to itdb_track.c in case the string is part of the playlist
+   description.
+*/
+
 /* Note: some of the comments for the MHOD_IDs are copied verbatim
  * from http://ipodlinux.org/ITunesDB */
-
 enum MHOD_ID {
   MHOD_ID_TITLE = 1,
   MHOD_ID_PATH = 2,   /* file path on iPod (special format) */
@@ -169,6 +197,22 @@
 /* Subtitle (usually the same as Description). Introduced in db
    version 0x0d. */
   MHOD_ID_SUBTITLE = 18,
+/* Show (for TV Shows only). Introduced in db version 0x0d? */
+  MHOD_ID_TVSHOW = 19, 
+/* Episode # (for TV Shows only). Introduced in db version 0x0d? */
+  MHOD_ID_TVEPISODE = 20,
+/* TV Network (for TV Shows only). Introduced in db version 0x0d? */
+  MHOD_ID_TVNETWORK = 21,
+/* Album Artist. Introduced in db version 0x13? */
+  MHOD_ID_ALBUMARTIST = 22,
+/* This only seems to appear if the Artist has "The" in front of it
+  (like "The Monkies") in which case it will be in the format "Artist,
+  The" and is followed by 5 0x01 UTF-16 characters. Introduced in db
+  version 0x13? */
+/*  MHOD_ID_ARTISTTHE = 23,   later */
+/* Appears to be a list of keywords pertaining to a track. Introduced
+   in db version 0x13? */
+  MHOD_ID_KEYWORDS = 24,
   MHOD_ID_SPLPREF = 50,  /* settings for smart playlist */
   MHOD_ID_SPLRULES = 51, /* rules for smart playlist     */
   MHOD_ID_LIBPLAYLISTINDEX = 52,  /* Library Playlist Index */
@@ -271,11 +315,15 @@
  * @root: in local encoding
  * @components: in utf8
  *
+ * 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
  * 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.
  **/
 gchar * itdb_resolve_path (const gchar *root,
 			   const gchar * const * components)
@@ -844,7 +892,8 @@
     entry_length = get32lint (cts, 8);
     CHECK_ERROR (fimp, FALSE);
     /* all the entries I know are 0x0c (firmware 1.3) or 0x10
-     * (firmware 2.0) or 0x14 (iTunesDB version 0x0d) in length */
+     * (firmware 2.0), 0x14 (iTunesDB version 0x0d) or 0x1c (iTunesDB
+     * version 0x13) in length */
     if (entry_length < 0x0c)
     {
 	g_set_error (&fimp->error,
@@ -862,13 +911,13 @@
 	struct playcount *playcount = g_new0 (struct playcount, 1);
 	glong seek = header_length + i*entry_length;
 
+	check_seek (cts, seek, entry_length);
+	CHECK_ERROR (fimp, FALSE);	
+
 	fimp->playcounts = g_list_append (fimp->playcounts, playcount);
 	playcount->playcount = get32lint (cts, seek);
-	CHECK_ERROR (fimp, FALSE);
 	playcount->time_played = get32lint (cts, seek+4);
-	CHECK_ERROR (fimp, FALSE);
 	playcount->bookmark_time = get32lint (cts, seek+8);
-	CHECK_ERROR (fimp, FALSE);
 	/* NOTE:
 	 *
 	 * The iPod (firmware 1.3, 2.0, ...?) doesn't seem to use the
@@ -883,7 +932,6 @@
 	if (entry_length >= 0x10)
 	{
 	    playcount->rating = get32lint (cts, seek+12);
-	    CHECK_ERROR (fimp, FALSE);
 	}
 	else
 	{
@@ -893,11 +941,13 @@
 	if (entry_length >= 0x14)
 	{
 	    playcount->pc_unk16 = get32lint (cts, seek+16);
-	    CHECK_ERROR (fimp, FALSE);
 	}
-	else
+	/* skip_count and last_skipped only exists if the entry length
+	   is at least 0x1c */
+	if (entry_length >= 0x1c)
 	{
-	    playcount->pc_unk16 = 0;
+	    playcount->skipcount = get32lint (cts, seek+20);
+	    playcount->last_skipped = get32lint (cts, seek+24);
 	}
     }
     return TRUE;
@@ -1170,7 +1220,7 @@
     g_once (&g_type_init_once, (GThreadFunc)g_type_init, NULL);
     itdb = g_new0 (Itdb_iTunesDB, 1);
     itdb->device = itdb_device_new ();
-    itdb->version = 0x09;
+    itdb->version = 0x13;
     itdb->id = ((guint64)g_random_int () << 32) |
 	((guint64)g_random_int ());
     return itdb;
@@ -1285,6 +1335,11 @@
   case MHOD_ID_GROUPING:
   case MHOD_ID_DESCRIPTION:
   case MHOD_ID_SUBTITLE:
+  case MHOD_ID_TVSHOW:
+  case MHOD_ID_TVEPISODE:
+  case MHOD_ID_TVNETWORK:
+  case MHOD_ID_ALBUMARTIST:
+  case MHOD_ID_KEYWORDS:
       /* type of string: 0x02: UTF8, 0x01 or 0x00: UTF16 LE */
       string_type = get32lint (cts, seek);
       xl = get32lint (cts, seek+4);   /* length of string */
@@ -1466,7 +1521,6 @@
    cts->error is set appropriately. */
 static gchar *get_mhod_string (FContents *cts, glong seek, guint32 *ml, gint32 *mty)
 {
-    gchar *result = NULL;
     MHODData mhoddata;
 
     *mty = get_mhod_type (cts, seek, ml);
@@ -1488,19 +1542,28 @@
     case MHOD_ID_PODCASTURL:
     case MHOD_ID_PODCASTRSS:
     case MHOD_ID_SUBTITLE:
+    case MHOD_ID_TVSHOW:
+    case MHOD_ID_TVEPISODE:
+    case MHOD_ID_TVNETWORK:
+    case MHOD_ID_ALBUMARTIST:
+    case MHOD_ID_KEYWORDS:
 	mhoddata = get_mhod (cts, seek, ml);
 	if ((*ml != -1) && mhoddata.valid)
-	    result = mhoddata.data.string;
-	break;
+	    return mhoddata.data.string;
+	else
+	    return NULL;
     case MHOD_ID_SPLPREF:
     case MHOD_ID_SPLRULES:
     case MHOD_ID_LIBPLAYLISTINDEX:
     case MHOD_ID_PLAYLIST:
     case MHOD_ID_CHAPTERDATA:
 	/* these do not have a string entry */
-	break;
+	return NULL;
     }
-    return result;
+#if ITUNESDB_MHIT_DEBUG
+    fprintf (stderr, "Ignoring unknown MHOD of type %d at offset %ld\n", *mty, seek);
+#endif
+    return NULL;
 }
 
 
@@ -1873,8 +1936,8 @@
   plitem->flag3 = get8int (cts, mhyp_seek+23);
   plitem->timestamp = get32lint (cts, mhyp_seek+24);
   plitem->id = get64lint (cts, mhyp_seek+28);
-  plitem->mhodcount = get32lint (cts, mhyp_seek+36);
-  plitem->libmhodcount = get16lint (cts, mhyp_seek+40);
+/*  plitem->mhodcount = get32lint (cts, mhyp_seek+36);   */
+/*  plitem->libmhodcount = get16lint (cts, mhyp_seek+40);*/
   plitem->podcastflag = get16lint (cts, mhyp_seek+42);
   plitem->sortorder = get32lint (cts, mhyp_seek+44);
 
@@ -1942,6 +2005,11 @@
 	  case MHOD_ID_PODCASTURL:
 	  case MHOD_ID_PODCASTRSS:
 	  case MHOD_ID_SUBTITLE:
+	  case MHOD_ID_TVSHOW:
+	  case MHOD_ID_TVEPISODE:
+	  case MHOD_ID_TVNETWORK:
+	  case MHOD_ID_ALBUMARTIST:
+	  case MHOD_ID_KEYWORDS:
 	  case MHOD_ID_CHAPTERDATA:
 	      /* these are not expected here */
 	      break;
@@ -2114,8 +2182,8 @@
   }
   if (header_len >= 0xf4)
   {
-      track->unk156 = get32lint (cts, seek+156);
-      track->unk160 = get32lint (cts, seek+160);
+      track->skipcount = get32lint (cts, seek+156);
+      track->last_skipped = get32lint (cts, seek+160);
       track->has_artwork = get8int (cts, seek+164);
       track->skip_when_shuffling = get8int (cts, seek+165);
       track->remember_playback_position = get8int (cts, seek+166);
@@ -2126,15 +2194,14 @@
       track->mark_unplayed = get8int (cts, seek+178);
       track->unk179 = get8int (cts, seek+179);
       track->unk180 = get32lint (cts, seek+180);
-      track->unk184 = get32lint (cts, seek+184);
-      track->samplecount = get32lint (cts, seek+188);
-      track->unk192 = get32lint (cts, seek+192);
+      track->pregap = get32lint (cts, seek+184);
+      track->samplecount = get64lint (cts, seek+188);
       track->unk196 = get32lint (cts, seek+196);
-      track->unk200 = get32lint (cts, seek+200);
+      track->postgap = get32lint (cts, seek+200);
       track->unk204 = get32lint (cts, seek+204);
-      track->unk208 = get32lint (cts, seek+208);
-      track->unk212 = get32lint (cts, seek+212);
-      track->unk216 = get32lint (cts, seek+216);
+      track->mediatype = get32lint (cts, seek+208);
+      track->season_nr = get32lint (cts, seek+212);
+      track->episode_nr = get32lint (cts, seek+216);
       track->unk220 = get32lint (cts, seek+220);
       track->unk224 = get32lint (cts, seek+224);
       track->unk228 = get32lint (cts, seek+228);
@@ -2142,6 +2209,14 @@
       track->unk236 = get32lint (cts, seek+236);
       track->unk240 = get32lint (cts, seek+240);
   }
+  if (header_len >= 0x148)
+  {
+      track->unk244 = get32lint (cts, seek+244);
+      track->gapless_data = get32lint (cts, seek+248);
+      track->unk252 = get32lint (cts, seek+252);
+      track->gapless_track_flag = get16lint (cts, seek+256);
+      track->gapless_album_flag = get16lint (cts, seek+258);
+  }
 
   track->transferred = TRUE;                   /* track is on iPod! */
 
@@ -2198,9 +2273,26 @@
 	  case MHOD_ID_SUBTITLE:
 	      track->subtitle = entry_utf8;
 	      break;
-	  default: /* unknown entry -- discard */
-	      g_warning ("Unknown string mhod type %d at %lx inside mhit starting at %lx\n",
-			 type, seek, mhit_seek);
+	  case MHOD_ID_TVSHOW:
+	      track->tvshow = entry_utf8;
+	      break;
+	  case MHOD_ID_TVEPISODE:
+	      track->tvepisode = entry_utf8;
+	      break;
+	  case MHOD_ID_TVNETWORK:
+	      track->tvnetwork = entry_utf8;
+	      break;
+	  case MHOD_ID_ALBUMARTIST:
+	      track->albumartist = entry_utf8;
+	      break;
+	  case MHOD_ID_KEYWORDS:
+	      track->keywords = entry_utf8;
+	      break;
+	  case MHOD_ID_SPLPREF:
+	  case MHOD_ID_SPLRULES:
+	  case MHOD_ID_LIBPLAYLISTINDEX:
+	  case MHOD_ID_PLAYLIST:
+	  case MHOD_ID_CHAPTERDATA:
 	      g_free (entry_utf8);
 	      break;
 	  }
@@ -2256,6 +2348,10 @@
 	  track->mark_unplayed = 0x01;
       }
       track->recent_playcount = playcount->playcount;
+
+      track->skipcount += playcount->skipcount;
+      track->recent_skipcount = playcount->skipcount;
+
       g_free (playcount);
   }
   itdb_track_add (fimp->itdb, track, -1);
@@ -3192,8 +3288,14 @@
 		     0x0a: iTunes 4.5
 		     0x0b: iTunes 4.7
 		     0x0c: iTunes 4.71/4.8 (required for shuffle)
-                     0x0d: iTunes 4.9 */
-  fexp->itdb->version = 0x0d;
+                     0x0d: iTunes 4.9
+                     0x0e: iTunes 5
+		     0x0f: iTunes 6
+		     0x10: iTunes 6.0.1(?)
+		     0x11: iTunes 6.0.2
+                     0x12 = iTunes 6.0.5.
+		     0x13 = iTunes 7 */
+  fexp->itdb->version = 0x13;
   put32lint (cts, fexp->itdb->version);
   put32lint (cts, children);
   put64lint (cts, fexp->itdb->id);
@@ -3252,7 +3354,7 @@
   g_return_if_fail (track);
 
   put_header (cts, "mhit");
-  put32lint (cts, 0xf4);  /* header size */
+  put32lint (cts, 0x148);/* header size */
   put32lint (cts, -1);   /* size of whole mhit -- fill in later */
   put32lint (cts, -1);   /* nr of mhods in this mhit -- later   */
   put32lint (cts, track->id); /* track index number */
@@ -3301,8 +3403,8 @@
   put32lint (cts, track->unk148);
   put32lint (cts, track->unk152);
   /* since iTunesDB version 0x0c */
-  put32lint (cts, track->unk156);
-  put32lint (cts, track->unk160);
+  put32lint (cts, track->skipcount);
+  put32lint (cts, track->last_skipped);
   put8int (cts, track->has_artwork);
   put8int (cts, track->skip_when_shuffling);
   put8int (cts, track->remember_playback_position);
@@ -3313,21 +3415,26 @@
   put8int (cts, track->mark_unplayed);
   put8int (cts, track->unk179);
   put32lint (cts, track->unk180);
-  put32lint (cts, track->unk184);
-  put32lint (cts, track->samplecount);
-  put32lint (cts, track->unk192);
+  put32lint (cts, track->pregap);
+  put64lint (cts, track->samplecount);
   put32lint (cts, track->unk196);
-  put32lint (cts, track->unk200);
+  put32lint (cts, track->postgap);
   put32lint (cts, track->unk204);
-  put32lint (cts, track->unk208);
-  put32lint (cts, track->unk212);
-  put32lint (cts, track->unk216);
+  put32lint (cts, track->mediatype);
+  put32lint (cts, track->season_nr);
+  put32lint (cts, track->episode_nr);
   put32lint (cts, track->unk220);
   put32lint (cts, track->unk224);
   put32lint (cts, track->unk228);
   put32lint (cts, track->unk232);
   put32lint (cts, track->unk236);
   put32lint (cts, track->unk240);
+  put32lint (cts, track->unk244);
+  put32lint (cts, track->gapless_data);
+  put32lint (cts, track->unk252);
+  put16lint (cts, track->gapless_track_flag);
+  put16lint (cts, track->gapless_album_flag);
+  put32_n0 (cts, 17); /* padding */
 }
 
 
@@ -3369,6 +3476,11 @@
   case MHOD_ID_GROUPING:
   case MHOD_ID_DESCRIPTION:
   case MHOD_ID_SUBTITLE:
+  case MHOD_ID_TVSHOW:
+  case MHOD_ID_TVEPISODE:
+  case MHOD_ID_TVNETWORK:
+  case MHOD_ID_ALBUMARTIST:
+  case MHOD_ID_KEYWORDS:
       g_return_if_fail (mhod->data.string);
       /* normal iTunesDBs seem to take utf16 strings), endian-inversed
 	 iTunesDBs seem to take utf8 strings */
@@ -3759,6 +3871,41 @@
 	    mk_mhod (cts, &mhod);
 	    ++mhod_num;
 	}
+	if (track->tvshow && *track->tvshow)
+	{
+	    mhod.type = MHOD_ID_TVSHOW;
+	    mhod.data.string = track->tvshow;
+	    mk_mhod (cts, &mhod);
+	    ++mhod_num;
+	}
+	if (track->tvepisode && *track->tvepisode)
+	{
+	    mhod.type = MHOD_ID_TVEPISODE;
+	    mhod.data.string = track->tvepisode;
+	    mk_mhod (cts, &mhod);
+	    ++mhod_num;
+	}
+	if (track->tvnetwork && *track->tvnetwork)
+	{
+	    mhod.type = MHOD_ID_TVNETWORK;
+	    mhod.data.string = track->tvnetwork;
+	    mk_mhod (cts, &mhod);
+	    ++mhod_num;
+	}
+	if (track->albumartist && *track->albumartist)
+	{
+	    mhod.type = MHOD_ID_ALBUMARTIST;
+	    mhod.data.string = track->albumartist;
+	    mk_mhod (cts, &mhod);
+	    ++mhod_num;
+	}
+	if (track->keywords && *track->keywords)
+	{
+	    mhod.type = MHOD_ID_KEYWORDS;
+	    mhod.data.string = track->keywords;
+	    mk_mhod (cts, &mhod);
+	    ++mhod_num;
+	}
 	if (track->podcasturl && *track->podcasturl)
 	{
 	    mhod.type = MHOD_ID_PODCASTURL;
@@ -3995,11 +4142,11 @@
     put8int (cts, pl->flag3);      /* unknown                   */
     put32lint (cts, pl->timestamp);/* some timestamp            */
     put64lint (cts, pl->id);       /* 64 bit ID                 */
-    pl->mhodcount = 1;             /* we only write one mhod type < 50 */
-    put32lint (cts, pl->mhodcount);
-    pl->libmhodcount = 1;          /* we don't write mhod type 52, and
-				      "1" seems to be the default */
-    put16lint (cts, pl->libmhodcount);
+    put32lint (cts, 1);            /* mhodcount: we only write
+				    * one mhod type < 50        */
+    put16lint (cts, 1);            /* libmhodcount: we don't write
+				      mhod type 52, and "1" seems to
+				      be the default            */
     put16lint (cts, pl->podcastflag);
     put32lint (cts, pl->sortorder);
     put32_n0 (cts, 15);            /* ?                         */
@@ -5467,9 +5614,9 @@
  * itdb_init_ipod:
  * @mountpoint:   the iPod mountpoint
  * @model_number: the iPod model number
- * @model_type:   the type of iPod, eg. regular, shuffle
  * @ipod_name:    the name to give to the iPod. Will be displayed in
  *                gtkpod or itunes
+ * @error:        return location for a #GError or NULL
  *
  * Initialise an iPod device from scratch. The function attempts to
  * create a blank database, complete with master playlist and device

Modified: libgpod/trunk/src/itdb_photoalbum.c
===================================================================
--- libgpod/trunk/src/itdb_photoalbum.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_photoalbum.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,3 +1,31 @@
+/* Time-stamp: <2007-01-15 01:02:46 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/
+|
+|  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_photoalbum.c,v 1.16 2007/01/14 13:34:07 jcsjcs Exp $
+*/
 #include <config.h>
 
 #include "itdb_private.h"
@@ -9,6 +37,60 @@
 #include <glib/gi18n-lib.h>
 
 
+/* Short summary:
+
+   itdb_photodb_parse():
+       Read an existing PhotoDB.
+
+   itdb_photodb_create():
+       Create a new Itdb_PhotoDB structure. The Photo Library Album is
+       (first album) is created automatically.
+
+   itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+       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.
+
+   itdb_photodb_photoalbum_create():
+       Create and add a new photoalbum.
+
+   itdb_photodb_photoalbum_add_photo():
+       Add a photo (Itdb_Artwork) to an existing photoalbum.
+
+   itdb_photodb_photoalbum_remove():
+       Remove an existing photoalbum. Pictures can be kept in the
+       Photo Library or automatically removed as well.
+
+   itdb_photodb_remove_photo():
+       Remove a photo either from a photoalbum or completely from the database.
+
+   itdb_photodb_write():
+       Write out your PhotoDB.
+
+   itdb_photodb_free():
+       Free all memory taken by the PhotoDB.
+
+   itdb_photodb_photoalbum_by_name():
+       Find the first photoalbum with a given name or the Photo
+       Library Album if called with no name.
+
+
+   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 (db->device, "ModelNumStr", model);
+
+   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).
+*/
+
+
+static Itdb_PhotoDB *itdb_photodb_new (void);
+static void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *pa);
+
 /* Set @error with standard error message */
 static void error_no_photos_dir (const gchar *mp, GError **error)
 {
@@ -116,12 +198,11 @@
 
 /**
  * itdb_photodb_parse:
+ * @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.
  *
- * @mp: mountpoint of the iPod
- * @error: will contain the error description when an error occured.
- *
  * Return value: the imported PhotoDB or NULL in case of an error.
  **/
 Itdb_PhotoDB *itdb_photodb_parse (const gchar *mp, GError **error)
@@ -146,15 +227,36 @@
 
 
 /**
- * itdb_photodb_new:
+ * itdb_photodb_create:
+ * @mountpoint: mountpoint or NULL.
  *
- * Creates a new Itdb_PhotoDB
+ * 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
- * itdb_photodb_free() when it's no longer needed
+ * itdb_photodb_free() when it's no longer needed. The Photo Library
+ * Album is created automatically.
  **/
-Itdb_PhotoDB *itdb_photodb_new (void)
+Itdb_PhotoDB *itdb_photodb_create (const gchar *mountpoint)
 {
+    Itdb_PhotoDB *photodb = itdb_photodb_new ();
+    Itdb_PhotoAlbum *album;
+
+    album = itdb_photodb_photoalbum_create (photodb, _("Photo Library"), -1);
+    album->album_type = 1; /* Photo Library */
+
+    if (mountpoint)
+    {
+	itdb_device_set_mountpoint (photodb->device, mountpoint);
+    }
+
+    return photodb;
+}
+
+
+
+static Itdb_PhotoDB *itdb_photodb_new (void)
+{
     Itdb_PhotoDB *photodb;
 
     photodb = g_new0 (Itdb_PhotoDB, 1);
@@ -164,6 +266,7 @@
 }
 
 
+
 /** 
  * itdb_photodb_free:
  * @photodb: an #Itdb_PhotoDB
@@ -207,184 +310,393 @@
 	return photo_id + 1;
 }
 
-static gint itdb_get_free_photoalbum_id ( Itdb_PhotoDB *db )
+static void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *album)
 {
-	gint album_id = 0;
-	GList *it;
+    if (album)
+    {
+	g_free (album->name);
+	g_list_free (album->members);
 
-	for (it = db->photoalbums; it != NULL; it = it->next) {
-		Itdb_PhotoAlbum *album;
+	if (album->userdata && album->userdata_destroy)
+	    (*album->userdata_destroy) (album->userdata);
 
-		album = (Itdb_PhotoAlbum *)it->data;
-		if( album->album_id > album_id )
-			album_id = album->album_id;
-	}
-	return album_id + 1;
+	g_free (album);
+    }
 }
 
-static Itdb_PhotoAlbum *itdb_get_photoalbum ( Itdb_PhotoDB *db, const gchar *albumname )
+
+/* called by itdb_photodb_add_photo() and
+   itdb_photodb_add_photo_from_data() */
+static Itdb_Artwork *itdb_photodb_add_photo_internal (Itdb_PhotoDB *db,
+						      const gchar *filename,
+						      const guchar *image_data,
+						      gsize image_data_len,
+						      gint position,
+						      gint rotation,
+						      GError **error)
 {
-	GList *it;
+#ifdef HAVE_GDKPIXBUF
+    gboolean result;
+    Itdb_Artwork *artwork;
+    Itdb_PhotoAlbum *album;
+    const Itdb_ArtworkFormat *format;
 
-	if( strcmp( albumname, "master" ) == 0 )
-	    return g_list_nth_data (db->photoalbums, 0);
+    g_return_val_if_fail (db, NULL);
+    g_return_val_if_fail (db->device, NULL);
+    g_return_val_if_fail (filename || image_data, NULL);
+    g_return_val_if_fail (!(image_data && (image_data_len == 0)), NULL);
 
-	for (it = db->photoalbums; it != NULL; it = it->next) {
-		Itdb_PhotoAlbum *album;
+    if (!ipod_supports_photos (db->device))
+    {
+	const Itdb_IpodInfo *ipodinfo = itdb_device_get_ipod_info (db->device);
+	const gchar *model, *generation;
 
-		album = (Itdb_PhotoAlbum *)it->data;
-		if( strcmp(album->name, albumname) == 0 )
-			return album;
-	}
-	return (Itdb_PhotoAlbum *)NULL;
-}
+	if (!ipodinfo)
+	{
+	    g_set_error (error, 0, -1,
+			 _("You need to specify the iPod model used before photos can be added."));
+	    return NULL;
+	    /* For information: The model is set by calling the rather
+	       unintuitive function itdb_device_set_sysinfo as
+	       follows:
 
+	       itdb_device_set_sysinfo (db->device, "ModelNumStr", model);
 
-void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *pa)
-{
-    if (pa)
-    {
-	g_free (pa->name);
-	g_list_free (pa->members);
+	       For example, "MA450" would stand for an 80 GB 6th
+	       generation iPod Video. See itdb_device.c for a list of
+	       supported models.
 
-	if (pa->userdata && pa->userdata_destroy)
-	    (*pa->userdata_destroy) (pa->userdata);
+	       This information will be written to the iPod when the
+	       PhotoDB is saved (itdb_device_write_sysinfo() is called).
+	    */
+	}
 
-	g_free (pa);
+	model = itdb_info_get_ipod_model_name_string (ipodinfo->ipod_model);
+	generation = itdb_info_get_ipod_generation_string (ipodinfo->ipod_generation);
+	g_return_val_if_fail (model && generation, NULL);
+	g_set_error (error, 0, -1,
+		     _("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)."),
+		     ipodinfo->model_number, generation, model);
+	return NULL;
     }
-}
 
-static gboolean itdb_photodb_add_photo_internal (Itdb_PhotoDB *db,
-						 const gchar *albumname,
-						 const gchar *filename,
-						 const guchar *image_data,
-						 gsize image_data_len)
-{
-	gboolean result;
-	Itdb_Artwork *artwork;
-	Itdb_PhotoAlbum *photoalbum;
-	const Itdb_ArtworkFormat *format;
-	gint photo_id;
+    /* check if filename is valid */
+    if (filename)
+    {
+	struct stat statbuf;
+	if (g_stat  (filename, &statbuf) != 0)
+	{
+	    g_set_error (error, 0, -1,
+			 _("Could not access file '%s'. Photo not added."),
+			 filename);
+	    return NULL;
+	}
+    }
 
-	g_return_val_if_fail (db, FALSE);
+    artwork = itdb_artwork_new ();
 
-	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);
 
-	photo_id = itdb_get_free_photo_id( db );
-	artwork->id = photo_id;
-
-	/* Add a thumbnail for every supported format */
-	format = itdb_device_get_artwork_formats(db->device);
-	for( result = TRUE; format->type != -1 && result == TRUE; format++)
+    for(result = TRUE; format->type != -1 && result == TRUE; format++)
+    {
+	if((format->type == ITDB_THUMB_COVER_SMALL) ||
+	   (format->type == ITDB_THUMB_COVER_LARGE))
+	    continue;
+	if (filename)
 	{
-	    if((format->type == ITDB_THUMB_COVER_SMALL) ||
-	       (format->type == ITDB_THUMB_COVER_LARGE))
-			continue;
-	    if (filename)
-	    {
-		result = itdb_artwork_add_thumbnail (artwork,
-						     format->type,
-						     filename);
-	    }
-	    if (image_data)
-	    {
-		result = itdb_artwork_add_thumbnail_from_data (artwork,
-							       format->type,
-							       image_data,
-							       image_data_len);
-	    }
+	    result = itdb_artwork_add_thumbnail (artwork,
+						 format->type,
+						 filename,
+						 rotation,
+						 error);
 	}
-
-	if (result != TRUE)
+	if (image_data)
 	{
-		itdb_artwork_remove_thumbnails (artwork);
-		return result;
+	    result = itdb_artwork_add_thumbnail_from_data (artwork,
+							   format->type,
+							   image_data,
+							   image_data_len,
+							   rotation,
+							   error);
 	}
-	db->photos = g_list_append (db->photos, artwork);
+    }
 
-	photoalbum = itdb_get_photoalbum( db, albumname );
-	if( photoalbum == NULL )
-		photoalbum = itdb_photodb_photoalbum_new( db, albumname );
-	photoalbum->num_images++;
-	photoalbum->members = g_list_append (photoalbum->members, GINT_TO_POINTER(photo_id));
+    if (result != TRUE)
+    {
+	itdb_artwork_free (artwork);
+	g_set_error (error, 0, -1,
+		     _("Unexpected error in itdb_photodb_add_photo_internal() while adding photo, please report."));
+	return NULL;
+    }
 
-	return result;
+    /* Add artwork to the list of photos */
+    /* (it would be sufficient to append to the end) */
+    db->photos = g_list_insert (db->photos, artwork, position);
+
+    /* Add artwork to the first album */
+    album = itdb_photodb_photoalbum_by_name (db, NULL);
+    if (!album)
+    {
+	album = itdb_photodb_photoalbum_create (db, _("Photo Library"), -1);
+	album->album_type = 1; /* Photo Library */
+    }
+    itdb_photodb_photoalbum_add_photo (db, album, artwork, position);
+
+    return artwork;
+#else
+    g_set_error (error, 0, -1,
+		 _("Library compiled without gdk-pixbuf support. Picture support is disabled."));
+    return NULL;
+#endif
 }
 
 
-gboolean itdb_photodb_add_photo (Itdb_PhotoDB *db,
-				 const gchar *albumname,
-				 const gchar *filename)
+
+/**
+ * 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
+ * 
+ * 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.
+ *
+ * Return value: a pointer to the added photo.
+ **/
+Itdb_Artwork *itdb_photodb_add_photo (Itdb_PhotoDB *db,
+				      const gchar *filename,
+				      gint position,
+				      gint rotation,
+				      GError **error)
 {
     g_return_val_if_fail (db, FALSE);
     g_return_val_if_fail (filename, FALSE);
 
-    return itdb_photodb_add_photo_internal (db, albumname, filename,
-					    NULL, 0);
+    return itdb_photodb_add_photo_internal (db, filename, NULL, 0,
+					    position, rotation, error);
 }
 
 
-gboolean itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
-					   const gchar *albumname,
-					   const guchar *image_data,
-					   gsize image_data_len)
+/**
+ * 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)
+ * @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
+ * 
+ * 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.
+ *
+ * Return value: a pointer to the added photo.
+ **/
+Itdb_Artwork *itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
+						const guchar *image_data,
+						gsize image_data_len,
+						gint position,
+						gint rotation,
+						GError **error)
 {
     g_return_val_if_fail (db, FALSE);
     g_return_val_if_fail (image_data, FALSE);
 
-    return itdb_photodb_add_photo_internal (db, albumname, NULL,
-					    image_data, image_data_len);
+    return itdb_photodb_add_photo_internal (db, NULL, image_data, image_data_len,
+					    position, rotation, error);
 }
 
 
-gboolean itdb_photodb_remove_photo (Itdb_PhotoDB *db,
-		const gint photo_id )
+/**
+ * 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.
+ *
+ * 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.
+ *
+ * @photo will be freed and can no longer be used if removed from the
+ * first photoalbum.
+ */
+void itdb_photodb_remove_photo (Itdb_PhotoDB *db,
+				Itdb_PhotoAlbum *album,
+				Itdb_Artwork *photo)
 {
-	gboolean result = TRUE;
-	GList *it;
+    GList *it;
 
-	g_return_val_if_fail (db, FALSE);
+    g_return_if_fail (db);
 
-	/* Remove the photo from the image list */
-	for (it = db->photos; it != NULL; it = it->next) {
-		Itdb_Artwork *artwork;
+    /* If album==NULL, or album is the master album, remove from all
+     * albums */
+    if ((album == NULL) || (album == g_list_nth_data (db->photoalbums, 0)))
+    {
+        /* Remove the photo from any albums containing it */
+        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);
+	    }
+        }
+        /* Remove the photo from the image list */
+	db->photos = g_list_remove (db->photos, photo);
+	/* Free the photo */
+	itdb_artwork_free (photo);
+    }
+    /* If album is specified, only remove it from that album */
+    else
+    {
+        album->members = g_list_remove (album->members, photo);
+    }
+}
 
-		artwork = (Itdb_Artwork *)it->data;
-		if( artwork->id == photo_id ) {
-			db->photos = g_list_remove (db->photos, artwork);
-			break;
-		}
-	}
+/**
+ * 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.
+ *
+ * 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,
+ * else NULL
+ */
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_by_name (Itdb_PhotoDB *db, const gchar *albumname)
+{
+	GList *it;
 
-	/* Remove the photo from any albums containing it */
+	if( albumname == NULL )
+	    return g_list_nth_data (db->photoalbums, 0);
+
 	for (it = db->photoalbums; it != NULL; it = it->next) {
 		Itdb_PhotoAlbum *album;
 
 		album = (Itdb_PhotoAlbum *)it->data;
-		album->members = g_list_remove (album->members, GINT_TO_POINTER(photo_id));
-		album->num_images = g_list_length( album->members );
+		if( strcmp(album->name, albumname) == 0 )
+			return album;
 	}
-	return result;
+	return NULL;
 }
 
-Itdb_PhotoAlbum *itdb_photodb_photoalbum_new (Itdb_PhotoDB *db,
-		const gchar *album_name)
+/**
+ * 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.
+ *
+ * Remove @album from the Photo Database. If remove_pics is TRUE,
+ * remove all photos contained in @album from the Photo Database.
+ *
+ * Memory used by the removed album will be freed and the album cannot
+ * be accessed any more.
+ **/
+void itdb_photodb_photoalbum_remove (Itdb_PhotoDB *db,
+				     Itdb_PhotoAlbum *album,
+				     gboolean remove_pics)
 {
-	Itdb_PhotoAlbum *photoalbum;
+        GList *it;
 
-	g_return_val_if_fail (db, FALSE);
-	g_return_val_if_fail (album_name, FALSE);
+        g_return_if_fail (db);
+        g_return_if_fail (album);
 
-	photoalbum = g_new0 (Itdb_PhotoAlbum, 1);
-	photoalbum->album_id = itdb_get_free_photoalbum_id( db );
-	photoalbum->prev_album_id = photoalbum->album_id - 1;
-	photoalbum->name = g_strdup( album_name );
-	db->photoalbums = g_list_append (db->photoalbums, photoalbum);
+        /* if remove_pics, iterate over the photos within that album
+	 * and remove them from the database */
+        if (remove_pics)
+	{
+            for (it = album->members; it != NULL; it = it->next )
+	    {
+                Itdb_Artwork *photo = it->data;
+                itdb_photodb_remove_photo (db, NULL, photo);
+            }
+        }
+        db->photoalbums = g_list_remove (db->photoalbums, album);
+	itdb_photodb_photoalbum_free (album);
+}
 
-	return photoalbum;
+/**
+ * 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)
+ *
+ * Adds a photo already in the library to the specified album
+ * @album. Photos are automatically added to the first album (Photo
+ * Library) when calling itdb_photodb_add_photo() or
+ * itdb_photodb_add_photo_from_data(), so you don't have to use this
+ * function to add them there.
+ *
+ */
+
+void itdb_photodb_photoalbum_add_photo (Itdb_PhotoDB *db,
+					Itdb_PhotoAlbum *album,
+					Itdb_Artwork *photo,
+					gint position)
+{
+    g_return_if_fail (db);
+    g_return_if_fail (album);
+    g_return_if_fail (photo);
+
+    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).
+ *
+ * Create and add a new photoalbum.
+ *
+ * Return value: the album which was created and added.
+ */
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_create (Itdb_PhotoDB *db,
+						 const gchar *albumname,
+						 gint pos)
+{
+	Itdb_PhotoAlbum *album;
+
+	g_return_val_if_fail (db, NULL);
+	g_return_val_if_fail (albumname, NULL);
+
+	album = g_new0 (Itdb_PhotoAlbum, 1);
+	album->album_type = 2; /* normal album, set to 1 for Photo Library */
+	album->name = g_strdup(albumname);
+	db->photoalbums = g_list_insert (db->photoalbums, album, pos);
+
+	return album;
+}
+
+/**
  * itdb_photodb_write:
  * @photodb: the #Itdb_PhotoDB to write to disk
  * @error: return location for a #GError or NULL
@@ -398,7 +710,9 @@
  **/
 gboolean itdb_photodb_write (Itdb_PhotoDB *photodb, GError **error)
 {
-    gboolean result;
+    gint result;
+    GList *gl;
+    gint32 id, prev_id;
 
     g_return_val_if_fail (photodb, FALSE);
     g_return_val_if_fail (photodb->device, FALSE);
@@ -406,12 +720,41 @@
     if (photodb->device->byte_order == 0)
 	itdb_device_autodetect_endianess (photodb->device);
 
+    /* set up photo_ids */
+    id = 0x40;
+    for (gl=photodb->photos; gl; gl=gl->next)
+    {
+	Itdb_Artwork *photo = gl->data;
+	g_return_val_if_fail (photo, FALSE);
+	photo->id = id;
+	++id;
+    }
+    /* set up album_ids -- this is how my iPod Nano does it... */
+    prev_id = 0x64;
+    id = prev_id + g_list_length (photodb->photos);
+    for (gl=photodb->photoalbums; gl; gl=gl->next)
+    {
+	Itdb_PhotoAlbum *album = gl->data;
+	g_return_val_if_fail (album, FALSE);
+	album->album_id = id;
+	album->prev_album_id = prev_id;
+	++id;
+	++prev_id;
+	if (gl != photodb->photoalbums)
+	{   /* except for the first album */
+	    prev_id += g_list_length (album->members);
+	}
+    }
+
     result = ipod_write_photo_db (photodb);
 
     /* Write SysInfo file if it has changed */
-    if (!(*error) && photodb->device->sysinfo_changed)
+    if (!error || !(*error))
     {
-	itdb_device_write_sysinfo (photodb->device, error);
+	if (photodb->device->sysinfo_changed)
+	{
+	    itdb_device_write_sysinfo (photodb->device, error);
+	}
     }
 
     if (result == -1)

Modified: libgpod/trunk/src/itdb_playlist.c
===================================================================
--- libgpod/trunk/src/itdb_playlist.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_playlist.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-23 21:25:39 jcs>
+/* Time-stamp: <2006-10-22 17:42:28 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -24,7 +24,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_playlist.c,v 1.19 2006/09/23 12:28:23 jcsjcs Exp $
+|  $Id: itdb_playlist.c,v 1.20 2006/10/22 08:42:49 jcsjcs Exp $
 */
 
 #include "itdb_private.h"
@@ -1232,8 +1232,9 @@
     }
     if (pl->sortorder == 0)  pl->sortorder = ITDB_PSO_MANUAL;
     if (pl->timestamp == 0)  pl->timestamp = itdb_time_get_mac_time ();
-    if (pos == -1)  itdb->playlists = g_list_append (itdb->playlists, pl);
-    else  itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
+
+    /* pos == -1 appends at the end of the list */
+    itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
 }
 
 
@@ -1335,8 +1336,7 @@
 
     track->itdb = pl->itdb;
 
-    if (pos == -1)  pl->members = g_list_append (pl->members, track);
-    else  pl->members = g_list_insert (pl->members, track, pos);
+    pl->members = g_list_insert (pl->members, track, pos);
 }
 
 

Modified: libgpod/trunk/src/itdb_private.h
===================================================================
--- libgpod/trunk/src/itdb_private.h	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_private.h	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-01 23:31:27 jcs>
+/* Time-stamp: <2007-01-06 20:46:59 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -24,7 +24,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_private.h,v 1.14 2006/06/01 15:45:28 jcsjcs Exp $
+|  $Id: itdb_private.h,v 1.16 2007/01/08 10:23:15 jcsjcs Exp $
 */
 
 #ifndef __ITDB_PRIVATE_H__
@@ -34,6 +34,7 @@
 #  include <config.h>
 #endif
 #include "glib-compat.h"
+#include "itdb_device.h"
 #include "itdb.h"
 
 /* always use itdb_playlist_is_mpl() to check for MPL! */
@@ -86,6 +87,8 @@
     guint32 bookmark_time;
     gint32 rating;
     gint32 pc_unk16;     /* unknown field in Play Counts file */
+    guint32 skipcount;
+    guint32 last_skipped;
     gint32 st_unk06;     /* unknown field in iTunesStats file */
     gint32 st_unk09;     /* unknown field in iTunesStats file */
 };
@@ -148,4 +151,5 @@
 G_GNUC_INTERNAL gint itdb_get_free_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);
 #endif

Modified: libgpod/trunk/src/itdb_track.c
===================================================================
--- libgpod/trunk/src/itdb_track.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/itdb_track.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-18 01:33:31 jcs>
+/* Time-stamp: <2006-11-23 23:32:16 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -24,7 +24,7 @@
 |
 |  This product is not supported/written/published by Apple!
 |
-|  $Id: itdb_track.c,v 1.21 2006/09/17 17:14:21 jcsjcs Exp $
+|  $Id: itdb_track.c,v 1.25 2007/01/13 20:24:50 tmzullinger Exp $
 */
 
 #include <config.h>
@@ -169,17 +169,17 @@
 	 * proven that setting unk208 to non-0 doesn't upset older
 	 * ipod models
 	 */
-	if (tr->unk208 == 0)
+	if (tr->mediatype == 0)
 	{
 	    if (haystack (tr->filetype, m4v_desc))
 	    {
 		/* set type to video (0x00000002) */
-		tr->unk208 = 0x00000002;
+		tr->mediatype = 0x00000002;
 	    }
 	    else
 	    {
 		/* set type to audio */
-		tr->unk208 = 0x00000001;
+		tr->mediatype = 0x00000001;
 	    }
 	}
     }
@@ -234,8 +234,7 @@
 
     itdb_track_set_defaults (track);
 
-    if (pos == -1)  itdb->tracks = g_list_append (itdb->tracks, track);
-    else  itdb->tracks = g_list_insert (itdb->tracks, track, pos);
+    itdb->tracks = g_list_insert (itdb->tracks, track, pos);
 }
 
 /**
@@ -261,6 +260,11 @@
     g_free (track->podcasturl);
     g_free (track->podcastrss);
     g_free (track->subtitle);
+    g_free (track->tvshow);
+    g_free (track->tvepisode);
+    g_free (track->tvnetwork);
+    g_free (track->albumartist);
+    g_free (track->keywords);
     g_free (track->ipod_path);
     g_free (track->chapterdata_raw);
     itdb_artwork_remove_thumbnails (track->artwork);
@@ -345,6 +349,11 @@
     tr_dup->podcasturl = g_strdup (tr->podcasturl);
     tr_dup->podcastrss = g_strdup (tr->podcastrss);
     tr_dup->subtitle = g_strdup (tr->subtitle);
+    tr_dup->tvshow = g_strdup (tr->tvshow);
+    tr_dup->tvepisode = g_strdup (tr->tvepisode);
+    tr_dup->tvnetwork = g_strdup (tr->tvnetwork);
+    tr_dup->albumartist = g_strdup (tr->albumartist);
+    tr_dup->keywords = g_strdup (tr->keywords);
     tr_dup->ipod_path = g_strdup (tr->ipod_path);
 
     /* Copy chapterdata */
@@ -371,7 +380,9 @@
 static gboolean itdb_track_set_thumbnails_internal (Itdb_Track *track,
 						    const gchar *filename,
 						    const guchar *image_data,
-						    gsize image_data_len)
+						    gsize image_data_len,
+						    gint rotation,
+						    GError **error)
 {					     
     gboolean result = FALSE;
 
@@ -383,23 +394,25 @@
     {
 	result = itdb_artwork_add_thumbnail (track->artwork,
 					     ITDB_THUMB_COVER_SMALL,
-					     filename);
+					     filename, rotation, error);
 	if (result == TRUE)
 	    result = itdb_artwork_add_thumbnail (track->artwork,
 						 ITDB_THUMB_COVER_LARGE,
-						 filename);
+						 filename, rotation, error);
     }
     if (image_data)
     {
 	result = itdb_artwork_add_thumbnail_from_data (track->artwork,
 						       ITDB_THUMB_COVER_SMALL,
 						       image_data,
-						       image_data_len);
+						       image_data_len,
+						       rotation, error);
 	if (result == TRUE)
 	    result = itdb_artwork_add_thumbnail_from_data (track->artwork,
 							   ITDB_THUMB_COVER_LARGE,
 							   image_data,
-							   image_data_len);
+							   image_data_len,
+							   rotation, error);
     }
 
     if (result == TRUE)
@@ -444,7 +457,8 @@
     g_return_val_if_fail (track, FALSE);
     g_return_val_if_fail (filename, FALSE);
 
-    return itdb_track_set_thumbnails_internal (track, filename, NULL, 0);
+    return itdb_track_set_thumbnails_internal (track, filename, NULL, 0,
+					       0, NULL);
 }
 
 
@@ -472,7 +486,8 @@
     g_return_val_if_fail (image_data, FALSE);
 
     return itdb_track_set_thumbnails_internal (track, NULL,
-					       image_data, image_data_len);
+					       image_data, image_data_len,
+					       0, NULL);
 }
 
 

Modified: libgpod/trunk/src/ithumb-writer.c
===================================================================
--- libgpod/trunk/src/ithumb-writer.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/src/ithumb-writer.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,6 +1,9 @@
-/*
+/*  Time-stamp: <2007-01-09 22:00:03 jcs>
+ *
  *  Copyright (C) 2005 Christophe Fergeau
  *
+ *  URL: http://www.gtkpod.org/libgpod.html
+ *  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
@@ -20,6 +23,7 @@
  * 
  *  This product is not supported/written/published by Apple!
  *
+ *  $Id: ithumb-writer.c,v 1.26 2007/01/09 13:31:13 jcsjcs Exp $
  */
 
 #include <config.h>
@@ -30,11 +34,11 @@
 
 #include "itdb_private.h"
 #include "itdb_endianness.h"
+#include "pixmaps.h"
 
 #include <errno.h>
 #include <locale.h>
 #include <string.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include <unistd.h>
 #include <sys/types.h>
@@ -42,23 +46,25 @@
 #include <fcntl.h>
 
 
+#define ITHUMB_MAX_SIZE (500L*1000L*1000L)
+/* for testing: */
+/*#define ITHUMB_MAX_SIZE (1L*1000L*1000L)*/
+
 struct _iThumbWriter {
 	off_t cur_offset;
 	FILE *f;
+        gchar *mountpoint;
         gchar *filename;
-	Itdb_ArtworkFormat *img_info;
+        gint current_file_index;
+	const Itdb_ArtworkFormat *img_info;
         DbType db_type;
         guint byte_order;
 };
 typedef struct _iThumbWriter iThumbWriter;
 
-/* The iPod expect square thumbnails with 2 specific side sizes (0x38 and 0x8c
- * respectively for small and fullscreen thumbnails), the 'size' parameter is
- * here to specify which size we are interested in in case the pixbuf is non
- * square
- */
+
 static guint16 *
-pack_RGB_565 (GdkPixbuf *pixbuf, iThumbWriter *writer,
+pack_RGB_565 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
 	      gint horizontal_padding, gint vertical_padding)
 {
 	guchar *pixels;
@@ -75,24 +81,17 @@
 		      "rowstride", &row_stride, "n-channels", &channels,
 		      "height", &height, "width", &width,
 		      "pixels", &pixels, NULL);
-	g_return_val_if_fail ((width <= writer->img_info->width) && (height <= writer->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
 	 */
-	result = g_malloc0 (writer->img_info->width * writer->img_info->height * 2);
+	result = g_malloc0 (img_info->width * img_info->height * 2);
 
-	/* Swap the byte order on full screen nano photos */
-	byte_order = writer->byte_order;
-	if ( writer->img_info->correlation_id == 1023) {
-		if (byte_order == G_LITTLE_ENDIAN)
-			byte_order = G_BIG_ENDIAN;
-		else
-			byte_order = G_LITTLE_ENDIAN; 
-	}
+	byte_order = itdb_thumb_get_byteorder (img_info->format);
 
 	for (h = 0; h < height; h++) {
-	        gint line = (h+vertical_padding)*writer->img_info->width;
+	        gint line = (h+vertical_padding)*img_info->width;
 		for (w = 0; w < width; w++) {
 			gint r;
 			gint g;
@@ -116,6 +115,112 @@
 }
 
 
+/* pack_UYVY() is adapted from imgconvert.c from the GPixPod project
+ * (www.gpixpod.org) */
+static guchar *
+pack_UYVY (GdkPixbuf *orig_pixbuf, const Itdb_ArtworkFormat *img_info,
+	   gint horizontal_padding, gint vertical_padding)
+{
+    GdkPixbuf *pixbuf;
+    guchar *pixels, *yuvdata;
+    gint width;
+    gint height;
+    gint orig_height, orig_width;
+    gint x = 0;
+    gint z = 0;
+    gint z2 = 0;
+    gint h = 0;
+    gint r0, g0, b0, r1, g1, b1, r2, g2, b2, r3, g3, b3;
+    gint rowstride;
+    gint yuvsize, halfyuv;
+    gint alphabit, rgbpx;
+    gint exc;
+
+    g_return_val_if_fail (img_info, NULL);
+
+    width = img_info->width;
+    height = img_info->height;
+
+    g_object_get (G_OBJECT (orig_pixbuf), 
+		  "height", &orig_height, "width", &orig_width, NULL);
+
+    /* copy into new pixmap with padding applied */
+    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+			     gdk_pixbuf_get_has_alpha (orig_pixbuf),
+			     8,
+			     width, height);
+    gdk_pixbuf_copy_area (orig_pixbuf, 0, 0, orig_width, orig_height,
+			  pixbuf, horizontal_padding, vertical_padding);
+
+    g_object_get (G_OBJECT (pixbuf), 
+		  "rowstride", &rowstride,
+		  "pixels", &pixels, NULL);
+
+    yuvsize = width*2*height;
+    yuvdata = g_malloc (yuvsize);
+    halfyuv = yuvsize/2;
+    if (gdk_pixbuf_get_has_alpha(pixbuf))
+    {
+	alphabit = 1;
+	rgbpx = 4;
+    }
+    else
+    {
+	alphabit = 0;
+	rgbpx = 3;
+    }
+    exc = rowstride - width*rgbpx;
+
+    while(h < height)
+    {
+	gint w = 0;
+	if((h % 2) == 0)
+	{
+	    while(w < width)
+	    {
+		r0 = pixels[x];
+		g0 = pixels[x+1];
+		b0 = pixels[x+2];
+		r1 = pixels[x+3+alphabit];
+		g1 = pixels[x+4+alphabit];
+		b1 = pixels[x+5+alphabit];
+		yuvdata[z] = ((r0*-38 + g0*-74 + b0*112 + 128) >> 8) + 128;/*U0*/
+		yuvdata[z+1] = ((r0*66 + g0*129 + b0*25 + 128) >> 8) + 16;/*Y0*/
+		yuvdata[z+2] = ((r0*112 + g0*-94 + b0*-18 + 128) >> 8) + 128;/*V0*/
+		yuvdata[z+3] = ((r1*66 + g1*129 + b1*25 + 128) >> 8) + 16;/*Y1*/
+		w += 2;
+		z += 4;
+		x += rgbpx*2;
+	    }
+	}
+	else
+	{
+	    while(w < width)
+	    {
+		r2 = pixels[x];
+		g2 = pixels[x+1];
+		b2 = pixels[x+2];
+		r3 = pixels[x+3+alphabit];
+		g3 = pixels[x+4+alphabit];
+		b3 = pixels[x+5+alphabit];
+		yuvdata[halfyuv+z2] = ((r2*-38 + g2*-74 + b2*112 + 128) >> 8) + 128;/*U1*/
+		yuvdata[halfyuv+z2+1] = ((r2*66 + g2*129 + b2*25 + 128) >> 8) + 16;/*Y2*/
+		yuvdata[halfyuv+z2+2] = ((r2*112 + g2*-94 + b2*-18 + 128) >> 8) + 128;/*V1*/
+		yuvdata[halfyuv+z2+3] = ((r3*66 + g3*129 + b3*25 + 128) >> 8) + 16;/*Y3*/
+		w += 2;
+		z2 += 4;
+		x += rgbpx*2;
+	    }
+	}
+	x += exc;
+	h++;
+    }
+    g_object_unref (pixbuf);
+    return yuvdata;
+}
+
+
+
 static char *
 ipod_image_get_ithmb_filename (const char *mount_point, gint correlation_id, gint index, DbType db_type ) 
 {
@@ -172,7 +277,7 @@
 	}
 	}
 
-	buf = g_strdup_printf ("F%04u_%d.ithmb", correlation_id, index);
+	buf = g_strdup_printf ("F%d_%d.ithmb", correlation_id, index);
 
 	filename = itdb_get_path (artwork_dir, buf);
 
@@ -195,34 +300,55 @@
 			       Itdb_Thumb *thumb)
 {
     GdkPixbuf *pixbuf = NULL;
-    guint16 *pixels;
-    gint width, height;
+    void *pixels = NULL;
+    gint width, height; /* must be gint -- see comment below */
 
     g_return_val_if_fail (writer, FALSE);
+    g_return_val_if_fail (writer->img_info, FALSE);
     g_return_val_if_fail (thumb, FALSE);
 
+    /* Make sure @rotation is valid (0, 90, 180, 270) */
+    thumb->rotation = thumb->rotation % 360;
+    thumb->rotation /= 90;
+    thumb->rotation *= 90;
+
+    /* If we rotate by 90 or 270 degrees interchange the width and
+     * height */
+
+    if ((thumb->rotation == 0) || (thumb->rotation == 180))
+    {
+	width = writer->img_info->width;
+	height = writer->img_info->height;
+    }
+    else
+    {
+	width = writer->img_info->height;
+	height = writer->img_info->width;
+    }
+
     if (thumb->filename)
     {   /* read image from filename */
 	pixbuf = gdk_pixbuf_new_from_file_at_size (thumb->filename, 
-						   writer->img_info->width, 
-						   writer->img_info->height,
+						   width, height,
 						   NULL);
 
+	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,
-				    writer->img_info->width, 
-				    writer->img_info->height);
+				    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);
-	g_object_ref (pixbuf);
+	if (pixbuf)
+	    g_object_ref (pixbuf);
 	g_object_unref (loader);
 
 	g_free (thumb->image_data);
@@ -232,9 +358,42 @@
 
     if (pixbuf == NULL)
     {
-	return FALSE;
+	/* 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)
+	{
+	    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;
     }
 
+    /* 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;
+    }
+
     /* !! cannot write directly to &thumb->width/height because
        g_object_get() returns a gint, but thumb->width/height are
        gint16 !! */
@@ -243,23 +402,22 @@
 		  "height", &height,
 		  NULL);
 
-    g_free (thumb->filename);
-    thumb->filename = NULL;
-
-    /* FIXME: under certain conditions (probably related to
-     * writer->offset getting too big), this should be :F%04u_2.ithmb
-     * and so on
-     */
-    if( thumb->type == ITDB_THUMB_PHOTO_LARGE ||
-	thumb->type == ITDB_THUMB_PHOTO_SMALL ||
-	thumb->type == ITDB_THUMB_PHOTO_FULL_SCREEN )
+    switch (thumb->type)
     {
-	thumb->filename = g_strdup_printf (":Thumbs:F%04u_1.ithmb", 
-					   writer->img_info->correlation_id);
-	
-    } else {
-	thumb->filename = g_strdup_printf (":F%04u_1.ithmb", 
-					   writer->img_info->correlation_id);
+    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:
+	thumb->filename = g_strdup_printf (":F%d_%d.ithmb", 
+					   writer->img_info->correlation_id,
+					   writer->current_file_index);
+	break;
     }
 
     switch (writer->db_type)
@@ -287,9 +445,27 @@
     thumb->offset = writer->cur_offset;
     thumb->size = writer->img_info->width * writer->img_info->height * 2;
 
-    pixels = pack_RGB_565 (pixbuf, writer,
-			   thumb->horizontal_padding,
-			   thumb->vertical_padding);
+    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);
+	break;
+    case THUMB_FORMAT_UYVY:
+	pixels = pack_UYVY (pixbuf, writer->img_info,
+			    thumb->horizontal_padding,
+			    thumb->vertical_padding);
+	break;
+    }
+
+
     g_object_unref (G_OBJECT (pixbuf));
 
     if (pixels == NULL)
@@ -307,6 +483,47 @@
     return TRUE;
 }
 
+static gboolean
+ithumb_writer_update (iThumbWriter *writer)
+{
+    while ((writer->f == NULL) || (writer->cur_offset >= ITHUMB_MAX_SIZE))
+    {
+	if (writer->f)
+	{
+	    fclose (writer->f);
+	    writer->f = NULL;
+	}
+	g_free (writer->filename);
+	writer->filename = NULL;
+
+	/* increment index for filename */
+	++writer->current_file_index;
+
+	writer->filename =
+	    ipod_image_get_ithmb_filename (writer->mountpoint, 
+					   writer->img_info->correlation_id,
+					   writer->current_file_index, 
+					   writer->db_type);
+	if (writer->filename == NULL)
+	{
+	    return FALSE;
+	}
+	writer->f = fopen (writer->filename, "ab");
+	if (writer->f == NULL)
+	{
+	    g_print ("Error opening %s: %s\n", writer->filename, strerror (errno));
+	    g_free (writer->filename);
+	    writer->filename = NULL;
+	    return FALSE;
+	}
+	writer->cur_offset = ftell (writer->f);
+    }
+
+    return TRUE;
+}
+
+
+
 static void
 write_thumbnail (gpointer _writer, gpointer _artwork)
 {
@@ -321,64 +538,57 @@
 	   thumbnail file */
 	if (thumb && (thumb->size == 0))
 	{
-	    ithumb_writer_write_thumbnail (writer, thumb);
+	    /* check if new thumbnail file has to be started */
+	    if (ithumb_writer_update (writer))
+		ithumb_writer_write_thumbnail (writer, thumb);
 	}
 }
 
+
+static void
+ithumb_writer_free (iThumbWriter *writer)
+{
+	g_return_if_fail (writer != NULL);
+	if (writer->f)
+	{
+	    fclose (writer->f);
+	    if (writer->filename && (writer->cur_offset == 0))
+	    {   /* Remove empty file */
+		unlink (writer->filename);
+	    }
+	}
+	g_free (writer->filename);
+	g_free (writer->mountpoint);
+	g_free (writer);
+}
+
+
 static iThumbWriter *
 ithumb_writer_new (const char *mount_point,
 		   const Itdb_ArtworkFormat *info,
 		   DbType db_type,
 		   guint byte_order)
 {
-	char *filename;
 	iThumbWriter *writer;
 
 	writer = g_new0 (iThumbWriter, 1);
 
-	writer->img_info = g_memdup (info, sizeof (Itdb_ArtworkFormat));
+	writer->img_info = info;
 
 	writer->byte_order = byte_order;
 	writer->db_type = db_type;
+	writer->mountpoint = g_strdup (mount_point);
+	writer->current_file_index = 0;
 
-	filename = ipod_image_get_ithmb_filename (mount_point, 
-						  info->correlation_id,
-						  1, 
-						  db_type);
-	if (filename == NULL) {
-		g_free (writer->img_info);
-		g_free (writer);
-		return NULL;
+	if (!ithumb_writer_update (writer))
+	{
+	    ithumb_writer_free (writer);
+	    return NULL;
 	}
-	writer->f = fopen (filename, "ab");
-	if (writer->f == NULL) {
-		g_print ("Error opening %s: %s\n", filename, strerror (errno));
-		g_free (filename);
-		g_free (writer->img_info);
-		g_free (writer);
-		return NULL;
-	}
-	writer->cur_offset = ftell (writer->f);
-	writer->filename=filename;
-	
+
 	return writer;
 }
 
-static void
-ithumb_writer_free (iThumbWriter *writer)
-{
-	g_return_if_fail (writer != NULL);
-	fclose (writer->f);
-	if (writer->cur_offset == 0)
-	{   /* Remove empty file */
-	    unlink (writer->filename);
-	}
-	g_free (writer->img_info);
-	g_free (writer->filename);
-	g_free (writer);
-}
-
-
 gint offset_sort (gconstpointer a, gconstpointer b);
 gint offset_sort (gconstpointer a, gconstpointer b)
 {
@@ -609,7 +819,7 @@
 					  g_free, NULL);
 
     /* Create a hash with all filenames used for thumbnails.
-       This will usually be a number of "F%04d_%d.ithmb" files. A
+       This will usually be a number of "F%d_%d.ithmb" files. A
        GList is kept with pointers to all images in a given file which
        allows to adjust the offset pointers */
 	switch (db->db_type) {
@@ -665,7 +875,7 @@
     /* Check for files present on the iPod but no longer referenced by
        thumbs */
 
-    for (i=0; i<10; ++i)
+    for (i=0; i<50; ++i)
     {
 	filename = ipod_image_get_ithmb_filename (mountpoint,
 						  info->correlation_id,
@@ -682,6 +892,15 @@
 	g_free (filename);
     }
 
+    /* I'm using the _foreach_remove variant here because the
+       thumbnail GList may get changed while calling
+       ithumb_rearrange_thumbnail_file but cannot be written back into
+       the hash table. Using the _foreach_remove variant here will
+       ensure that it will not be possible to access the invalid
+       thumbnail GList. The only proper operation after the
+       _foreach_remove is a call to g_hash_table_destroy().
+       For the same reasons the thumb GList gets free'd in
+       ithumb_rearrange_thumbnail_file() */
     g_hash_table_foreach_remove (filenamehash,
 				 ithumb_rearrange_thumbnail_file, &result);
     g_hash_table_destroy (filenamehash);
@@ -725,8 +944,8 @@
 		case ITDB_THUMB_PHOTO_SMALL:
 		case ITDB_THUMB_PHOTO_LARGE:
 		case ITDB_THUMB_PHOTO_FULL_SCREEN:
-		    ithmb_rearrange_existing_thumbnails (db,
-							     format );
+		case ITDB_THUMB_PHOTO_TV_SCREEN:
+		        ithmb_rearrange_existing_thumbnails (db, format );
 			writer = ithumb_writer_new (mount_point, 
 						    format,
 						    db->db_type, 
@@ -735,8 +954,6 @@
 				writers = g_list_prepend (writers, writer);
 			}
 			break;
-		default:
-			break;
 		}
 		format++;
 	}

Copied: libgpod/trunk/src/pixmaps.c (from rev 167, libgpod/branches/upstream/current/src/pixmaps.c)

Copied: libgpod/trunk/src/pixmaps.h (from rev 167, libgpod/branches/upstream/current/src/pixmaps.h)

Modified: libgpod/trunk/tests/Makefile.am
===================================================================
--- libgpod/trunk/tests/Makefile.am	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/tests/Makefile.am	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,5 +1,14 @@
 if HAVE_GDKPIXBUF
 TESTTHUMBS=test-thumbnails test-write-thumbnails test-photos
+
+test_thumbnails_SOURCES = test-covers.c
+test_thumbnails_CFLAGS = $(AM_CFLAGS)
+
+test_write_thumbnails_SOURCES = test-write-covers.c
+test_write_thumbnails_CFLAGS = $(AM_CFLAGS)
+
+test_photos_SOURCES = test-photos.c
+test_photos_CFLAGS = $(AM_CFLAGS)
 else
 TESTTHUMBS=
 endif
@@ -8,36 +17,23 @@
 
 if HAVE_TAGLIB
 TESTTAGLIB=test-rebuild-db
+test_rebuild_db_SOURCES = test-rebuild-db.cc
+test_rebuild_db_LDADD = $(TAGLIB_LIBS)
+test_rebuild_db_CXXFLAGS = $(TAGLIB_CFLAGS)
 else
 TESTTAGLIB=
 endif
 
-noinst_PROGRAMS=test-itdb test-ls $(TESTTHUMBS) $(TESTTAGLIB) $(TESTMISC)
-
-INCLUDES=$(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
-LIBS=$(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la
-
 test_itdb_SOURCES = itdb_main.c
 test_itdb_LDADD = 
 
 test_ls_SOURCES = test-ls.c
 test_ls_LDADD = 
 
-if HAVE_TAGLIB
-test_rebuild_db_SOURCES = test-rebuild-db.cc
-test_rebuild_db_LDADD = $(TAGLIB_LIBS)
-test_rebuild_db_CXXFLAGS = $(TAGLIB_CFLAGS)
-endif
-
-if HAVE_GDKPIXBUF
-test_thumbnails_SOURCES = test-covers.c
-test_thumbnails_CFLAGS = $(AM_CFLAGS)
-
-test_photos_SOURCES = test-photos.c
-test_photos_CFLAGS = $(AM_CFLAGS)
-
 test_init_ipod_SOURCES = test-init-ipod.c
+test_init_ipod_LDADD = 
 
-test_write_thumbnails_SOURCES = test-write-covers.c
-test_write_thumbnails_CFLAGS = $(AM_CFLAGS)
-endif
+noinst_PROGRAMS=test-itdb test-ls $(TESTTHUMBS) $(TESTTAGLIB) $(TESTMISC)
+
+INCLUDES=$(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
+LIBS=$(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la

Modified: libgpod/trunk/tests/Makefile.in
===================================================================
--- libgpod/trunk/tests/Makefile.in	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/tests/Makefile.in	2007-01-25 10:46:30 UTC (rev 168)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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.
@@ -21,7 +21,6 @@
 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
@@ -35,7 +34,88 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+noinst_PROGRAMS = test-itdb$(EXEEXT) test-ls$(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
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+ at HAVE_GDKPIXBUF_TRUE@am__EXEEXT_1 = test-thumbnails$(EXEEXT) \
+ at HAVE_GDKPIXBUF_TRUE@	test-write-thumbnails$(EXEEXT) \
+ at HAVE_GDKPIXBUF_TRUE@	test-photos$(EXEEXT)
+ at HAVE_TAGLIB_TRUE@am__EXEEXT_2 = test-rebuild-db$(EXEEXT)
+am__EXEEXT_3 = test-init-ipod$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_test_init_ipod_OBJECTS = test-init-ipod.$(OBJEXT)
+test_init_ipod_OBJECTS = $(am_test_init_ipod_OBJECTS)
+test_init_ipod_DEPENDENCIES =
+am_test_itdb_OBJECTS = itdb_main.$(OBJEXT)
+test_itdb_OBJECTS = $(am_test_itdb_OBJECTS)
+test_itdb_DEPENDENCIES =
+am_test_ls_OBJECTS = test-ls.$(OBJEXT)
+test_ls_OBJECTS = $(am_test_ls_OBJECTS)
+test_ls_DEPENDENCIES =
+am__test_photos_SOURCES_DIST = test-photos.c
+ at HAVE_GDKPIXBUF_TRUE@am_test_photos_OBJECTS =  \
+ at HAVE_GDKPIXBUF_TRUE@	test_photos-test-photos.$(OBJEXT)
+test_photos_OBJECTS = $(am_test_photos_OBJECTS)
+test_photos_LDADD = $(LDADD)
+am__test_rebuild_db_SOURCES_DIST = test-rebuild-db.cc
+ at HAVE_TAGLIB_TRUE@am_test_rebuild_db_OBJECTS =  \
+ at HAVE_TAGLIB_TRUE@	test_rebuild_db-test-rebuild-db.$(OBJEXT)
+test_rebuild_db_OBJECTS = $(am_test_rebuild_db_OBJECTS)
+am__DEPENDENCIES_1 =
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_DEPENDENCIES =  \
+ at HAVE_TAGLIB_TRUE@	$(am__DEPENDENCIES_1)
+am__test_thumbnails_SOURCES_DIST = test-covers.c
+ at HAVE_GDKPIXBUF_TRUE@am_test_thumbnails_OBJECTS =  \
+ at HAVE_GDKPIXBUF_TRUE@	test_thumbnails-test-covers.$(OBJEXT)
+test_thumbnails_OBJECTS = $(am_test_thumbnails_OBJECTS)
+test_thumbnails_LDADD = $(LDADD)
+am__test_write_thumbnails_SOURCES_DIST = test-write-covers.c
+ at HAVE_GDKPIXBUF_TRUE@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)
+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)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --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)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+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)
+DIST_SOURCES = $(test_init_ipod_SOURCES) $(test_itdb_SOURCES) \
+	$(test_ls_SOURCES) $(am__test_photos_SOURCES_DIST) \
+	$(am__test_rebuild_db_SOURCES_DIST) \
+	$(am__test_thumbnails_SOURCES_DIST) \
+	$(am__test_write_thumbnails_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -120,11 +200,9 @@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
-LIBGPOD_AGE = @LIBGPOD_AGE@
 LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
-LIBGPOD_CURRENT = @LIBGPOD_CURRENT@
 LIBGPOD_LIBS = @LIBGPOD_LIBS@
-LIBGPOD_REVISION = @LIBGPOD_REVISION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
 LIBGPOD_VERSION = @LIBGPOD_VERSION@
 LIBOBJS = @LIBOBJS@
 LIBS = $(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la
@@ -178,6 +256,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -203,6 +283,7 @@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
@@ -218,154 +299,59 @@
 target_alias = @target_alias@
 @HAVE_GDKPIXBUF_FALSE at TESTTHUMBS = 
 @HAVE_GDKPIXBUF_TRUE at TESTTHUMBS = test-thumbnails test-write-thumbnails test-photos
-
+ at HAVE_GDKPIXBUF_TRUE@test_thumbnails_SOURCES = test-covers.c
+ at HAVE_GDKPIXBUF_TRUE@test_thumbnails_CFLAGS = $(AM_CFLAGS)
+ at HAVE_GDKPIXBUF_TRUE@test_write_thumbnails_SOURCES = test-write-covers.c
+ at HAVE_GDKPIXBUF_TRUE@test_write_thumbnails_CFLAGS = $(AM_CFLAGS)
+ at HAVE_GDKPIXBUF_TRUE@test_photos_SOURCES = test-photos.c
+ at HAVE_GDKPIXBUF_TRUE@test_photos_CFLAGS = $(AM_CFLAGS)
 TESTMISC = test-init-ipod
 @HAVE_TAGLIB_FALSE at TESTTAGLIB = 
-
 @HAVE_TAGLIB_TRUE at TESTTAGLIB = test-rebuild-db
-
-noinst_PROGRAMS = test-itdb test-ls $(TESTTHUMBS) $(TESTTAGLIB) $(TESTMISC)
-
-INCLUDES = $(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
-
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_SOURCES = test-rebuild-db.cc
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_LDADD = $(TAGLIB_LIBS)
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_CXXFLAGS = $(TAGLIB_CFLAGS)
 test_itdb_SOURCES = itdb_main.c
 test_itdb_LDADD = 
-
 test_ls_SOURCES = test-ls.c
 test_ls_LDADD = 
-
- at HAVE_TAGLIB_TRUE@test_rebuild_db_SOURCES = test-rebuild-db.cc
- at HAVE_TAGLIB_TRUE@test_rebuild_db_LDADD = $(TAGLIB_LIBS)
- at HAVE_TAGLIB_TRUE@test_rebuild_db_CXXFLAGS = $(TAGLIB_CFLAGS)
-
- at HAVE_GDKPIXBUF_TRUE@test_thumbnails_SOURCES = test-covers.c
- at HAVE_GDKPIXBUF_TRUE@test_thumbnails_CFLAGS = $(AM_CFLAGS)
-
- at HAVE_GDKPIXBUF_TRUE@test_photos_SOURCES = test-photos.c
- at HAVE_GDKPIXBUF_TRUE@test_photos_CFLAGS = $(AM_CFLAGS)
-
- at HAVE_GDKPIXBUF_TRUE@test_init_ipod_SOURCES = test-init-ipod.c
-
- at HAVE_GDKPIXBUF_TRUE@test_write_thumbnails_SOURCES = test-write-covers.c
- at HAVE_GDKPIXBUF_TRUE@test_write_thumbnails_CFLAGS = $(AM_CFLAGS)
-subdir = tests
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_TRUE at noinst_PROGRAMS = \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_TRUE@	test-itdb$(EXEEXT) \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_TRUE@	test-ls$(EXEEXT) \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_TRUE@	test-rebuild-db$(EXEEXT) \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_TRUE@	test-init-ipod$(EXEEXT)
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_FALSE at noinst_PROGRAMS = \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_FALSE@	test-itdb$(EXEEXT) \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_FALSE@	test-ls$(EXEEXT) \
- at HAVE_GDKPIXBUF_FALSE@@HAVE_TAGLIB_FALSE@	test-init-ipod$(EXEEXT)
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE at noinst_PROGRAMS = \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-itdb$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-ls$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-thumbnails$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-write-thumbnails$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-photos$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-rebuild-db$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_TRUE@	test-init-ipod$(EXEEXT)
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE at noinst_PROGRAMS = \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE@	test-itdb$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE@	test-ls$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE@	test-thumbnails$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE@	test-write-thumbnails$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE@	test-photos$(EXEEXT) \
- at HAVE_GDKPIXBUF_TRUE@@HAVE_TAGLIB_FALSE@	test-init-ipod$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-
-am__test_init_ipod_SOURCES_DIST = test-init-ipod.c
- at HAVE_GDKPIXBUF_TRUE@am_test_init_ipod_OBJECTS = \
- at HAVE_GDKPIXBUF_TRUE@	test-init-ipod.$(OBJEXT)
-test_init_ipod_OBJECTS = $(am_test_init_ipod_OBJECTS)
-test_init_ipod_LDADD = $(LDADD)
-test_init_ipod_DEPENDENCIES =
-test_init_ipod_LDFLAGS =
-am_test_itdb_OBJECTS = itdb_main.$(OBJEXT)
-test_itdb_OBJECTS = $(am_test_itdb_OBJECTS)
-test_itdb_DEPENDENCIES =
-test_itdb_LDFLAGS =
-am_test_ls_OBJECTS = test-ls.$(OBJEXT)
-test_ls_OBJECTS = $(am_test_ls_OBJECTS)
-test_ls_DEPENDENCIES =
-test_ls_LDFLAGS =
-am__test_photos_SOURCES_DIST = test-photos.c
- at HAVE_GDKPIXBUF_TRUE@am_test_photos_OBJECTS = \
- at HAVE_GDKPIXBUF_TRUE@	test_photos-test-photos.$(OBJEXT)
-test_photos_OBJECTS = $(am_test_photos_OBJECTS)
-test_photos_LDADD = $(LDADD)
-test_photos_DEPENDENCIES =
-test_photos_LDFLAGS =
-am__test_rebuild_db_SOURCES_DIST = test-rebuild-db.cc
- at HAVE_TAGLIB_TRUE@am_test_rebuild_db_OBJECTS = \
- at HAVE_TAGLIB_TRUE@	test_rebuild_db-test-rebuild-db.$(OBJEXT)
-test_rebuild_db_OBJECTS = $(am_test_rebuild_db_OBJECTS)
- at HAVE_TAGLIB_TRUE@test_rebuild_db_DEPENDENCIES =
- at HAVE_TAGLIB_FALSE@test_rebuild_db_DEPENDENCIES =
-test_rebuild_db_LDFLAGS =
-am__test_thumbnails_SOURCES_DIST = test-covers.c
- at HAVE_GDKPIXBUF_TRUE@am_test_thumbnails_OBJECTS = \
- at HAVE_GDKPIXBUF_TRUE@	test_thumbnails-test-covers.$(OBJEXT)
-test_thumbnails_OBJECTS = $(am_test_thumbnails_OBJECTS)
-test_thumbnails_LDADD = $(LDADD)
-test_thumbnails_DEPENDENCIES =
-test_thumbnails_LDFLAGS =
-am__test_write_thumbnails_SOURCES_DIST = test-write-covers.c
- at HAVE_GDKPIXBUF_TRUE@am_test_write_thumbnails_OBJECTS = \
- at HAVE_GDKPIXBUF_TRUE@	test_write_thumbnails-test-write-covers.$(OBJEXT)
-test_write_thumbnails_OBJECTS = $(am_test_write_thumbnails_OBJECTS)
-test_write_thumbnails_LDADD = $(LDADD)
-test_write_thumbnails_DEPENDENCIES =
-test_write_thumbnails_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
- at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/itdb_main.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/test-init-ipod.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/test-ls.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/test_photos-test-photos.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/test_thumbnails-test-covers.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/test_write_thumbnails-test-write-covers.Po
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
-	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(am__test_init_ipod_SOURCES_DIST) $(test_itdb_SOURCES) \
-	$(test_ls_SOURCES) $(am__test_photos_SOURCES_DIST) \
-	$(am__test_rebuild_db_SOURCES_DIST) \
-	$(am__test_thumbnails_SOURCES_DIST) \
-	$(am__test_write_thumbnails_SOURCES_DIST)
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
-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_init_ipod_SOURCES = test-init-ipod.c
+test_init_ipod_LDADD = 
+INCLUDES = $(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .cc .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  tests/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
 
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
 clean-noinstPROGRAMS:
 	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
 	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
@@ -395,7 +381,7 @@
 	$(LINK) $(test_write_thumbnails_LDFLAGS) $(test_write_thumbnails_OBJECTS) $(test_write_thumbnails_LDADD) $(LIBS)
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
 	-rm -f *.tab.c
@@ -409,203 +395,103 @@
 @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" \
- at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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" \
- at am__fastdepCC_TRUE@	  -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"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_photos-test-photos.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_photos-test-photos.Po' tmpdepfile='$(DEPDIR)/test_photos-test-photos.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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" \
- at am__fastdepCC_TRUE@	  -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"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_photos-test-photos.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_photos-test-photos.Po' tmpdepfile='$(DEPDIR)/test_photos-test-photos.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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`
 
-test_photos-test-photos.lo: test-photos.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.lo -MD -MP -MF "$(DEPDIR)/test_photos-test-photos.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o test_photos-test-photos.lo `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.Plo"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_photos-test-photos.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_photos-test-photos.Plo' tmpdepfile='$(DEPDIR)/test_photos-test-photos.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -c -o test_photos-test-photos.lo `test -f 'test-photos.c' || echo '$(srcdir)/'`test-photos.c
-
 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" \
- at am__fastdepCC_TRUE@	  -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"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_thumbnails-test-covers.Po' tmpdepfile='$(DEPDIR)/test_thumbnails-test-covers.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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" \
- at am__fastdepCC_TRUE@	  -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"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_thumbnails-test-covers.Po' tmpdepfile='$(DEPDIR)/test_thumbnails-test-covers.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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_thumbnails-test-covers.lo: test-covers.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.lo -MD -MP -MF "$(DEPDIR)/test_thumbnails-test-covers.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o test_thumbnails-test-covers.lo `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.Plo"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_thumbnails-test-covers.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_thumbnails-test-covers.Plo' tmpdepfile='$(DEPDIR)/test_thumbnails-test-covers.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -c -o test_thumbnails-test-covers.lo `test -f 'test-covers.c' || echo '$(srcdir)/'`test-covers.c
-
 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" \
- at am__fastdepCC_TRUE@	  -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"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_write_thumbnails-test-write-covers.Po' tmpdepfile='$(DEPDIR)/test_write_thumbnails-test-write-covers.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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" \
- at am__fastdepCC_TRUE@	  -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"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_write_thumbnails-test-write-covers.Po' tmpdepfile='$(DEPDIR)/test_write_thumbnails-test-write-covers.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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`
 
-test_write_thumbnails-test-write-covers.lo: test-write-covers.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.lo -MD -MP -MF "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo" \
- at am__fastdepCC_TRUE@	  -c -o test_write_thumbnails-test-write-covers.lo `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.Plo"; \
- at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo"; exit 1; \
- at am__fastdepCC_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/test_write_thumbnails-test-write-covers.Plo' tmpdepfile='$(DEPDIR)/test_write_thumbnails-test-write-covers.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -c -o test_write_thumbnails-test-write-covers.lo `test -f 'test-write-covers.c' || echo '$(srcdir)/'`test-write-covers.c
-
 .cc.o:
- at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
- at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .cc.lo:
- at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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" \
- at am__fastdepCXX_TRUE@	  -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"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po' tmpdepfile='$(DEPDIR)/test_rebuild_db-test-rebuild-db.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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" \
- at am__fastdepCXX_TRUE@	  -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"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
+ 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
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po' tmpdepfile='$(DEPDIR)/test_rebuild_db-test-rebuild-db.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at 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`
 
-test_rebuild_db-test-rebuild-db.lo: test-rebuild-db.cc
- at am__fastdepCXX_TRUE@	if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.lo -MD -MP -MF "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o test_rebuild_db-test-rebuild-db.lo `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.Plo"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/test_rebuild_db-test-rebuild-db.Plo' tmpdepfile='$(DEPDIR)/test_rebuild_db-test-rebuild-db.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -c -o test_rebuild_db-test-rebuild-db.lo `test -f 'test-rebuild-db.cc' || echo '$(srcdir)/'`test-rebuild-db.cc
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -616,14 +502,6 @@
 	-rm -f libtool
 uninstall-info-am:
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -632,6 +510,7 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -643,10 +522,11 @@
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -669,11 +549,7 @@
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -686,7 +562,7 @@
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -704,7 +580,6 @@
 check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
-
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -725,7 +600,7 @@
 clean-generic:
 
 distclean-generic:
-	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -745,6 +620,8 @@
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
@@ -782,13 +659,14 @@
 .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 info info-am install \
-	install-am install-data install-data-am install-exec \
+	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 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
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-info-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/test-init-ipod.c
===================================================================
--- libgpod/trunk/tests/test-init-ipod.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/tests/test-init-ipod.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -19,15 +19,15 @@
  *
  * This product is not supported/written/published by Apple!
  *
- * $Id: test-init-ipod.c,v 1.2 2006/05/30 14:09:44 jcsjcs Exp $
+ * $Id: test-init-ipod.c,v 1.4 2006/10/02 13:17:58 jcsjcs Exp $
  *
  */
 
 #include "itdb.h"
 
 #include <locale.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <glib/gi18n-lib.h>
+#include <glib-object.h>
+#include <glib/gi18n.h>
 
 
 static void usage (const char *argv0)

Modified: libgpod/trunk/tests/test-photos.c
===================================================================
--- libgpod/trunk/tests/test-photos.c	2007-01-25 10:43:32 UTC (rev 167)
+++ libgpod/trunk/tests/test-photos.c	2007-01-25 10:46:30 UTC (rev 168)
@@ -18,7 +18,7 @@
  *
  * This product is not supported/written/published by Apple!
  *
- * $Id: test-photos.c,v 1.4 2006/06/02 18:08:14 jcsjcs Exp $
+ * $Id: test-photos.c,v 1.12 2007/01/15 15:15:09 jcsjcs Exp $
  *
  */
 
@@ -31,6 +31,34 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <glib/gi18n-lib.h>
 
+static void usage (int argc, char **argv)
+{
+/*    gchar *name = argv[0];*/
+    gchar *name = "test-photos";
+
+    g_print (_("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"), name);
+    g_print (_("Usage to dump all photos to <output_dir>:\n  %s dump <mountpoint> <output_dir>\n"), name);
+    g_print (_("Usage to list all photos IDs to stdout:\n  %s list <mountpoint>\n"), name);
+    g_print (_("Usage to remove photo IDs from Photo Library:\n  %s remove <mountpoint> <albumname> [<ID(s)>]\n  <albumname> should be set to 'NULL' to 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"), name);
+}
+
+/* Retrieve the photo whose ID is @id */
+static Itdb_Artwork *get_photo_by_id (Itdb_PhotoDB *db, guint32 id)
+{
+    GList *gl;
+
+    g_return_val_if_fail (db, NULL);
+
+    for (gl=db->photos; gl; gl=gl->next)
+    {
+	Itdb_Artwork *photo = gl->data;
+	g_return_val_if_fail (photo, NULL);
+
+	if (photo->id == id) return photo;
+    }
+    return NULL;
+}
+
 static void
 save_itdb_thumb (Itdb_PhotoDB *itdb, Itdb_Thumb *thumb,
 		 const gchar *filename)
@@ -69,24 +97,6 @@
 }
 
 static void
-dump_artwork (Itdb_PhotoDB *db, gint photo_id,
-	      const gchar *album_name, const gchar *dir)
-{
-	GList *it;
-
-	for (it = db->photos; it != NULL; it = it->next) {
-		Itdb_Artwork *artwork;
-
-		artwork = (Itdb_Artwork *)it->data;
-		g_return_if_fail (artwork);
-		if( artwork->id == photo_id ) {
-			dump_thumbs (db, artwork, album_name, dir);
-			break;
-		}
-	}
-}
-
-static void
 dump_albums (Itdb_PhotoDB *db, const gchar *dir)
 {
 	GList *it;
@@ -99,92 +109,306 @@
 		g_return_if_fail (album);
 
 		for (it2 = album->members; it2 != NULL; it2 = it2->next) {
-		        gint photo_id = GPOINTER_TO_INT(it2->data);
-			dump_artwork (db, photo_id, album->name, dir);
+		        Itdb_Artwork *photo = it2->data;
+			dump_thumbs (db, photo, album->name, dir);
 		}
 	}
 }
 
-int
-main (int argc, char **argv)
+
+static int do_dump (int argc, char **argv)
 {
     GError *error = NULL;
     Itdb_PhotoDB *db;
+
+    if (argc != 4)
+    {
+	g_print (_("Wrong number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    if (!g_file_test (argv[3], G_FILE_TEST_EXISTS))
+    {
+	if (mkdir (argv[3], 0777) == -1)
+	{
+	    g_print (_("Error creating '%s' (mkdir)\n"), argv[3]);
+	    return 1;
+	}
+    }
+    if (!g_file_test (argv[3], G_FILE_TEST_IS_DIR))
+    {
+	g_print (_("Error: '%s' is not a directory\n"), argv[3]);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\n"), error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database.\n"));
+	}
+	return 1;
+    }
+    dump_albums (db, argv[3]);
+    itdb_photodb_free (db);
+    return 0;
+}
+
+static int do_list (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoDB *db;
+    GList *gl_album;
+
+
+    if (argc != 3)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\n"), error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database.\n"));
+	}
+	return 1;
+    }
+
+    for (gl_album=db->photoalbums; gl_album; gl_album=gl_album->next)
+    {
+	GList *gl_photo;
+	Itdb_PhotoAlbum *album = gl_album->data;
+	g_return_val_if_fail (album, 1);
+
+	g_print ("%s: ", album->name?album->name:_("<Unnamed>"));
+
+	for (gl_photo=album->members; gl_photo; gl_photo=gl_photo->next)
+	{
+	    Itdb_Artwork *photo = gl_photo->data;
+	    g_return_val_if_fail (photo, 1);
+
+	    g_print ("%d ", photo->id);
+	}
+	if (g_list_length (album->members) > 0)
+	{
+	    g_print ("\n");
+	}
+	else
+	{
+	    g_print (_("<No members>\n"));
+	}
+    }
+    itdb_photodb_free (db);
+    return 0;
+}
+
+
+static int do_add (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoAlbum *album = NULL;
+    Itdb_PhotoDB *db;
     gint i; 
 
-    if (argc < 4) {
-	g_print (_("Usage to add photos:\n"));
-        g_print (_("%s <mountpoint> <albumname> <filename(s)>\n"), argv[0]);
-        g_print (_("albumname should be set to 'master' to add photos to the master photo album\n"));
-	g_print (_("\n"));
-	g_print (_("Usage to dump all photos to <output_dir>:\n"));
-	g_print (_("%s dump <mountpoint> <output_dir>\n"), argv[0]);
-        return 1;
+    if (argc < 4)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
     }
-    setlocale (LC_ALL, "");
-    g_type_init ();
 
-    if (strcmp (argv[1], "dump") == 0)
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
     {
-	if (!g_file_test (argv[3], G_FILE_TEST_EXISTS))
+	if (error)
 	{
-	    if (mkdir (argv[3], 0777) == -1)
-	    {
-		g_print (_("Error creating '%s' (mkdir)\n"), argv[3]);
-		return 1;
-	    }
+	    g_print (_("Error reading iPod photo database (%s).\nWill attempt to create a new database.\n"), error->message);
+	    g_error_free (error);
+	    error = NULL;
 	}
-	if (!g_file_test (argv[3], G_FILE_TEST_IS_DIR))
+	else
 	{
-	    g_print (_("Error: '%s' is not a directory\n"), argv[3]);
-	    return 1;
+	    g_print (_("Error reading iPod photo database, will attempt to create a new database\n"));
 	}
+	db = itdb_photodb_create (argv[2]);
+    }
 
-	db = itdb_photodb_parse (argv[2], &error);
-	if (db == NULL)
+    /* Find or create specified photoalbum */
+    if (strcmp (argv[3], "NULL") != 0)
+    {
+	album = itdb_photodb_photoalbum_by_name (db, argv[3]);
+	if (!album)
 	{
+	    album = itdb_photodb_photoalbum_create (db, argv[3], -1);
+	}
+    }
+
+    for (i=4; i<argc; ++i)
+    {
+	Itdb_Artwork *photo;
+	
+	photo = itdb_photodb_add_photo (db, argv[i],
+					-1, GDK_PIXBUF_ROTATE_NONE, &error);
+	if (photo == NULL)
+	{
 	    if (error)
 	    {
-		g_print (_("Error reading iPod photo database (%s).\n"), error->message);
+		g_print (_("Error adding photo (%s) to photo database: %s\n"),
+			 argv[i], error->message);
 		g_error_free (error);
 		error = NULL;
 	    }
-	    else
+	}
+	else
+	{
+	    if (album)
 	    {
-		g_print (_("Error reading iPod photo database.\n"));
+		itdb_photodb_photoalbum_add_photo (db, album, photo, -1);
 	    }
+	}
+    }
+
+    itdb_photodb_write (db, NULL);
+    itdb_photodb_free (db);
+    return 0;
+}
+
+
+static int do_remove (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoDB *db;
+    Itdb_PhotoAlbum *album = NULL;
+
+    if (argc < 4)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\n"),
+		     error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database"));
+	}
+	return 1;
+    }
+
+    /* Find specified photoalbum */
+    if (strcmp (argv[3], "NULL") != 0)
+    {
+	album = itdb_photodb_photoalbum_by_name (db, argv[3]);
+	if (!album)
+	{
+	    g_print (_("Specified album '%s' not found. Aborting.\n"),
+		     argv[3]);
+	    itdb_photodb_free (db);
 	    return 1;
 	}
-        dump_albums (db, argv[3]);
-	itdb_photodb_free (db);
     }
+
+    if (argc == 4)
+    {
+	/* Remove photoalbum altogether, but preserve pics */
+	if (album == NULL)
+	{
+	    g_print (_("Cannot remove Photo Library playlist. Aborting.\n"));
+	    itdb_photodb_free (db);
+	    return 1;
+	}
+	itdb_photodb_photoalbum_remove (db, album, FALSE);
+    }
     else
     {
-	db = itdb_photodb_parse (argv[1], &error);
-	if (db == NULL)
+	/* Remove specified pictures */
+	int i;
+	for (i=4; i<argc; ++i)
 	{
-	    if (error)
+	    Itdb_Artwork *photo;
+	    guint32 id;
+
+	    id = g_strtod (argv[i], NULL);
+
+	    photo = get_photo_by_id (db, id);
+
+	    if (photo == NULL)
 	    {
-		g_print (_("Error reading iPod photo database (%s).\nWill attempt to create a new database.\n"), error->message);
-		g_error_free (error);
-		error = NULL;
+		g_print (_("Warning: could not find photo with ID <%d>. Skipping...\n"),
+			 id);
 	    }
 	    else
 	    {
-		g_print (_("Error reading iPod photo database, will attempt to create a new database\n"));
+		itdb_photodb_remove_photo (db, album, photo);
 	    }
-	    db = itdb_photodb_new ();
-	    itdb_device_set_mountpoint (db->device, argv[1]);
 	}
-	for (i=3; i<argc; ++i)
-	{
-	    itdb_photodb_add_photo (db, argv[2], argv[i]);
-	}
-
-	itdb_photodb_write (db, NULL);
-	itdb_photodb_free (db);
     }
 
+    itdb_photodb_write (db, NULL);
+    itdb_photodb_free (db);
     return 0;
 }
 
+
+
+int
+main (int argc, char **argv)
+{
+    if (argc < 2)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+    setlocale (LC_ALL, "");
+    g_type_init ();
+
+    if (strcmp (argv[1], "dump") == 0)
+    {
+	return do_dump (argc, argv);
+    }
+    if (strcmp (argv[1], "add") == 0)
+    {
+	return do_add (argc, argv);
+    }
+    if (strcmp (argv[1], "list") == 0)
+    {
+	return do_list (argc, argv);
+    }
+    if (strcmp (argv[1], "remove") == 0)
+    {
+	return do_remove (argc, argv);
+    }
+
+    g_print (_("Unknown command '%s'\n"), argv[1]);
+    usage (argc, argv);
+    return 1;
+}
+




More information about the Pkg-gtkpod-devel mailing list