commit 4cf0f4646e3e1394b9e96d87e26dab5146e69999 Author: Christophe Fergeau <cferg...@mandriva.com> Date: Sun Aug 23 15:13:35 2009 +0200
add itdb_device_supports_compressed_itunesdb src/itdb_device.c | 40 ++++++++++++++++++++++++++++++++++++++++ src/itdb_device.h | 1 + 2 files changed, 41 insertions(+), 0 deletions(-) --- diff --git a/src/itdb_device.c b/src/itdb_device.c index 7fe36b5..b0a0e2e 100644 --- a/src/itdb_device.c +++ b/src/itdb_device.c @@ -1167,6 +1167,46 @@ GList *itdb_device_get_chapter_image_formats (const Itdb_Device *device) g_return_val_if_reached (NULL); } + +G_GNUC_INTERNAL gboolean +itdb_device_supports_compressed_itunesdb (const Itdb_Device *device) +{ + const Itdb_IpodInfo *info; + info = itdb_device_get_ipod_info (device); + switch (info->ipod_generation) { + case ITDB_IPOD_GENERATION_UNKNOWN: + case ITDB_IPOD_GENERATION_FIRST: + case ITDB_IPOD_GENERATION_SECOND: + case ITDB_IPOD_GENERATION_THIRD: + case ITDB_IPOD_GENERATION_FOURTH: + case ITDB_IPOD_GENERATION_PHOTO: + case ITDB_IPOD_GENERATION_MOBILE: + case ITDB_IPOD_GENERATION_MINI_1: + case ITDB_IPOD_GENERATION_MINI_2: + case ITDB_IPOD_GENERATION_SHUFFLE_1: + case ITDB_IPOD_GENERATION_SHUFFLE_2: + case ITDB_IPOD_GENERATION_SHUFFLE_3: + case ITDB_IPOD_GENERATION_SHUFFLE_4: + case ITDB_IPOD_GENERATION_NANO_1: + case ITDB_IPOD_GENERATION_NANO_2: + case ITDB_IPOD_GENERATION_VIDEO_1: + case ITDB_IPOD_GENERATION_VIDEO_2: + case ITDB_IPOD_GENERATION_NANO_3: + case ITDB_IPOD_GENERATION_NANO_4: + case ITDB_IPOD_GENERATION_CLASSIC_1: + case ITDB_IPOD_GENERATION_CLASSIC_2: + return FALSE; + case ITDB_IPOD_GENERATION_TOUCH_1: + case ITDB_IPOD_GENERATION_IPHONE_1: + case ITDB_IPOD_GENERATION_TOUCH_2: + case ITDB_IPOD_GENERATION_IPHONE_2: + case ITDB_IPOD_GENERATION_IPHONE_3: + /* FIXME: needs to check firmware version */ + return TRUE; + } + return FALSE; +} + G_GNUC_INTERNAL gboolean itdb_device_supports_sparse_artwork (const Itdb_Device *device) { diff --git a/src/itdb_device.h b/src/itdb_device.h index 5e2fc97..ff94e2c 100644 --- a/src/itdb_device.h +++ b/src/itdb_device.h @@ -166,6 +166,7 @@ G_GNUC_INTERNAL gint itdb_device_musicdirs_number (Itdb_Device *device); G_GNUC_INTERNAL void itdb_device_autodetect_endianess (Itdb_Device *device); G_GNUC_INTERNAL guint64 itdb_device_get_firewire_id (const Itdb_Device *device); G_GNUC_INTERNAL gboolean itdb_device_supports_sparse_artwork (const Itdb_Device *device); +G_GNUC_INTERNAL gboolean itdb_device_supports_compressed_itunesdb (const Itdb_Device *device); G_GNUC_INTERNAL gboolean itdb_device_get_storage_info (Itdb_Device *device, guint64 *capacity, guint64 *free); G_GNUC_INTERNAL gboolean itdb_device_write_checksum (Itdb_Device *device, unsigned char *itdb_data, ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2