Revision: 2282
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2282&view=rev
Author:   teuf
Date:     2009-03-22 13:06:10 +0000 (Sun, 22 Mar 2009)

Log Message:
-----------
        * src/itdb_device.c: add warning about itdb_set_mountpoint use,
        describe model_number parameter of itdb_init_ipod
        * src/itdb_itunesdb.c: add warning about itdb_device_read_sysinfo
        and itdb_device_set_mountpoint use, explain when
        itdb_device_get_ipod_info_table can be useful.
        * doc/reference/libgpod-sections.txt: move around a few functions
        (mainly itdb_init_ipod and itdb_device_*_sysinfo_*)

Modified Paths:
--------------
    libgpod/trunk/ChangeLog
    libgpod/trunk/docs/reference/libgpod-sections.txt
    libgpod/trunk/docs/reference/tmpl/device.sgml
    libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml
    libgpod/trunk/src/itdb_device.c
    libgpod/trunk/src/itdb_itunesdb.c

Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog     2009-03-21 13:21:51 UTC (rev 2281)
+++ libgpod/trunk/ChangeLog     2009-03-22 13:06:10 UTC (rev 2282)
@@ -1,3 +1,13 @@
+2009-03-22  Christophe Fergeau  <[email protected]>
+
+       * src/itdb_device.c: add warning about itdb_set_mountpoint use,
+       describe model_number parameter of itdb_init_ipod
+       * src/itdb_itunesdb.c: add warning about itdb_device_read_sysinfo
+       and itdb_device_set_mountpoint use, explain when
+       itdb_device_get_ipod_info_table can be useful.
+       * doc/reference/libgpod-sections.txt: move around a few functions
+       (mainly itdb_init_ipod and itdb_device_*_sysinfo_*)
+
 2009-03-21  Christophe Fergeau  <[email protected]>
 
        Patch from: Andrew W. Nosenko  <[email protected]>

Modified: libgpod/trunk/docs/reference/libgpod-sections.txt
===================================================================
--- libgpod/trunk/docs/reference/libgpod-sections.txt   2009-03-21 13:21:51 UTC 
(rev 2281)
+++ libgpod/trunk/docs/reference/libgpod-sections.txt   2009-03-22 13:06:10 UTC 
(rev 2282)
@@ -10,6 +10,7 @@
 itdb_write
 itdb_set_mountpoint
 itdb_get_mountpoint
+itdb_init_ipod
 
 itdb_tracks_number
 itdb_tracks_number_nontransferred
@@ -177,22 +178,21 @@
 itdb_device_new
 itdb_device_free
 itdb_device_set_mountpoint
-itdb_device_read_sysinfo
-itdb_device_get_sysinfo
-itdb_device_set_sysinfo
-itdb_device_write_sysinfo
-Itdb_IpodInfo
-itdb_device_get_ipod_info
 itdb_device_supports_artwork
 itdb_device_supports_photo
 itdb_device_supports_video
+Itdb_IpodInfo
+itdb_device_get_ipod_info
 itdb_info_get_ipod_info_table
 Itdb_IpodGeneration
 itdb_info_get_ipod_generation_string
 Itdb_IpodModel
 itdb_info_get_ipod_model_name_string
-itdb_init_ipod
 Itdb_ArtworkFormat
+itdb_device_read_sysinfo
+itdb_device_get_sysinfo
+itdb_device_set_sysinfo
+itdb_device_write_sysinfo
 </SECTION>
 
 <SECTION>

Modified: libgpod/trunk/docs/reference/tmpl/device.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/device.sgml       2009-03-21 13:21:51 UTC 
(rev 2281)
+++ libgpod/trunk/docs/reference/tmpl/device.sgml       2009-03-22 13:06:10 UTC 
(rev 2282)
@@ -55,7 +55,7 @@
 @mp: 
 
 
-<!-- ##### FUNCTION itdb_device_read_sysinfo ##### -->
+<!-- ##### FUNCTION itdb_device_supports_artwork ##### -->
 <para>
 
 </para>
@@ -64,33 +64,21 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_device_get_sysinfo ##### -->
+<!-- ##### FUNCTION itdb_device_supports_photo ##### -->
 <para>
 
 </para>
 
 @device: 
-...@field: 
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_device_set_sysinfo ##### -->
+<!-- ##### FUNCTION itdb_device_supports_video ##### -->
 <para>
 
 </para>
 
 @device: 
-...@field: 
-...@value: 
-
-
-<!-- ##### FUNCTION itdb_device_write_sysinfo ##### -->
-<para>
-
-</para>
-
-...@device: 
-...@error: 
 @Returns: 
 
 
@@ -118,33 +106,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_device_supports_artwork ##### -->
-<para>
-
-</para>
-
-...@device: 
-...@returns: 
-
-
-<!-- ##### FUNCTION itdb_device_supports_photo ##### -->
-<para>
-
-</para>
-
-...@device: 
-...@returns: 
-
-
-<!-- ##### FUNCTION itdb_device_supports_video ##### -->
-<para>
-
-</para>
-
-...@device: 
-...@returns: 
-
-
 <!-- ##### FUNCTION itdb_info_get_ipod_info_table ##### -->
 <para>
 
@@ -242,18 +203,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION itdb_init_ipod ##### -->
-<para>
-
-</para>
-
-...@mountpoint: 
-...@model_number: 
-...@ipod_name: 
-...@error: 
-...@returns: 
-
-
 <!-- ##### STRUCT Itdb_ArtworkFormat ##### -->
 <para>
 
@@ -274,3 +223,42 @@
 @gamma: 
 @associated_format: 
 
+<!-- ##### FUNCTION itdb_device_read_sysinfo ##### -->
+<para>
+
+</para>
+
+...@device: 
+...@returns: 
+
+
+<!-- ##### FUNCTION itdb_device_get_sysinfo ##### -->
+<para>
+
+</para>
+
+...@device: 
+...@field: 
+...@returns: 
+
+
+<!-- ##### FUNCTION itdb_device_set_sysinfo ##### -->
+<para>
+
+</para>
+
+...@device: 
+...@field: 
+...@value: 
+
+
+<!-- ##### FUNCTION itdb_device_write_sysinfo ##### -->
+<para>
+
+</para>
+
+...@device: 
+...@error: 
+...@returns: 
+
+

Modified: libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml
===================================================================
--- libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml  2009-03-21 13:21:51 UTC 
(rev 2281)
+++ libgpod/trunk/docs/reference/tmpl/itunesdb-db.sgml  2009-03-22 13:06:10 UTC 
(rev 2282)
@@ -174,6 +174,18 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION itdb_init_ipod ##### -->
+<para>
+
+</para>
+
+...@mountpoint: 
+...@model_number: 
+...@ipod_name: 
+...@error: 
+...@returns: 
+
+
 <!-- ##### FUNCTION itdb_tracks_number ##### -->
 <para>
 

Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c     2009-03-21 13:21:51 UTC (rev 2281)
+++ libgpod/trunk/src/itdb_device.c     2009-03-22 13:06:10 UTC (rev 2282)
@@ -735,6 +735,12 @@
  * Sets the mountpoint of @device to @mp and update the cached device 
  * information (in particular, re-read the SysInfo file)
  *
+ * <warning><para>Calling this function invalidates all the artwork in the
+ * #Itdb_iTunesDB database using this #Itdb_Device. Trying to access this
+ * artwork will result in memory corruption. It's recommended to use
+ * itdb_set_mountpoint() instead which will clean the invalidated artwork
+ * for you.</para></warning>.
+ *
  * Since: 0.4.0
  */
 void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp)
@@ -801,6 +807,12 @@
  * Reads the SysInfo file and stores information in device->sysinfo for
  * later use.
  *
+ * <warning><para>Calling this function invalidates all the artwork in the
+ * #Itdb_iTunesDB database using this #Itdb_Device. Trying to access this
+ * artwork will result in memory corruption. Directly calling this function
+ * shouldn't ever be needed and it will be deprecated
+ * soon.</para></warning>.
+ *
  * Returns: TRUE if file could be read, FALSE otherwise 
  *
  * Since: 0.4.0
@@ -1333,7 +1345,8 @@
  * itdb_info_get_ipod_info_table:
  *
  * Return a pointer to the start of valid iPod model descriptions,
- * which is an array of #Itdb_IpodInfo entries.
+ * which is an array of #Itdb_IpodInfo entries. This can be useful if you
+ * want to build a list of all iPod models known to the current libgpod.
  *
  * Returns: a pointer to the array of #Itdb_IpodInfo entries.
  *

Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c   2009-03-21 13:21:51 UTC (rev 2281)
+++ libgpod/trunk/src/itdb_itunesdb.c   2009-03-22 13:06:10 UTC (rev 2282)
@@ -5844,6 +5844,10 @@
  * available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
  * an iPod database that may be present on the iPod at @mp.
  *
+ * <note><para>Calling this function removes the artwork in the
+ * #Itdb_iTunesDB database using this #Itdb_Device which was read from the
+ * iPod.</para></note>.
+ *
  * Since: 0.1.3
  */
 void itdb_set_mountpoint (Itdb_iTunesDB *itdb, const gchar *mp)
@@ -6785,7 +6789,7 @@
 /**
  * itdb_init_ipod:
  * @mountpoint:   the iPod mountpoint
- * @model_number: the iPod model number
+ * @model_number: the iPod model number, can be NULL
  * @ipod_name:    the name to give to the iPod. Will be displayed in
  *                gtkpod or itunes
  * @error:        return location for a #GError or NULL
@@ -6794,6 +6798,12 @@
  * create a blank database, complete with master playlist and device
  * information as well as the directory structure required for the
  * type of iPod.
+ * @model_number is used to tell libgpod about the exact iPod
+ * model, which is needed for proper artwork writing. @model_number can be
+ * found from the table returned by itdb_device_get_ipod_info_table (for
+ * example). On recent distros with iPods released
+ * in the last few years (starting with the iPod Color), it should be fine
+ * to pass in a NULL @model_number while still getting artwork writing.
  * 
  * Returns: TRUE when successful, FALSE if a failure has occurred.
  *


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to