api,libmm-glib: use a 'unique-id' as ID of the firmware image, not a 'name'

Also, make only the 'unique-id' mandatory.
This commit is contained in:
Aleksander Morgado
2012-10-04 18:52:39 +02:00
parent d84b4f634e
commit 0d00ee28be
7 changed files with 43 additions and 82 deletions
+6 -8
View File
@@ -54,7 +54,7 @@ static GOptionEntry entries[] = {
},
{ "firmware-select", 0, 0, G_OPTION_ARG_STRING, &select_str,
"Select a given firmware image",
"[NAME]"
"[Unique ID]"
},
{ NULL }
};
@@ -157,17 +157,15 @@ list_process_reply (MMFirmwareProperties *selected,
MMFirmwareProperties *props = MM_FIRMWARE_PROPERTIES (l->data);
g_print ("\t[%u] %s%s\n"
"\t\t Type: '%s'\n"
"\t\tVersion: '%s'\n",
"\t\t Type: '%s'\n",
i,
mm_firmware_properties_get_name (props),
mm_firmware_properties_get_unique_id (props),
((selected &&
g_str_equal (mm_firmware_properties_get_name (props),
mm_firmware_properties_get_name (selected))) ?
g_str_equal (mm_firmware_properties_get_unique_id (props),
mm_firmware_properties_get_unique_id (selected))) ?
" (CURRENT)" : ""),
mm_firmware_image_type_get_string (
mm_firmware_properties_get_image_type (props)),
mm_firmware_properties_get_version (props));
mm_firmware_properties_get_image_type (props)));
g_object_unref (props);
}
g_list_free (result);