diff options
author | Christophe Fergeau <teuf@gnome.org> | 2008-07-29 20:10:13 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2008-07-29 20:10:13 +0000 |
commit | 3d4dcd608dedba63d189cd70261361666acf1395 (patch) | |
tree | c4fbfa3215eb1377e1f70ff10296ab1dea5b9c88 /src | |
parent | 41157543e001f922623bbf3627c1cf142cb243f5 (diff) | |
download | libgpod-tmz-3d4dcd608dedba63d189cd70261361666acf1395.tar.gz libgpod-tmz-3d4dcd608dedba63d189cd70261361666acf1395.tar.xz libgpod-tmz-3d4dcd608dedba63d189cd70261361666acf1395.zip |
Use GError in SysInfoExtended parsing
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2067 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src')
-rw-r--r-- | src/itdb_device.c | 2 | ||||
-rw-r--r-- | src/itdb_sysinfo_extended_parser.c | 6 | ||||
-rw-r--r-- | src/itdb_sysinfo_extended_parser.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/itdb_device.c b/src/itdb_device.c index 7d7819c..61db852 100644 --- a/src/itdb_device.c +++ b/src/itdb_device.c @@ -642,7 +642,7 @@ static void itdb_device_read_sysinfo_extended (Itdb_Device *device) sysinfo_ex_path = itdb_resolve_path (dev_path, p_sysinfo_ex); g_free (dev_path); if (!sysinfo_ex_path) return; - device->sysinfo_extended = itdb_sysinfo_extended_parse (sysinfo_ex_path); + device->sysinfo_extended = itdb_sysinfo_extended_parse (sysinfo_ex_path, NULL); g_free (sysinfo_ex_path); if ((device->sysinfo != NULL) && (device->sysinfo_extended != NULL)) { diff --git a/src/itdb_sysinfo_extended_parser.c b/src/itdb_sysinfo_extended_parser.c index 324e42d..18b194a 100644 --- a/src/itdb_sysinfo_extended_parser.c +++ b/src/itdb_sysinfo_extended_parser.c @@ -460,6 +460,7 @@ static void process_one (gpointer key, gpointer value, gpointer user_data) *img_formats = g_list_prepend (*img_formats, format); } } + static GList *parse_one_formats_list (GHashTable *sysinfo_dict, const char *key) { @@ -500,14 +501,15 @@ static SysInfoIpodProperties *g_value_to_ipod_properties (GValue *value) return props; } -SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename) +SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename, + GError **error) { GValue *parsed_doc; SysInfoIpodProperties *props; g_return_val_if_fail (filename != NULL, NULL); - parsed_doc = itdb_plist_parse_from_file (filename, NULL); + parsed_doc = itdb_plist_parse_from_file (filename, error); if (parsed_doc == NULL) { return NULL; } diff --git a/src/itdb_sysinfo_extended_parser.h b/src/itdb_sysinfo_extended_parser.h index 221e0e8..a58fa4f 100644 --- a/src/itdb_sysinfo_extended_parser.h +++ b/src/itdb_sysinfo_extended_parser.h @@ -35,7 +35,8 @@ G_BEGIN_DECLS typedef struct _SysInfoIpodProperties SysInfoIpodProperties; void itdb_sysinfo_properties_dump (SysInfoIpodProperties *props); -SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename); +SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename, + GError **error); void itdb_sysinfo_properties_free (SysInfoIpodProperties *props); const char * |