Revision: 2353
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2353&view=rev
Author:   teuf
Date:     2009-05-02 20:55:13 +0000 (Sat, 02 May 2009)

Log Message:
-----------
Set firmware_version in hal properties

Modified Paths:
--------------
    libgpod/trunk/src/itdb_sysinfo_extended_parser.c
    libgpod/trunk/src/itdb_sysinfo_extended_parser.h
    libgpod/trunk/tools/hal-callout.c

Modified: libgpod/trunk/src/itdb_sysinfo_extended_parser.c
===================================================================
--- libgpod/trunk/src/itdb_sysinfo_extended_parser.c    2009-05-02 20:54:52 UTC 
(rev 2352)
+++ libgpod/trunk/src/itdb_sysinfo_extended_parser.c    2009-05-02 20:55:13 UTC 
(rev 2353)
@@ -651,7 +651,7 @@
  * Returns: TRUE if the iPod supports sparse artwork, FALSE if it does not
  * or if @props doesn't contain any information about sparse artwork
  */
-G_GNUC_INTERNAL gboolean
+gboolean
 itdb_sysinfo_properties_supports_sparse_artwork (const SysInfoIpodProperties 
*props)
 {
     g_return_val_if_fail (props != NULL, FALSE);
@@ -666,3 +666,11 @@
 
     return props->podcasts_supported;
 }
+
+const char *
+itdb_sysinfo_properties_get_firmware_version (const SysInfoIpodProperties 
*props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+
+    return props->visible_build_id;
+}

Modified: libgpod/trunk/src/itdb_sysinfo_extended_parser.h
===================================================================
--- libgpod/trunk/src/itdb_sysinfo_extended_parser.h    2009-05-02 20:54:52 UTC 
(rev 2352)
+++ libgpod/trunk/src/itdb_sysinfo_extended_parser.h    2009-05-02 20:55:13 UTC 
(rev 2353)
@@ -64,6 +64,8 @@
 itdb_sysinfo_properties_supports_sparse_artwork (const SysInfoIpodProperties 
*);
 G_GNUC_INTERNAL gboolean
 itdb_sysinfo_properties_supports_podcast (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL const char *
+itdb_sysinfo_properties_get_firmware_version (const SysInfoIpodProperties *);
 
 G_END_DECLS
 

Modified: libgpod/trunk/tools/hal-callout.c
===================================================================
--- libgpod/trunk/tools/hal-callout.c   2009-05-02 20:54:52 UTC (rev 2352)
+++ libgpod/trunk/tools/hal-callout.c   2009-05-02 20:55:13 UTC (rev 2353)
@@ -416,6 +416,7 @@
        LibHalContext *ctx;
        const char *udi;
        const char *serial_number;
+       const char *firmware_version;
        char *icon_name;
        const Itdb_IpodInfo *info;
        char *model_name;
@@ -468,6 +469,15 @@
                                                   serial_number,
                                                   NULL);
        }
+
+       firmware_version = itdb_sysinfo_properties_get_firmware_version (props);
+       if (firmware_version != NULL) {
+               libhal_device_set_property_string (ctx, udi,
+                                                  
LIBGPOD_HAL_NS"ipod.firmware_version",
+                                                  firmware_version,
+                                                  NULL);
+       }
+
        libhal_device_set_property_bool (ctx, udi,
                                         
LIBGPOD_HAL_NS"ipod.images.album_art_supported",
                                         
(itdb_sysinfo_properties_get_cover_art_formats (props) != NULL),


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

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to