diff options
author | jcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2006-05-30 14:09:44 +0000 |
---|---|---|
committer | jcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2006-05-30 14:09:44 +0000 |
commit | 30db796e261d5e155f4f444731907c306d69d93f (patch) | |
tree | 64cc40dc42c33925c6183222667354276479c362 /src/itdb_endianness.h | |
parent | 1c40c7000722016ff8602058ff5ef0bb477f9740 (diff) | |
download | libgpod-30db796e261d5e155f4f444731907c306d69d93f.tar.gz libgpod-30db796e261d5e155f4f444731907c306d69d93f.tar.xz libgpod-30db796e261d5e155f4f444731907c306d69d93f.zip |
***** merged photo-support branch back to MAIN. branch is tagged
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
Diffstat (limited to 'src/itdb_endianness.h')
-rw-r--r-- | src/itdb_endianness.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/itdb_endianness.h b/src/itdb_endianness.h index 9cbf692..3eb129c 100644 --- a/src/itdb_endianness.h +++ b/src/itdb_endianness.h @@ -41,7 +41,7 @@ } \ return 0; /* never reached */ \ } - +/* #define DB_TO_CPU_GET_DB(lower_case_type, upper_case_type) \ DB_TO_CPU_GET(lower_case_type, upper_case_type) \ static inline lower_case_type \ @@ -50,7 +50,23 @@ g_assert (db->device != NULL); \ return get_##lower_case_type (val, db->device->byte_order); \ } +*/ +#define DB_TO_CPU_GET_DB(lower_case_type, upper_case_type) \ + DB_TO_CPU_GET(lower_case_type, upper_case_type) \ + static inline lower_case_type \ + get_##lower_case_type##_db (Itdb_DB *db, lower_case_type val) \ + { \ + switch (db->db_type) { \ + case DB_TYPE_ITUNES: \ + g_assert (db->db.itdb->device != NULL); \ + return get_##lower_case_type (val, db->db.itdb->device->byte_order); \ + case DB_TYPE_PHOTO: \ + g_assert (db->db.photodb->device != NULL); \ + return get_##lower_case_type (val, db->db.photodb->device->byte_order); \ + } \ + return 0; \ +} DB_TO_CPU_GET_DB(guint32, GUINT32) DB_TO_CPU_GET_DB(gint32, GINT32) |