summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-07-17 14:26:29 -0400
committerTodd Zullinger <tmz@pobox.com>2008-11-14 12:12:57 -0500
commit952af46f2c179bb3de51f0f4b903b3c57e4442ee (patch)
treeab6ba7e8c77461ca9d2c00f9978ad7578702fea9
parentf6f1ddc8a49ce9424f9fe67e889c0cfaa8cde4d9 (diff)
downloadlibgpod-tmz-952af46f2c179bb3de51f0f4b903b3c57e4442ee.tar.gz
libgpod-tmz-952af46f2c179bb3de51f0f4b903b3c57e4442ee.tar.xz
libgpod-tmz-952af46f2c179bb3de51f0f4b903b3c57e4442ee.zip
Documentation: update API docs
Add new functions to the proper places in the documentation, remove old/unused functions, and clean up various minor issues.
-rw-r--r--docs/reference/libgpod-docs.xml3
-rw-r--r--docs/reference/libgpod-sections.txt114
-rw-r--r--docs/reference/tmpl/artwork.sgml46
-rw-r--r--docs/reference/tmpl/chapterdata.sgml123
-rw-r--r--docs/reference/tmpl/device.sgml9
-rw-r--r--docs/reference/tmpl/libgpod-unused.sgml19
-rw-r--r--docs/reference/tmpl/track.sgml20
-rw-r--r--src/itdb.h6
-rw-r--r--src/itdb_artwork.c24
-rw-r--r--src/itdb_chapterdata.c2
-rw-r--r--src/itdb_thumb.c41
-rw-r--r--src/itdb_thumb.h5
-rw-r--r--src/itdb_track.c8
-rw-r--r--src/ithumb-writer.c2
14 files changed, 339 insertions, 83 deletions
diff --git a/docs/reference/libgpod-docs.xml b/docs/reference/libgpod-docs.xml
index c6c46b6..4c999fe 100644
--- a/docs/reference/libgpod-docs.xml
+++ b/docs/reference/libgpod-docs.xml
@@ -26,7 +26,7 @@
</author>
</authorgroup>
<copyright>
- <year>2006</year>
+ <year>2006-2008</year>
<holder>Christophe Fergeau</holder>
</copyright>
@@ -88,6 +88,7 @@
<xi:include href="xml/playlists.xml"/>
<xi:include href="xml/smart-playlists.xml"/>
<xi:include href="xml/artwork.xml"/>
+ <xi:include href="xml/chapterdata.xml"/>
<xi:include href="xml/device.xml"/>
</chapter>
</part>
diff --git a/docs/reference/libgpod-sections.txt b/docs/reference/libgpod-sections.txt
index 7b7e217..a930fe7 100644
--- a/docs/reference/libgpod-sections.txt
+++ b/docs/reference/libgpod-sections.txt
@@ -79,6 +79,8 @@ itdb_track_by_id
itdb_track_id_tree_create
itdb_track_id_tree_destroy
itdb_track_id_tree_by_id
+itdb_track_get_thumbnail
+itdb_track_has_thumbnails
itdb_track_set_thumbnails
itdb_track_set_thumbnails_from_data
itdb_track_set_thumbnails_from_pixbuf
@@ -150,6 +152,22 @@ itdb_spl_update_live
</SECTION>
<SECTION>
+<FILE>chapterdata</FILE>
+<TITLE>Chapter Data</TITLE>
+Itdb_Chapter
+Itdb_Chapterdata
+itdb_chapter_new
+itdb_chapter_duplicate
+itdb_chapter_free
+itdb_chapterdata_new
+itdb_chapterdata_add_chapter
+itdb_chapterdata_duplicate
+itdb_chapterdata_remove_chapter
+itdb_chapterdata_remove_chapters
+itdb_chapterdata_free
+</SECTION>
+
+<SECTION>
<FILE>device</FILE>
<TITLE>Device</TITLE>
Itdb_Device
@@ -163,6 +181,7 @@ itdb_device_write_sysinfo
itdb_device_get_ipod_info
itdb_device_supports_artwork
itdb_device_supports_photo
+itdb_device_supports_video
itdb_info_get_ipod_info_table
itdb_info_get_ipod_generation_string
itdb_info_get_ipod_model_name_string
@@ -181,11 +200,15 @@ Itdb_Thumb
itdb_artwork_new
itdb_artwork_duplicate
itdb_artwork_free
+itdb_artwork_get_pixbuf
+itdb_artwork_set_thumbnail
itdb_artwork_set_thumbnail_from_data
itdb_artwork_set_thumbnail_from_pixbuf
itdb_artwork_remove_thumbnails
itdb_thumb_duplicate
itdb_thumb_free
+itdb_thumb_to_pixbuf_at_size
+itdb_thumb_to_pixbufs
</SECTION>
<SECTION>
@@ -210,24 +233,18 @@ itdb_photodb_write
<SECTION>
<FILE>Internal</FILE>
<SUBSECTION Private>
+DEBUG_ARTWORK
G_GNUC_INTERNAL
-g_stat
-g_mkdir
-g_rename
-g_printf
-G_IS_DIR_SEPARATOR
dump_mhif
dump_mhia
-dump_mhod_type_1
-dump_mhod_type_3
dump_mhni
dump_mhod
+dump_mhod_string
dump_mhii
dump_mhl
dump_mhsd
dump_mhfd
dump_mhba
-ITUNESDB_MAX_SIZE
MHeader
MhlHeader
MhbdHeader
@@ -238,6 +255,7 @@ MhypHeader
MhipHeader
MhitHeader
ArtworkDB_MhodHeader
+ArtworkDB_MhodHeaderString
MhfdHeader
MhliHeader
MhiiHeader
@@ -248,28 +266,15 @@ MhlfHeader
MhifHeader
MhiaHeader
MhitHeader471
-ArtworkDB_MhodHeaderArtworkType3
MhodHeaderString
-MhodHeaderArtworkType1
MhodHeaderSmartPlaylistData
MhodHeaderSmartPlaylistRuleString
MhodHeaderSmartPlaylistRuleNonString
MhodHeaderSmartPlaylistRule
iTunesDB_MhsdHeader
MhodHeader
-MhodHeaderArtworkType3
-playcount
NO_PLAYCOUNT
WCONTENTS_STEPSIZE
-RED_BITS
-RED_SHIFT
-RED_MASK
-GREEN_BITS
-GREEN_SHIFT
-GREEN_MASK
-BLUE_BITS
-BLUE_SHIFT
-BLUE_MASK
DBParseContext
db_parse_context_get_m_header
iPodSong
@@ -278,9 +283,62 @@ DB_TO_CPU_GET_DB
ItdbFileError
ITDB_FILE_ERROR
itdb_file_error_quark
-itdb_get_artwork_info_from_type
+ITDB_DEVICE_ERROR
+ItdbDeviceError
+itdb_device_error_quark
DbType
Itdb_DB
+ItdbThumbDataType
+
+GChecksum
+GChecksumType
+g_checksum_copy
+g_checksum_free
+g_checksum_get_digest
+g_checksum_get_string
+g_checksum_new
+g_checksum_type_get_length
+g_checksum_update
+g_compute_checksum_for_data
+g_compute_checksum_for_string
+
+SysInfoIpodProperties
+itdb_sysinfo_extended_parse
+itdb_sysinfo_properties_free
+
+ALPHA_BITS_555
+ALPHA_BITS_888
+ALPHA_MASK_555
+ALPHA_MASK_888
+ALPHA_SHIFT_555
+ALPHA_SHIFT_888
+BLUE_BITS_555
+BLUE_BITS_565
+BLUE_BITS_888
+BLUE_MASK_555
+BLUE_MASK_565
+BLUE_MASK_888
+BLUE_SHIFT_555
+BLUE_SHIFT_565
+BLUE_SHIFT_888
+GREEN_BITS_555
+GREEN_BITS_565
+GREEN_BITS_888
+GREEN_MASK_555
+GREEN_MASK_565
+GREEN_MASK_888
+GREEN_SHIFT_555
+GREEN_SHIFT_565
+GREEN_SHIFT_888
+RED_BITS_555
+RED_BITS_565
+RED_BITS_888
+RED_MASK_555
+RED_MASK_565
+RED_MASK_888
+RED_SHIFT_555
+RED_SHIFT_565
+RED_SHIFT_888
ITDB_SPLACTION_LAST_HOURS_VALUE
ITDB_SPLACTION_LAST_MINUTES_VALUE
@@ -296,5 +354,15 @@ ITDB_SPLACTION_LAST_QUARTER
ITDB_SPLACTION_LAST_SOLAR_YEAR
ITDB_SPLACTION_LAST_SIDEREAL_YEAR
+SHA_BLOCKSIZE
+SHA_BYTE
+SHA_BYTE_ORDER
+SHA_DIGESTSIZE
+SHA_INFO
+SHA_LONG
+SHA_VERSION
+sha_final
+sha_init
+sha_update
+itdb_compute_hash
</SECTION>
-
diff --git a/docs/reference/tmpl/artwork.sgml b/docs/reference/tmpl/artwork.sgml
index a93704b..70cdc4a 100644
--- a/docs/reference/tmpl/artwork.sgml
+++ b/docs/reference/tmpl/artwork.sgml
@@ -75,6 +75,30 @@ album/track artwork. For working with photos, see the
@artwork:
+<!-- ##### FUNCTION itdb_artwork_get_pixbuf ##### -->
+<para>
+
+</para>
+
+@device:
+@artwork:
+@width:
+@height:
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail ##### -->
+<para>
+
+</para>
+
+@artwork:
+@filename:
+@rotation:
+@error:
+@Returns:
+
+
<!-- ##### FUNCTION itdb_artwork_set_thumbnail_from_data ##### -->
<para>
@@ -125,3 +149,25 @@ album/track artwork. For working with photos, see the
@thumb:
+<!-- ##### FUNCTION itdb_thumb_to_pixbuf_at_size ##### -->
+<para>
+
+</para>
+
+@device:
+@thumb:
+@width:
+@height:
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_thumb_to_pixbufs ##### -->
+<para>
+
+</para>
+
+@device:
+@thumb:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/chapterdata.sgml b/docs/reference/tmpl/chapterdata.sgml
new file mode 100644
index 0000000..f76f63b
--- /dev/null
+++ b/docs/reference/tmpl/chapterdata.sgml
@@ -0,0 +1,123 @@
+<!-- ##### SECTION Title ##### -->
+Chapter Data
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Chapter ##### -->
+<para>
+
+</para>
+
+@startpos:
+@chaptertitle:
+@reserved_int1:
+@reserved_int2:
+@reserved1:
+@reserved2:
+
+<!-- ##### STRUCT Itdb_Chapterdata ##### -->
+<para>
+
+</para>
+
+@chapters:
+@unk024:
+@unk028:
+@unk032:
+@reserved_int1:
+@reserved_int2:
+@reserved1:
+@reserved2:
+
+<!-- ##### FUNCTION itdb_chapter_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_chapter_duplicate ##### -->
+<para>
+
+</para>
+
+@chapter:
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_chapter_free ##### -->
+<para>
+
+</para>
+
+@chapter:
+
+
+<!-- ##### FUNCTION itdb_chapterdata_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_chapterdata_add_chapter ##### -->
+<para>
+
+</para>
+
+@chapterdata:
+@startpos:
+@chaptertitle:
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_chapterdata_duplicate ##### -->
+<para>
+
+</para>
+
+@chapterdata:
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_chapterdata_remove_chapter ##### -->
+<para>
+
+</para>
+
+@chapterdata:
+@chapter:
+
+
+<!-- ##### FUNCTION itdb_chapterdata_remove_chapters ##### -->
+<para>
+
+</para>
+
+@chapterdata:
+
+
+<!-- ##### FUNCTION itdb_chapterdata_free ##### -->
+<para>
+
+</para>
+
+@chapterdata:
+
+
diff --git a/docs/reference/tmpl/device.sgml b/docs/reference/tmpl/device.sgml
index c4b69e6..124db61 100644
--- a/docs/reference/tmpl/device.sgml
+++ b/docs/reference/tmpl/device.sgml
@@ -121,6 +121,15 @@ These functions are for reading and setting information about the iPod.
@Returns:
+<!-- ##### FUNCTION itdb_device_supports_video ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
<!-- ##### FUNCTION itdb_info_get_ipod_info_table ##### -->
<para>
diff --git a/docs/reference/tmpl/libgpod-unused.sgml b/docs/reference/tmpl/libgpod-unused.sgml
index ccbb77d..8df8383 100644
--- a/docs/reference/tmpl/libgpod-unused.sgml
+++ b/docs/reference/tmpl/libgpod-unused.sgml
@@ -129,23 +129,16 @@ iTunesDB
@ITDB_FILE_ERROR_RENAME:
@ITDB_FILE_ERROR_ITDB_CORRUPT:
-<!-- ##### ENUM ItdbThumbType ##### -->
+<!-- ##### ENUM ItdbThumbDataType ##### -->
<para>
</para>
-@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:
-@ITDB_THUMB_COVER_XLARGE:
-@ITDB_THUMB_COVER_MEDIUM:
-@ITDB_THUMB_COVER_SMEDIUM:
-@ITDB_THUMB_COVER_XSMALL:
-@ITDB_THUMB_CHAPTER_SMALL:
-@ITDB_THUMB_CHAPTER_LARGE:
+@ITDB_THUMB_TYPE_INVALID:
+@ITDB_THUMB_TYPE_FILE:
+@ITDB_THUMB_TYPE_MEMORY:
+@ITDB_THUMB_TYPE_PIXBUF:
+@ITDB_THUMB_TYPE_IPOD:
<!-- ##### ENUM Itdb_Generation ##### -->
<para>
diff --git a/docs/reference/tmpl/track.sgml b/docs/reference/tmpl/track.sgml
index 3a3c14f..a6ff7fb 100644
--- a/docs/reference/tmpl/track.sgml
+++ b/docs/reference/tmpl/track.sgml
@@ -252,6 +252,26 @@ information about an iPod track.
@Returns:
+<!-- ##### FUNCTION itdb_track_get_thumbnail ##### -->
+<para>
+
+</para>
+
+@track:
+@width:
+@height:
+@Returns:
+
+
+<!-- ##### FUNCTION itdb_track_has_thumbnails ##### -->
+<para>
+
+</para>
+
+@track:
+@Returns:
+
+
<!-- ##### FUNCTION itdb_track_set_thumbnails ##### -->
<para>
diff --git a/src/itdb.h b/src/itdb.h
index 9a5cd96..ea73509 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -1197,9 +1197,9 @@ gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
/* itdb_thumb_... */
Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb);
-gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *dev, Itdb_Thumb *thumb,
- gint width, gint height);
-GList *itdb_thumb_to_pixbufs (Itdb_Device *dev, Itdb_Thumb *thumb);
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+ gint width, gint height);
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb);
void itdb_thumb_free (Itdb_Thumb *thumb);
/* itdb_chapterdata_... */
diff --git a/src/itdb_artwork.c b/src/itdb_artwork.c
index db895d7..00ed62d 100644
--- a/src/itdb_artwork.c
+++ b/src/itdb_artwork.c
@@ -117,8 +117,7 @@ itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork)
/**
* itdb_artwork_set_thumbnail
- * @artwork: an #Itdb_Thumbnail
- * @type: thumbnail size
+ * @artwork: an #Itdb_Artwork
* @filename: image file to use to create the thumbnail
* @rotation: angle by which the image should be rotated
* counterclockwise. Valid values are 0, 90, 180 and 270.
@@ -176,16 +175,15 @@ itdb_artwork_set_thumbnail (Itdb_Artwork *artwork,
/**
* itdb_artwork_set_thumbnail_from_pixbuf
- * @artwork: an #Itdb_Thumbnail
+ * @artwork: an #Itdb_Artwork
* @pixbuf: #GdkPixbuf to use to create the thumbnail
* @rotation: angle by which the image should be rotated
* counterclockwise. Valid values are 0, 90, 180 and 270.
* @error: return location for a #GError or NULL
*
- * Appends a thumbnail of type @type to existing thumbnails in @artwork. No
- * data is generated from @pixbuf yet, it will be done when @artwork is saved
- * to disk. @pixbuf is ref'ed by this function, but is not copied, so it should
- * not be modified before the database is saved.
+ * Set a thumbnail in @artwork. No data is generated from @pixbuf yet, it will
+ * be done when @artwork is saved to disk. @pixbuf is ref'ed by this function,
+ * but is not copied, so it should not be modified before the database is saved.
*
* For the rotation angle you can also use the gdk constants
* GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
@@ -235,7 +233,7 @@ itdb_artwork_set_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
/**
* itdb_artwork_set_thumbnail_from_data
- * @artwork: an #Itdb_Thumbnail
+ * @artwork: an #Itdb_Artwork
* @image_data: data used to create the thumbnail (the raw contents of
* an image file)
* @image_data_len: length of above data block
@@ -243,9 +241,8 @@ itdb_artwork_set_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
* counterclockwise. Valid values are 0, 90, 180 and 270.
* @error: return location for a #GError or NULL
*
- * Appends a thumbnail of type @type to existing thumbnails in
- * @artwork. No data is processed yet. This will be done when @artwork
- * is saved to disk.
+ * Set a thumbnail in @artwork. No data is processed yet. This will be done when
+ * @artwork is saved to disk.
*
* For the rotation angle you can also use the gdk constants
* GDK_PIXBUF_ROTATE_NONE, ..._COUNTERCLOCKWISE, ..._UPSIDEDOWN AND
@@ -881,12 +878,11 @@ gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
#endif
/**
- * itdb_artwork_get_thumbnail!
+ * itdb_artwork_get_pixbuf:
* @artwork: an #Itdb_Artwork
- *
+ * @device: an #Itdb_Device
* @width: width of the pixbuf to retrieve, -1 for the biggest
* possible size and 0 for the smallest possible size (with no scaling)
- *
* @height: height of the pixbuf to retrieve, -1 for the biggest possible size
* and 0 for the smallest possible size (with no scaling)
*
diff --git a/src/itdb_chapterdata.c b/src/itdb_chapterdata.c
index 131f66e..f49c419 100644
--- a/src/itdb_chapterdata.c
+++ b/src/itdb_chapterdata.c
@@ -116,7 +116,7 @@ Itdb_Chapterdata *itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata)
/**
* itdb_chapterdata_remove_chapter:
* @chapterdata: an #Itdb_Chapterdata
- * @chapeer: an #Itdb_Chapter
+ * @chapter: an #Itdb_Chapter
*
* Removes @chapter from @chapterdata. The memory used by @chapter is freed.
**/
diff --git a/src/itdb_thumb.c b/src/itdb_thumb.c
index 201dfb1..3a5dba5 100644
--- a/src/itdb_thumb.c
+++ b/src/itdb_thumb.c
@@ -298,9 +298,9 @@ Itdb_Thumb_Ipod_Item *itdb_thumb_ipod_get_item_by_type (Itdb_Thumb *thumbs,
}
/**
- * itdb_thumb_get_filename:
+ * itdb_thumb_ipod_get_filename:
* @device: an #Itdb_Device
- * @thumb: an #Itdb_Thumb
+ * @thumb: an #Itdb_Thumb_Ipod_Item
*
* Get filename of thumbnail. If it's a thumbnail on the iPod, return
* the full path to the ithmb file. Otherwise return the full path to
@@ -357,18 +357,16 @@ const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs)
* itdb_thumb_to_pixbuf_at_size:
* @device: an #Itdb_Device
* @thumb: an #Itdb_Thumb
- *
+ * @width: width of the pixbuf to retrieve, -1 for the biggest
+ * possible size and 0 for the smallest possible size (with no scaling)
+ * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
+ * and 0 for the smallest possible size (with no scaling)
+ *
* Converts @thumb to a #GdkPixbuf.
* Since we want to have gdk-pixbuf dependency optional, a generic
* gpointer is returned which you have to cast to a #GdkPixbuf using
* GDK_PIXBUF() yourself.
*
- * @width: width of the pixbuf to retrieve, -1 for the biggest
- * possible size and 0 for the smallest possible size (with no scaling)
- *
- * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
- * and 0 for the smallest possible size (with no scaling)
- *
* Return value: a #GdkPixbuf that must be unreffed with gdk_pixbuf_unref()
* after use, or NULL if the creation of the gdk-pixbuf failed or if
* libgpod was compiled without gdk-pixbuf support.
@@ -504,7 +502,8 @@ gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
return pixbuf;
}
-static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *dev, Itdb_Thumb_Ipod *thumb)
+static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *device,
+ Itdb_Thumb_Ipod *thumb)
{
const GList *items;
GList *pixbufs = NULL;
@@ -516,7 +515,7 @@ static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *dev, Itdb_Thumb_Ipod *thu
items != NULL;
items = items->next) {
GdkPixbuf *pixbuf;
- pixbuf = itdb_thumb_ipod_item_to_pixbuf (dev, items->data);
+ pixbuf = itdb_thumb_ipod_item_to_pixbuf (device, items->data);
if (pixbuf != NULL) {
pixbufs = g_list_prepend (pixbufs, pixbuf);
}
@@ -529,11 +528,6 @@ static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *dev, Itdb_Thumb_Ipod *thu
* itdb_thumb_to_pixbufs:
* @device: an #Itdb_Device
* @thumb: an #Itdb_Thumb
- *
- * Return value: a #GList of #GdkPixbuf which are associated with @thumb, NULL
- * if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
- * support. The #GdkPixbuf must be unreffed with gdk_pixbuf_unref() after use
- * and the #GList must be freed with g_list_free().
*
* Converts @thumb to a #GList of #GdkPixbuf. The returned #GList will
* generally contain only 1 element, the full-size pixbuf associated with
@@ -541,20 +535,25 @@ static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *dev, Itdb_Thumb_Ipod *thu
* modified from the library, then the returned #GList will contain several
* #GdkPixbuf corresponding to the various thumbnail sizes that were
* written to the iPod database.
+ *
+ * Return value: a #GList of #GdkPixbuf which are associated with @thumb, NULL
+ * if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+ * support. The #GdkPixbuf must be unreffed with gdk_pixbuf_unref() after use
+ * and the #GList must be freed with g_list_free().
**/
-GList *itdb_thumb_to_pixbufs (Itdb_Device *dev, Itdb_Thumb *thumb)
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb)
{
GList *pixbufs = NULL;
GdkPixbuf *pixbuf;
switch (thumb->data_type) {
case ITDB_THUMB_TYPE_IPOD:
- pixbufs = itdb_thumb_ipod_to_pixbufs (dev, (Itdb_Thumb_Ipod *)thumb);
+ pixbufs = itdb_thumb_ipod_to_pixbufs (device, (Itdb_Thumb_Ipod *)thumb);
break;
case ITDB_THUMB_TYPE_FILE:
case ITDB_THUMB_TYPE_MEMORY:
case ITDB_THUMB_TYPE_PIXBUF:
- pixbuf = itdb_thumb_to_pixbuf_at_size (dev, thumb, -1, -1);
+ pixbuf = itdb_thumb_to_pixbuf_at_size (device, thumb, -1, -1);
pixbufs = g_list_append (pixbufs, pixbuf);
break;
case ITDB_THUMB_TYPE_INVALID:
@@ -564,14 +563,14 @@ GList *itdb_thumb_to_pixbufs (Itdb_Device *dev, Itdb_Thumb *thumb)
return pixbufs;
}
#else
-gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *dev, Itdb_Thumb *thumb,
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
gint width, gint height)
{
return NULL;
}
-GList *itdb_thumb_to_pixbufs (Itdb_Device *dev, Itdb_Thumb *thumb)
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb)
{
return NULL;
}
diff --git a/src/itdb_thumb.h b/src/itdb_thumb.h
index 7c2806c..09dd04e 100644
--- a/src/itdb_thumb.h
+++ b/src/itdb_thumb.h
@@ -27,14 +27,13 @@
#include "itdb_device.h"
/* Types of thumbnails in Itdb_Image */
-enum _ItdbThumbDataType {
+typedef enum {
ITDB_THUMB_TYPE_INVALID,
ITDB_THUMB_TYPE_FILE,
ITDB_THUMB_TYPE_MEMORY,
ITDB_THUMB_TYPE_PIXBUF,
ITDB_THUMB_TYPE_IPOD
-};
-typedef enum _ItdbThumbDataType ItdbThumbDataType;
+} ItdbThumbDataType;
/* The Itdb_Thumb structure can represent two slightly different
thumbnails:
diff --git a/src/itdb_track.c b/src/itdb_track.c
index dbe427e..480c0bb 100644
--- a/src/itdb_track.c
+++ b/src/itdb_track.c
@@ -618,6 +618,8 @@ Itdb_Track *itdb_track_id_tree_by_id (GTree *idtree, guint32 id)
* itdb_track_has_thumbnails:
* @track: an #Itdb_Track
*
+ * Determine if a @track has thumbnails
+ *
* Return value: TRUE if @track has artwork available, FALSE otherwise
**/
gboolean itdb_track_has_thumbnails (Itdb_Track *track)
@@ -634,9 +636,9 @@ gboolean itdb_track_has_thumbnails (Itdb_Track *track)
* @height: height of the pixbuf to retrieve, -1 for the biggest possible size
* (with no scaling)
*
- * Returns a #GdkPixbuf representing the cover associated with the current
- * track, scaling it if appropriate. If either height or width is -1, then the
- * biggest unscaled thumbnail available will be returned
+ * Get a thumbnail representing the cover associated with the current track,
+ * scaling it if appropriate. If either height or width is -1, then the biggest
+ * unscaled thumbnail available will be returned.
*
* Return value: a #GdkPixbuf that must be unreffed when no longer used, NULL
* if no artwork could be found or if libgpod is compiled without GdkPixbuf
diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c
index f9c0ffb..f0621bf 100644
--- a/src/ithumb-writer.c
+++ b/src/ithumb-writer.c
@@ -1360,7 +1360,7 @@ static gboolean ithumb_rearrange_thumbnail_file (gpointer _key,
If a thumbnail has been removed, a slot in the file is opened. This
slot is filled by copying data from the end of the file and
- adjusting the corresponding Itdb_Image offset pointer. When all
+ adjusting the corresponding Itdb_Thumb offset pointer. When all
slots are filled, the file is truncated to the new length.
*/
static gboolean