diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-03-23 15:06:32 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-03-23 15:06:32 +0000 |
commit | 8c7b411193bcafb617406cec1f43341a851eac06 (patch) | |
tree | 405f62eac144bf39a2acb281f474b0ccf531f22c /src/db-parse-context.h | |
parent | 85e971a669065d3357a63327832159f730799666 (diff) | |
download | libgpod-tmz-8c7b411193bcafb617406cec1f43341a851eac06.tar.gz libgpod-tmz-8c7b411193bcafb617406cec1f43341a851eac06.tar.xz libgpod-tmz-8c7b411193bcafb617406cec1f43341a851eac06.zip |
Alpha version of reversed-endian Artwork writing. Status: iTunesDB
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
Diffstat (limited to 'src/db-parse-context.h')
-rw-r--r-- | src/db-parse-context.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/db-parse-context.h b/src/db-parse-context.h index 528856f..8df157e 100644 --- a/src/db-parse-context.h +++ b/src/db-parse-context.h @@ -33,6 +33,7 @@ struct _DBParseContext { const unsigned char *cur_pos; off_t header_len; off_t total_len; + guint byte_order; }; typedef struct _DBParseContext DBParseContext; @@ -40,15 +41,32 @@ typedef struct _DBParseContext DBParseContext; #define db_parse_context_get_m_header(ctx, type, id) (type *)db_parse_context_get_m_header_internal (ctx, id, sizeof (type)) -G_GNUC_INTERNAL DBParseContext *db_parse_context_new (const unsigned char *buffer, off_t len) G_GNUC_INTERNAL; -G_GNUC_INTERNAL void db_parse_context_set_total_len (DBParseContext *ctx, off_t len) G_GNUC_INTERNAL; -G_GNUC_INTERNAL off_t db_parse_context_get_remaining_length (DBParseContext *ctx) G_GNUC_INTERNAL; -G_GNUC_INTERNAL DBParseContext *db_parse_context_get_sub_context (DBParseContext *ctx, - off_t offset) G_GNUC_INTERNAL; -G_GNUC_INTERNAL DBParseContext *db_parse_context_get_next_child (DBParseContext *ctx) G_GNUC_INTERNAL; -G_GNUC_INTERNAL void *db_parse_context_get_m_header_internal (DBParseContext *ctx, const char *id, off_t size) G_GNUC_INTERNAL; +G_GNUC_INTERNAL DBParseContext * +db_parse_context_new (const unsigned char *buffer, + off_t len, guint byte_order); -G_GNUC_INTERNAL DBParseContext *db_parse_context_new_from_file (const char *filename) G_GNUC_INTERNAL; -G_GNUC_INTERNAL void db_parse_context_destroy (DBParseContext *ctx, gboolean unmap); +G_GNUC_INTERNAL void +db_parse_context_set_total_len (DBParseContext *ctx, off_t len); + +G_GNUC_INTERNAL off_t +db_parse_context_get_remaining_length (DBParseContext *ctx) G_GNUC_INTERNAL; + +G_GNUC_INTERNAL DBParseContext * +db_parse_context_get_sub_context (DBParseContext *ctx, off_t offset); + + +G_GNUC_INTERNAL DBParseContext * +db_parse_context_get_next_child (DBParseContext *ctx); + + +G_GNUC_INTERNAL void * +db_parse_context_get_m_header_internal (DBParseContext *ctx, + const char *id, off_t size); + +G_GNUC_INTERNAL DBParseContext * +db_parse_context_new_from_file (const char *filename, guint byte_order); + +G_GNUC_INTERNAL void +db_parse_context_destroy (DBParseContext *ctx, gboolean unmap); #endif |