From d3bab54a791fbc5b7835e069dcada96fb6c82efe Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Thu, 16 Mar 2006 15:34:34 +0000 Subject: * itdb_device.[ch]: rewrote ipod-device.c, removed all hal-code, removed all code irrelevant to writing the iTunesDB and ArtworkDB. * autodetect iControl directory now also works for ArtworkDB. * db-artwork-parser.c (ipod_db_get_artwork_db_path): create Artwork directory if not already present. * itdb.h: Itdb_iTunesDB: moved mountpoint and musicdirs into private Itdb_Device. Use itdb_set_mountpoint() and itdb_get_mountpoint() to access the mountpoint. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1220 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/db-image-parser.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/db-image-parser.c') diff --git a/src/db-image-parser.c b/src/db-image-parser.c index ba4cda5..296d82c 100644 --- a/src/db-image-parser.c +++ b/src/db-image-parser.c @@ -29,20 +29,22 @@ #include #include +#include "itdb_device.h" #include "db-artwork-parser.h" #include "db-image-parser.h" #include static int -image_type_from_corr_id (IpodDevice *ipod, int corr_id) +image_type_from_corr_id (Itdb_Device *device, int corr_id) { - const IpodArtworkFormat *formats; + const Itdb_ArtworkFormat *formats; - if (ipod == NULL) { + if (device == NULL) { return -1; } - g_object_get (G_OBJECT (ipod), "artwork-formats", &formats, NULL); + formats = itdb_device_get_artwork_formats (device); + if (formats == NULL) { return -1; } @@ -58,16 +60,16 @@ image_type_from_corr_id (IpodDevice *ipod, int corr_id) } -G_GNUC_INTERNAL const IpodArtworkFormat * -ipod_get_artwork_info_from_type (IpodDevice *ipod, int image_type) +G_GNUC_INTERNAL const Itdb_ArtworkFormat * +itdb_get_artwork_info_from_type (Itdb_Device *device, int image_type) { - const IpodArtworkFormat *formats; + const Itdb_ArtworkFormat *formats; - if (ipod == NULL) { + if (device == NULL) { return NULL; } - g_object_get (G_OBJECT (ipod), "artwork-formats", &formats, NULL); + formats = itdb_device_get_artwork_formats (device); if (formats == NULL) { return NULL; } -- cgit