summaryrefslogtreecommitdiffstats
path: root/src/db-itunes-parser.h
Commit message (Collapse)AuthorAgeFilesLines
* Use GMappedFile instead of directly using mmapChristophe Fergeau2008-07-061-3/+0
| | | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2040 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/db-artwork-debug.c:Christophe Fergeau2008-05-251-3/+3
| | | | | | | | | | | | * src/db-artwork-writer.c: * src/db-image-parser.c: * src/db-itunes-parser.h: * src/itdb_device.h: * src/ithumb-writer.c: rename correlation_id to format_id (this is how that value is called in SysInfoExtended) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1981 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Factorize mhod_type_3 and mhod_type_1 handlingChristophe Fergeau2008-02-031-1/+1
| | | | | | | | | | MHOD in an ArtworkDB can only have 2 types, either they contain a string or they are some kind of container. The code had an arbitrary separation between mhod type 3 and mhod type 1 which both contained strings. This consolidates that code in a parse_mhod_string function git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1947 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Merge ArtworkDB_MhodHeaderArtworkType3 and MhodHeaderArtworkType1 into ↵Christophe Fergeau2008-02-031-40/+4
| | | | | | ArtworkDB_MhodHeaderString git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1945 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Patch from Filippo Giunchedi <filippo@esaurito.net>Christophe Fergeau2007-10-211-4/+4
| | | | | | | | | * src/db-artwork-debug.c: (dump_mhba): fix dumping function in debug mode * src/db-itunes-parser.h: indentation fixes git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1729 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/db-artwork-parser.c (parse_mhba): non-zero terminatedJorg Schuler2007-06-011-1/+4
| | | | | | | | | | | | | | | | string was copied using g_strdup() instead of g_strndup(). This affected album names of the Photo Database. src/db-artwork-writer.c (write_mhod_type_1): convert 'type' as 16 bit integer, not 32 bit integer. Potential problem on non-standard endian system (iPod side). src/db-itunes-parser.h: '#if 0' unused structure to avoid confusion. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1514 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * docs/reference/tmpl/device.sgmlJorg Schuler2007-04-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs/reference/tmpl/itunesdb-time.sgml docs/reference/tmpl/libgpod-unused.sgml docs/reference/tmpl/track.sgml src/db-artwork-parser.c src/db-artwork-writer.c src/db-itunes-parser.h src/itdb.h src/itdb_device.c src/itdb_device.h src/itdb_itunesdb.c src/itdb_private.h tests/Makefile.am: Christophe's patch for automatic correction of timestamps depending on which timezone the iPod is set to. ATTENTION DEVELOPERS: as a consequence all exported timestamps are no longer guint32 mac-type timestamps but standard time_t timestamps. This also includes the 64 bit timestamps in smart playlists. The following functions are therefore no longer needed and are deprecated: itdb_time_mac_to_host(), itdb_time_host_to_mac(): simply return the argument without changing it. Argument and return value are now both of type 'time_t'. itunesdb_time_get_mac_time(): returns the seconds passed since Epoch in seconds and is equivalent to time(NULL). These functions may be removed in a future version of libgpod. Programs linking to libgpod may need to be changed slightly if they made any assumptions on the type of timestamps used. This should be obvious through compile-time warnings. tests/test-ls.c: print a list of recently played tracks. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1417 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/db-itunes-parser.hJorg Schuler2007-02-241-2/+5
| | | | | | | | src/artwork-writer.c: Set unknown2 of mhfd header to 2 instead of 1, otherwise iTunes7 wipes the ArtworkDB. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1395 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb.h: Itdb_Artwork:Jorg Schuler2006-11-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | - 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(). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1335 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Added additional functionality for photo albumsJorg Schuler2006-10-291-9/+12
| | | | | | | | | | | | | | | | | * 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. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1330 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Major rework of picture support.Jorg Schuler2006-10-291-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1329 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* ***** merged photo-support branch back to MAIN. branch is taggedJorg Schuler2006-05-301-18/+30
| | | | | | | | | photo-support-merged_00 ipod.py will need minor patching (flag2, flag3). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1292 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Alpha version of reversed-endian Artwork writing. Status: iTunesDBJorg Schuler2006-03-231-7/+62
| | | | | | | | | | | | can be written and is accepted on mobile phones, ArtworkDB can be read and be written as well, but newly added artwork will not yet display. * itdb.h: adjusted a couple of field lengths (4 byte -> 2 byte or even 1 byte) to address endian issues. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1225 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * configure.ac: bumped version to 0.3.2 for release.Jorg Schuler2006-03-041-7/+6
| | | | | | | | | | | | * db-artwork-writer.c: increased IPOD_MMAP_SIZE from 2 to 16 MB as a temporary workaround until a propoer solution can be implemented. * db-itunes-parser.h: replaced the #pragma pack(4) with an 'packed' attribute on _MhiiHeader only. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1211 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * libgpod-1.0.pc: added gobject-2.0 to 'Requires:' listJorg Schuler2006-02-191-0/+6
| | | | | | | | * src/db-itunes-parser.h: add '#pragma pack(4)' to fix 64bit issue with padding (at least as a temporary fix). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1206 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Added a few structures (notably MHBA and MHIA) to support the Photo Database.Flavio Stanchina2005-10-101-2/+54
| | | | | | | Split 'gint32 image_dimensions' into 'gint16 image_height, image_width'. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1115 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * applied patch provided by Christophe Fergeau <teuf at gnome.org>Jorg Schuler2005-09-191-0/+540
for artwork database support (read-only). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1093 f01d2545-417e-4e96-918e-98f8d0dbbcb6