Update of /cvsroot/gtkpod/libgpod/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052/src

Modified Files:
        itdb.h itdb_itunesdb.c itdb_private.h 
Log Message:
Undoing the last CVS checkin -- I was in the wrong directory. Sorry for that.




Index: itdb.h
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/src/itdb.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- itdb.h      9 Mar 2006 14:34:04 -0000       1.25
+++ itdb.h      9 Mar 2006 14:40:23 -0000       1.26
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-03-04 00:39:53 jcs>
+/* Time-stamp: <2005-11-29 00:56:25 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -413,10 +413,7 @@
 {
     Itdb_iTunesDB *itdb;  /* pointer to iTunesDB (for convenience) */
     gchar *name;          /* name of playlist in UTF8              */
-    guint8 type;          /* ITDB_PL_TYPE_NORM/_MPL                */
-    guint8 flag1;         /* unknown, usually set to 0             */
-    guint8 flag2;         /* unknown, always set to 0              */
-    guint8 flag3;         /* unknown, always set to 0              */
+    guint32 type;         /* ITDB_PL_TYPE_NORM/_MPL                */
     gint  num;            /* number of tracks in playlist          */
     GList *members;       /* tracks in playlist (Track *)          */
     gboolean is_spl;      /* smart playlist?                       */
@@ -550,9 +547,6 @@
   gint32  tracks;            /* number of tracks       */
   gint32  bitrate;           /* bitrate                */
   guint16 samplerate;        /* samplerate (CD: 44100) */
-  guint16 samplerate_low;    /* in the iTunesDB the samplerate is
-                                multiplied by 0x10000 -- these are the
-                               lower 16 bit, which are usually 0 */
   gint32  year;              /* year                   */
   gint32  volume;            /* volume adjustment              */
   guint32 soundcheck;        /* volume adjustment "soundcheck" */
@@ -569,15 +563,14 @@
                                playcount. */
   guint32 recent_playcount;  /* times track was played since last sync */
   gboolean transferred;      /* has file been transferred to iPod?  */
-  gint16  BPM;               /* supposed to vary the playback speed */
+  gint16 BPM;                /* supposed to vary the playback speed */
   guint8  app_rating;        /* star rating set by appl. (not
                              * iPod). If the rating set on the iPod
                                and the rating field above differ, the
                                original rating is copied here and the
                                new rating is stored above. */
-  guint8  type1;             /* CBR MP3s and AAC are 0x00, VBR MP3s are
-                               0x01 */
-  guint8  type2;             /* MP3s are 0x01, AAC are 0x00 */
+  guint16 type;              /* CBR MP3s are type 0x100, VBR MP3s are
+                               type 0x101, AAC are type 0x0 */
   guint8  compilation;
   guint32 starttime;
   guint32 stoptime;
@@ -612,6 +605,7 @@
                                here.  itdb will set this when adding
                                a track */
 
+  guint16 unk060;     /* unknown */
   guint16 unk126;     /* unknown, but always seems to be 0xffff for
                         MP3/AAC songs, 0x0 for uncompressed songs
                         (like WAVE format), 0x1 for Audible. itdb

Index: itdb_itunesdb.c
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/src/itdb_itunesdb.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- itdb_itunesdb.c     9 Mar 2006 14:34:04 -0000       1.43
+++ itdb_itunesdb.c     9 Mar 2006 14:40:23 -0000       1.44
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-03-04 00:55:13 jcs>
+/* Time-stamp: <2006-02-14 22:10:45 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -219,7 +219,6 @@
     g_return_val_if_fail (fname, NULL);
 
     cts = g_new0 (FContents, 1);
-    cts->reversed = FALSE;
 
     if (g_file_get_contents (fname, &cts->contents, &cts->length, error))
     {
@@ -395,27 +394,6 @@
 }
 
 
-/* Compare 4 bytes of @header with 4 bytes at @seek taking into
- * consideration the status of cts->reversed */
-static gboolean check_header_seek (FContents *cts, const gchar *data,
-                                  glong seek)
-{
-    gchar rdata[4];
-    gint i;
-
-    /* reverse data for compare if necessary */
-    for (i=0; i<4; ++i)
-    {
-       if (cts->reversed)
-           rdata[i] = data[3-i];
-       else
-           rdata[i] = data[i];
-    }
-
-    return cmp_n_bytes_seek (cts, rdata, seek, 4);
-}
-
-
 /* Returns the 1-byte number stored at position @seek. On error the
  * GError in @cts is set. */
 static guint8 get8int (FContents *cts, glong seek)
@@ -431,7 +409,7 @@
 
 /* Get the 2-byte-number stored at position "seek" in little endian
    encoding. On error the GError in @cts is set. */
-static guint16 raw_get16lint (FContents *cts, glong seek)
+static guint16 get16lint (FContents *cts, glong seek)
 {
     guint16 n=0;
 
@@ -446,7 +424,7 @@
 
 /* Get the 3-byte-number stored at position "seek" in little endian
    encoding. On error the GError in @cts is set. */
-static guint32 raw_get24lint (FContents *cts, glong seek)
+static guint32 get24lint (FContents *cts, glong seek)
 {
     guint32 n=0;
 
@@ -462,7 +440,7 @@
 
 /* Get the 4-byte-number stored at position "seek" in little endian
    encoding. On error the GError in @cts is set. */
-static guint32 raw_get32lint (FContents *cts, glong seek)
+static guint32 get32lint (FContents *cts, glong seek)
 {
     guint32 n=0;
 
@@ -476,7 +454,7 @@
 }
 
 /* Get 4 byte floating number */
-static float raw_get32lfloat (FContents *cts, glong seek)
+static float get32lfloat (FContents *cts, glong seek)
 {
     union
     {
@@ -486,93 +464,46 @@
 
     g_return_val_if_fail (sizeof (float) == 4, 0);
 
-    flt.i = raw_get32lint (cts, seek);
+    flt.i = get32lint (cts, seek);
 
     return flt.f;
 }
 
 
-/* Get the 8-byte-number stored at position "seek" in little endian
-   encoding. On error the GError in @cts is set. */
-static guint64 raw_get64lint (FContents *cts, glong seek)
-{
-    guint64 n=0;
-
-    if (check_seek (cts, seek, 8))
-    {
-       g_return_val_if_fail (cts->contents, 0);
-       memcpy (&n, &cts->contents[seek], 8);
-       n = GUINT64_FROM_LE (n);
-    }
-    return n;
-}
-
-
-/* Get the 2-byte-number stored at position "seek" in little endian
-   encoding. On error the GError in @cts is set. */
-static guint16 raw_get16bint (FContents *cts, glong seek)
-{
-    guint16 n=0;
-
-    if (check_seek (cts, seek, 2))
-    {
-       g_return_val_if_fail (cts->contents, 0);
-       memcpy (&n, &cts->contents[seek], 2);
-       n = GUINT16_FROM_BE (n);
-    }
-    return n;
-}
-
-/* Get the 3-byte-number stored at position "seek" in big endian
+/* Get the 4-byte-number stored at position "seek" in big endian
    encoding. On error the GError in @cts is set. */
-static guint32 raw_get24bint (FContents *cts, glong seek)
+static guint32 get32bint (FContents *cts, glong seek)
 {
     guint32 n=0;
 
-    if (check_seek (cts, seek, 3))
+    if (check_seek (cts, seek, 4))
     {
        g_return_val_if_fail (cts->contents, 0);
-       n = ((guint32)get8int (cts, seek+2)) +
-           (((guint32)get8int (cts, seek+1)) >> 8) +
-           (((guint32)get8int (cts, seek+0)) >> 16);
+       memcpy (&n, &cts->contents[seek], 4);
+       n = GUINT32_FROM_BE (n);
     }
     return n;
 }
 
-/* Get the 4-byte-number stored at position "seek" in big endian
+/* Get the 8-byte-number stored at position "seek" in little endian
    encoding. On error the GError in @cts is set. */
-static guint32 raw_get32bint (FContents *cts, glong seek)
+static guint64 get64lint (FContents *cts, glong seek)
 {
-    guint32 n=0;
+    guint64 n=0;
 
-    if (check_seek (cts, seek, 4))
+    if (check_seek (cts, seek, 8))
     {
        g_return_val_if_fail (cts->contents, 0);
-       memcpy (&n, &cts->contents[seek], 4);
-       n = GUINT32_FROM_BE (n);
+       memcpy (&n, &cts->contents[seek], 8);
+       n = GUINT64_FROM_LE (n);
     }
     return n;
 }
 
-/* Get 4 byte floating number */
-static float raw_get32bfloat (FContents *cts, glong seek)
-{
-    union
-    {
-       guint32 i;
-       float   f;
-    } flt;
-
-    g_return_val_if_fail (sizeof (float) == 4, 0);
-
-    flt.i = raw_get32bint (cts, seek);
-
-    return flt.f;
-}
 
 /* Get the 8-byte-number stored at position "seek" in big endian
    encoding. On error the GError in @cts is set. */
-static guint64 raw_get64bint (FContents *cts, glong seek)
+static guint64 get64bint (FContents *cts, glong seek)
 {
     guint64 n=0;
 
@@ -585,103 +516,6 @@
     return n;
 }
 
-
-/* The following functions take into consideration the state of
- * cts->reversed and call either raw_getnnlint or raw_getnnbint */
-static guint16 get16lint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get16lint (cts, seek);
-    else
-       return raw_get16bint (cts, seek);
-}
-
-#if 0
-static guint16 get16bint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get16bint (cts, seek);
-    else
-       return raw_get16lint (cts, seek);
-}
-#endif
-static guint32 get24lint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get24lint (cts, seek);
-    else
-       return raw_get24bint (cts, seek);
-}
-#if 0
-static guint32 get24bint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get24bint (cts, seek);
-    else
-       return raw_get24lint (cts, seek);
-}
-#endif
-static guint32 get32lint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get32lint (cts, seek);
-    else
-       return raw_get32bint (cts, seek);
-}
-
-static guint32 get32bint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get32bint (cts, seek);
-    else
-       return raw_get32lint (cts, seek);
-}
-
-static float get32lfloat (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get32lfloat (cts, seek);
-    else
-       return raw_get32bfloat (cts, seek);
-}
-#if 0
-static float get32bfloat (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get32bfloat (cts, seek);
-    else
-       return raw_get32lfloat (cts, seek);
-}
-#endif
-static guint64 get64lint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get64lint (cts, seek);
-    else
-       return raw_get64bint (cts, seek);
-}
-
-static guint64 get64bint (FContents *cts, glong seek)
-{
-    g_return_val_if_fail (cts, 0);
-    if (!cts->reversed)
-       return raw_get64bint (cts, seek);
-    else
-       return raw_get64lint (cts, seek);
-}
-
-
-
-
 /* Fix little endian UTF16 String to correct byteorder if necessary
  * (all strings in the Itdb_iTunesDB are little endian except for the ones
  * in smart playlists). */
@@ -755,7 +589,7 @@
     g_return_val_if_fail (fimp, FALSE);
     g_return_val_if_fail (cts, FALSE);
 
-    if (!check_header_seek (cts, "mhdp", 0))
+    if (!cmp_n_bytes_seek (cts, "mhdp", 0, 4))
     {
        if (cts->error)
        {
@@ -1093,7 +927,7 @@
 
     if (ml) *ml = -1;
 
-    if (check_header_seek (cts, "mhod", seek))
+    if (cmp_n_bytes_seek (cts, "mhod", seek, 4))
     {
        guint32 len = get32lint (cts, seek+8);    /* total length */
        if (cts->error) return -1;
@@ -1126,7 +960,6 @@
   gint32 xl;
   guint32 mhod_len;
   gint32 header_length;
-  guint32 string_type;
   gulong seek;
 
   result.valid = FALSE;
@@ -1155,12 +988,8 @@
       }
       return result;
   }
-
-  if (!check_seek (cts, mhod_seek, mhod_len))
-      return result;
-
-
   header_length = get32lint (cts, mhod_seek+4); /* header length  */
+  if (cts->error) return result;
 
   seek = mhod_seek + header_length;
 
@@ -1175,6 +1004,7 @@
   case MHOD_ID_PLAYLIST:
       /* return the position indicator */
       result.data.track_pos = get32lint (cts, mhod_seek+24);
+      if (cts->error) return result;  /* *ml==-1, result.valid==FALSE */
       break;
   case MHOD_ID_TITLE:
   case MHOD_ID_PATH:
@@ -1188,40 +1018,28 @@
   case MHOD_ID_GROUPING:
   case MHOD_ID_DESCRIPTION:
   case MHOD_ID_SUBTITLE:
-      /* type of string: 0x02: UTF8, 0x01 or 0x00: UTF16 LE */
-      string_type = get32lint (cts, seek);
       xl = get32lint (cts, seek+4);   /* length of string */
+      if (cts->error) return result;  /* *ml==-1, result.valid==FALSE */
       g_return_val_if_fail (xl < G_MAXUINT - 2, result);
-      if (string_type != 0x02)
+      entry_utf16 = g_new0 (gunichar2, (xl+2)/2);
+      if (seek_get_n_bytes (cts, (gchar *)entry_utf16, seek+16, xl))
       {
-         entry_utf16 = g_new0 (gunichar2, (xl+2)/2);
-         if (seek_get_n_bytes (cts, (gchar *)entry_utf16, seek+16, xl))
-         {
-             fixup_little_utf16 (entry_utf16);
-             result.data.string = g_utf16_to_utf8 (entry_utf16, -1,
-                                                   NULL, NULL, NULL);
-             g_free (entry_utf16);
-         }
-         else
-         {   /* error */
-             g_free (entry_utf16);
-             return result;  /* *ml==-1, result.valid==FALSE */
-         }
+         fixup_little_utf16 (entry_utf16);
+         result.data.string = g_utf16_to_utf8 (entry_utf16, -1,
+                                          NULL, NULL, NULL);
+         g_free (entry_utf16);
       }
       else
-      {
-         result.data.string = g_new0 (gchar, xl+1);
-         if (!seek_get_n_bytes (cts, result.data.string, seek+16, xl))
-         {   /* error */
-             g_free (entry_utf16);
-             return result;  /* *ml==-1, result.valid==FALSE */
-         }
+      {   /* error */
+         g_free (entry_utf16);
+         return result;  /* *ml==-1, result.valid==FALSE */
       }
       break;
   case MHOD_ID_PODCASTURL:
   case MHOD_ID_PODCASTRSS:
       /* length of string */
       xl = mhod_len - header_length;
+      if (cts->error) return result;  /* *ml==-1, result.valid==FALSE */
       g_return_val_if_fail (xl < G_MAXUINT - 1, result);
       result.data.string = g_new0 (gchar, xl+1);
       if (!seek_get_n_bytes (cts, result.data.string, seek, xl))
@@ -1257,7 +1075,7 @@
          result.data.splpref->limitsort |= 0x80000000;
       break;
   case MHOD_ID_SPLRULES:  /* Rules for smart playlist */
-      if (check_header_seek (cts, "SLst", seek))
+      if (cmp_n_bytes_seek (cts, "SLst", seek, 4))
       {
          /* !!! for some reason the SLst part is the only part of the
             iTunesDB with big-endian encoding, including UTF16
@@ -1489,7 +1307,7 @@
 /*     printf ("offset: %lx, b_len: %lx, bseek+offset: %lx\n",  */
 /*             offset, b_len, b_seek+offset); */
     } while ((offset < b_len-4) && 
-            !check_header_seek (cts, a, b_seek+offset));
+            !cmp_n_bytes_seek (cts, a, b_seek+offset, 4));
     if (cts->error) return -1;
 
     if (offset >= b_len)       return -1;
@@ -1515,21 +1333,17 @@
     guint32 i, len, mhsd_num;
     glong seek;
 
-    if (!check_header_seek (cts, "mhbd", 0))
+    if (!cmp_n_bytes_seek (cts, "mhbd", 0, 4))
     {
-       cts->reversed = TRUE;
-       if (!check_header_seek (cts, "mhbd", 0))
-       {
-           if (!cts->error)
-           {   /* set error */
-               g_set_error (&cts->error,
-                            ITDB_FILE_ERROR,
-                            ITDB_FILE_ERROR_CORRUPT,
-                            _("Not a iTunesDB: '%s' (missing mhdb header)."),
-                            cts->filename);
-           }
-           return 0;
+       if (!cts->error)
+       {   /* set error */
+           g_set_error (&cts->error,
+                        ITDB_FILE_ERROR,
+                        ITDB_FILE_ERROR_CORRUPT,
+                        _("Not a iTunesDB: '%s' (missing mhdb header)."),
+                        cts->filename);
        }
+       return 0;
     }
     len = get32lint (cts, 4);
     if (cts->error) return 0;
@@ -1556,7 +1370,7 @@
        guint32 mhsd_type;
 
        seek += len;
-       if (!check_header_seek (cts, "mhsd", seek))
+       if (!cmp_n_bytes_seek (cts, "mhsd", seek, 4))
        {
            if (!cts->error)
            {   /* set error */
@@ -1608,7 +1422,7 @@
 
     cts = fimp->itunesdb;
 
-    if (!check_header_seek (cts, "mhip", mhip_seek))
+    if (!cmp_n_bytes_seek (cts, "mhip", mhip_seek, 4))
     {
        CHECK_ERROR (fimp, -1);
        return -1;
@@ -1737,7 +1551,7 @@
 
   cts = fimp->itunesdb;
 
-  if (!check_header_seek (cts, "mhyp", mhyp_seek))
+  if (!cmp_n_bytes_seek (cts, "mhyp", mhyp_seek, 4))
   {
       if (cts->error)
          g_propagate_error (&fimp->error, cts->error);
@@ -1769,10 +1583,7 @@
 
   /* Some Playlists have added 256 to their type -- I don't know what
      it's for, so we just ignore it for now -> & 0xff */
-  plitem->type = get8int (cts, mhyp_seek+20);
-  plitem->flag1 = get8int (cts, mhyp_seek+20);
-  plitem->flag2 = get8int (cts, mhyp_seek+20);
-  plitem->flag3 = get8int (cts, mhyp_seek+20);
+  plitem->type = get32lint (cts, mhyp_seek+20) & 0xff;
   plitem->timestamp = get32lint (cts, mhyp_seek+24);
   plitem->id = get64lint (cts, mhyp_seek+28);
   plitem->mhodcount = get32lint (cts, mhyp_seek+36);
@@ -1930,7 +1741,7 @@
 
   cts = fimp->itunesdb;
 
-  if (!check_header_seek (cts, "mhit", seek))
+  if (!cmp_n_bytes_seek (cts, "mhit", seek, 4))
   {
       if (cts->error)
          g_propagate_error (&fimp->error, cts->error);
@@ -1965,12 +1776,10 @@
 
   if (header_len >= 0x9c)
   {
-      guint32 val32;
       track->id = get32lint(cts, seek+16);         /* iPod ID          */
       track->visible = get32lint (cts, seek+20);
       seek_get_n_bytes (cts, track->filetype_marker, seek+24, 4);
-      track->type1 = get8int (cts, seek+28);
-      track->type2 = get8int (cts, seek+29);
+      track->type = get16lint (cts, seek+28);
       track->compilation = get8int (cts, seek+30);
       track->rating = get8int (cts, seek+31);
       track->time_added = get32lint(cts, seek+32); /* time added       */
@@ -1980,9 +1789,8 @@
       track->tracks = get32lint(cts, seek+48);     /* nr of tracks     */
       track->year = get32lint(cts, seek+52);       /* year             */
       track->bitrate = get32lint(cts, seek+56);    /* bitrate          */
-      val32 = get32lint (cts, seek+60);
-      track->samplerate = val32 >> 16;             /* sample rate      */
-      track->samplerate_low = val32 & 0xffff;      /* remaining bits   */
+      track->unk060 = get32lint(cts, seek+60);     /* unknown          */
+      track->samplerate = get16lint(cts,seek+62);  /* sample rate      */
       track->volume = get32lint(cts, seek+64);     /* volume adjust    */
       track->starttime = get32lint (cts, seek+68);
       track->stoptime = get32lint (cts, seek+72);
@@ -2172,26 +1980,22 @@
 
     if (!plname) plname = _("OTG Playlist");
 
-    if (!check_header_seek (cts, "mhpo", 0))
+    if (!cmp_n_bytes_seek (cts, "mhpo", 0, 4))
     {
        if (cts->error)
        {
            g_propagate_error (&fimp->error, cts->error);
-           return FALSE;
        }
-       cts->reversed = TRUE;
-       if (!check_header_seek (cts, "mhpo", 0))
-       {
-           /* cts->error can't be set as already checked above */
-           /* set error */
+       else
+       {   /* set error */
            g_return_val_if_fail (cts->filename, FALSE);
            g_set_error (&fimp->error,
                         ITDB_FILE_ERROR,
                         ITDB_FILE_ERROR_CORRUPT,
                         _("Not a OTG playlist file: '%s' (missing mhpo 
header)."),
                         cts->filename);
-           return FALSE;
        }
+       return FALSE;
     }
     header_length = get32lint (cts, 4);
     CHECK_ERROR (fimp, FALSE);
@@ -2330,7 +2134,7 @@
 
     cts = fimp->itunesdb;
 
-    g_return_val_if_fail (check_header_seek (cts, "mhsd", mhsd_seek),
+    g_return_val_if_fail (cmp_n_bytes_seek (cts, "mhsd", mhsd_seek, 4),
                          FALSE);
 
    /* The mhlt header should be the next after the mhsd header. In
@@ -2390,7 +2194,7 @@
 
     cts = fimp->itunesdb;
 
-    g_return_val_if_fail (check_header_seek (cts, "mhsd", mhsd_seek),
+    g_return_val_if_fail (cmp_n_bytes_seek (cts, "mhsd", mhsd_seek, 4),
                          FALSE);
 
     /* The mhlp header should be the next after the mhsd header. In
@@ -2882,8 +2686,7 @@
 
   put32lint (cts, track->visible);
   put_data  (cts, track->filetype_marker, 4);
-  put8int (cts, track->type1);
-  put8int (cts, track->type2);
+  put16lint (cts, track->type);
   put8int   (cts, track->compilation);
   put8int   (cts, track->rating);
   put32lint (cts, track->time_added); /* timestamp               */
@@ -2893,8 +2696,8 @@
   put32lint (cts, track->tracks);  /* number of tracks           */
   put32lint (cts, track->year);    /* the year                   */
   put32lint (cts, track->bitrate); /* bitrate                    */
-  put32lint (cts, (((guint32)track->samplerate)<<16) |
-            ((guint32)track->samplerate_low));
+  put16lint (cts, track->unk060);  /* unknown                    */
+  put16lint (cts, track->samplerate);
   put32lint (cts, track->volume);  /* volume adjust              */
   put32lint (cts, track->starttime);
   put32lint (cts, track->stoptime);
@@ -3576,10 +3379,7 @@
        put32lint (cts, 2);        /* nr of mhods               */
     /* number of tracks in plist */
     put32lint (cts, -1);           /* number of mhips -> later  */
-    put8int (cts, pl->type);       /* 1 = main, 0 = visible     */
-    put8int (cts, pl->flag1);      /* unknown                   */
-    put8int (cts, pl->flag2);      /* unknown                   */
-    put8int (cts, pl->flag3);      /* unknown                   */
+    put32lint (cts, pl->type);     /* 1 = main, 0 = visible     */
     put32lint (cts, pl->timestamp);/* some timestamp            */
     put64lint (cts, pl->id);       /* 64 bit ID                 */
     pl->mhodcount = 1;             /* we only write one mhod type < 50 */

Index: itdb_private.h
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/src/itdb_private.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- itdb_private.h      9 Mar 2006 14:34:04 -0000       1.9
+++ itdb_private.h      9 Mar 2006 14:40:23 -0000       1.10
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-03-03 22:55:59 jcs>
+/* Time-stamp: <2005-10-15 22:14:26 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -59,9 +59,6 @@
     gchar *contents;
     gsize length;
     GError *error;
-    /* indicate that endian order is reversed as in the case of the
-       iTunesDBs for mobile phones */
-    gboolean reversed;
 } FContents;
 
 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to