summaryrefslogtreecommitdiffstats
path: root/src/itdb.h
diff options
context:
space:
mode:
authorjcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2006-09-17 17:14:21 +0000
committerjcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2006-09-17 17:14:21 +0000
commitdaed5361c83e5c47ff528ded11f99c08005a8152 (patch)
treed4e5e8c4b49b8414cb14a31bce0a98e48fbb0ebe /src/itdb.h
parent5800e1e016c544b49acfd3e7b6d890045efebd08 (diff)
downloadlibgpod-daed5361c83e5c47ff528ded11f99c08005a8152.tar.gz
libgpod-daed5361c83e5c47ff528ded11f99c08005a8152.tar.xz
libgpod-daed5361c83e5c47ff528ded11f99c08005a8152.zip
* src/itdb.h
src/itdb_artwork.c: added itdb_artwork_add_thumbnail_from_data(). * src/itdb.h src/itdb_track.c: added itdb_track_set_thumbnails_from_data(). * src/itdb.h src/itdb_photoalbum.c: added itdb_photodb_add_photo_from_data(). * src/itdb_artwork.c (itdb_thumb_get_gdk_pixbuf): added support to retreive thumbnail from raw data instead of file. * src/ithumb-writer.c (ithumb_writer_write_thumbnail): added support to write thumbnail from raw data instead of file. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1313 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/itdb.h')
-rw-r--r--src/itdb.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/itdb.h b/src/itdb.h
index 6e1c981..1da2f04 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-17 13:45:03 jcs>
+/* Time-stamp: <2006-09-18 01:33:30 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -88,7 +88,7 @@ typedef enum {
/* The Itdb_Thumb structure can represent two slightly different
thumbnails:
- - a thumbnail before it's transferred to the iPod.
+ a) a thumbnail before it's transferred to the iPod.
offset and size are 0
@@ -98,15 +98,20 @@ typedef enum {
type is set according to the type this thumbnail represents
- filename point to a 'real' image file.
+ filename point to a 'real' image file OR image_data and
+ image_data_len are set.
- - a thumbnail (big or small) stored on a database in the iPod. In
+ 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;
@@ -938,6 +943,9 @@ void itdb_spl_update_live (Itdb_iTunesDB *itdb);
/* itdb_track_... */
gboolean itdb_track_set_thumbnails (Itdb_Track *track,
const gchar *filename);
+gboolean itdb_track_set_thumbnails_from_data (Itdb_Track *track,
+ const guchar *image_data,
+ gsize image_data_len);
void itdb_track_remove_thumbnails (Itdb_Track *track);
/* photoalbum functions */
@@ -945,6 +953,10 @@ 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);
@@ -963,6 +975,10 @@ Itdb_Thumb *itdb_artwork_get_thumb_by_type (Itdb_Artwork *artwork,
gboolean itdb_artwork_add_thumbnail (Itdb_Artwork *artwork,
ItdbThumbType type,
const gchar *filename);
+gboolean itdb_artwork_add_thumbnail_from_data (Itdb_Artwork *artwork,
+ ItdbThumbType type,
+ const guchar *image_data,
+ gsize image_data_len);
void itdb_artwork_remove_thumbnail (Itdb_Artwork *artwork,
Itdb_Thumb *thumb);
void itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork);