|
|
354f89 |
diff -up libgphoto2-2.4.7/packaging/generic/print-camera-list.c.storage libgphoto2-2.4.7/packaging/generic/print-camera-list.c
|
|
|
354f89 |
--- libgphoto2-2.4.7/packaging/generic/print-camera-list.c.storage 2009-08-11 17:11:27.000000000 +0200
|
|
|
354f89 |
+++ libgphoto2-2.4.7/packaging/generic/print-camera-list.c 2009-08-19 15:44:41.000000000 +0200
|
|
|
354f89 |
@@ -819,6 +819,8 @@ fdi_begin_func (const func_params_t *par
|
|
|
354f89 |
printf("<deviceinfo version=\"0.2\">\n");
|
|
|
354f89 |
printf(" <device>\n");
|
|
|
354f89 |
printf(" <match key=\"info.subsystem\" string=\"usb\">\n");
|
|
|
354f89 |
+ printf(" \n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.class\" compare_ne=\"8\">\n");
|
|
|
354f89 |
return 0;
|
|
|
354f89 |
}
|
|
|
354f89 |
|
|
|
354f89 |
@@ -858,62 +860,62 @@ fdi_camera_func (const func_params_t *pa
|
|
|
354f89 |
return 0;
|
|
|
354f89 |
}
|
|
|
354f89 |
if (a->usb_vendor) { /* usb product id might be 0! */
|
|
|
354f89 |
- printf(" <match key=\"usb.vendor_id\" int=\"%d\">\n", a->usb_vendor);
|
|
|
354f89 |
- printf(" <match key=\"usb.product_id\" int=\"%d\">\n", a->usb_product);
|
|
|
354f89 |
+ printf(" <match key=\"usb.vendor_id\" int=\"%d\">\n", a->usb_vendor);
|
|
|
354f89 |
+ printf(" <match key=\"usb.product_id\" int=\"%d\">\n", a->usb_product);
|
|
|
354f89 |
if (a->usb_vendor == 0x05ac) { /* Apple iPhone, PTP user. */
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.class\" int=\"6\">\n");
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.subclass\" int=\"1\">\n");
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.protocol\" int=\"1\">\n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.class\" int=\"6\">\n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.subclass\" int=\"1\">\n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.protocol\" int=\"1\">\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
if (a->device_type & GP_DEVICE_AUDIO_PLAYER) {
|
|
|
354f89 |
- printf(" <merge key=\"info.category\" type=\"string\">portable_audio_player</merge>\n");
|
|
|
354f89 |
- printf(" <addset key=\"info.capabilities\" type=\"strlist\">portable_audio_player</addset>\n");
|
|
|
354f89 |
- printf(" <merge key=\"portable_audio_player.access_method\" type=\"string\">user</merge>\n");
|
|
|
354f89 |
- printf(" <merge key=\"portable_audio_player.type\" type=\"string\">mtp</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"info.category\" type=\"string\">portable_audio_player</merge>\n");
|
|
|
354f89 |
+ printf(" <addset key=\"info.capabilities\" type=\"strlist\">portable_audio_player</addset>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"portable_audio_player.access_method\" type=\"string\">user</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"portable_audio_player.type\" type=\"string\">mtp</merge>\n");
|
|
|
354f89 |
|
|
|
354f89 |
/* FIXME: needs true formats ... But all of them can do MP3 */
|
|
|
354f89 |
- printf(" <append key=\"portable_audio_player.output_formats\" type=\"strlist\">audio/mpeg</append>\n");
|
|
|
354f89 |
+ printf(" <append key=\"portable_audio_player.output_formats\" type=\"strlist\">audio/mpeg</append>\n");
|
|
|
354f89 |
} else {
|
|
|
354f89 |
- printf(" <merge key=\"info.category\" type=\"string\">camera</merge>\n");
|
|
|
354f89 |
- printf(" <addset key=\"info.capabilities\" type=\"strlist\">camera</addset>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"info.category\" type=\"string\">camera</merge>\n");
|
|
|
354f89 |
+ printf(" <addset key=\"info.capabilities\" type=\"strlist\">camera</addset>\n");
|
|
|
354f89 |
|
|
|
354f89 |
/* HACK alert ... but the HAL / gnome-volume-manager guys want that */
|
|
|
354f89 |
if (NULL!=strstr(a->library,"ptp"))
|
|
|
354f89 |
- printf(" <merge key=\"camera.access_method\" type=\"string\">ptp</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.access_method\" type=\"string\">ptp</merge>\n");
|
|
|
354f89 |
else
|
|
|
354f89 |
- printf(" <merge key=\"camera.access_method\" type=\"string\">proprietary</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.access_method\" type=\"string\">proprietary</merge>\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
/* leave them here even for audio players */
|
|
|
354f89 |
- printf(" <merge key=\"camera.libgphoto2.name\" type=\"string\">%s</merge>\n", model);
|
|
|
354f89 |
- printf(" <merge key=\"camera.libgphoto2.support\" type=\"bool\">true</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.libgphoto2.name\" type=\"string\">%s</merge>\n", model);
|
|
|
354f89 |
+ printf(" <merge key=\"camera.libgphoto2.support\" type=\"bool\">true</merge>\n");
|
|
|
354f89 |
if (a->usb_vendor == 0x05ac) { /* Apple iPhone */
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
- printf(" </match>\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
- printf(" </match>\n");
|
|
|
354f89 |
|
|
|
354f89 |
} else if ((a->usb_class) && (a->usb_class != 666)) {
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.class\" int=\"%d\">\n", a->usb_class);
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.subclass\" int=\"%d\">\n", a->usb_subclass);
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.protocol\" int=\"%d\">\n", a->usb_protocol);
|
|
|
354f89 |
- printf(" <merge key=\"info.category\" type=\"string\">camera</merge>\n");
|
|
|
354f89 |
- printf(" <addset key=\"info.capabilities\" type=\"strlist\">camera</addset>\n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.class\" int=\"%d\">\n", a->usb_class);
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.subclass\" int=\"%d\">\n", a->usb_subclass);
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.protocol\" int=\"%d\">\n", a->usb_protocol);
|
|
|
354f89 |
+ printf(" <merge key=\"info.category\" type=\"string\">camera</merge>\n");
|
|
|
354f89 |
+ printf(" <addset key=\"info.capabilities\" type=\"strlist\">camera</addset>\n");
|
|
|
354f89 |
if (a->usb_class == 6) {
|
|
|
354f89 |
- printf(" <merge key=\"camera.access_method\" type=\"string\">ptp</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.access_method\" type=\"string\">ptp</merge>\n");
|
|
|
354f89 |
} else {
|
|
|
354f89 |
if (a->usb_class == 8) {
|
|
|
354f89 |
- printf(" <merge key=\"camera.access_method\" type=\"string\">storage</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.access_method\" type=\"string\">storage</merge>\n");
|
|
|
354f89 |
} else {
|
|
|
354f89 |
- printf(" <merge key=\"camera.access_method\" type=\"string\">proprietary</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.access_method\" type=\"string\">proprietary</merge>\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
}
|
|
|
354f89 |
- printf(" <merge key=\"camera.libgphoto2.name\" type=\"string\">%s</merge>\n", model);
|
|
|
354f89 |
- printf(" <merge key=\"camera.libgphoto2.support\" type=\"bool\">true</merge>\n");
|
|
|
354f89 |
+ printf(" <merge key=\"camera.libgphoto2.name\" type=\"string\">%s</merge>\n", model);
|
|
|
354f89 |
+ printf(" <merge key=\"camera.libgphoto2.support\" type=\"bool\">true</merge>\n");
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
- printf(" </match>\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
} /* camera has USB connection */
|
|
|
354f89 |
return 0;
|
|
|
354f89 |
@@ -922,6 +924,7 @@ fdi_camera_func (const func_params_t *pa
|
|
|
354f89 |
static int
|
|
|
354f89 |
fdi_end_func (const func_params_t *params, void *data)
|
|
|
354f89 |
{
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
printf(" </device>\n");
|
|
|
354f89 |
printf("</deviceinfo>\n");
|
|
|
354f89 |
@@ -948,6 +951,8 @@ fdi_device_begin_func (const func_params
|
|
|
354f89 |
printf("<deviceinfo version=\"0.2\">\n");
|
|
|
354f89 |
printf(" <device>\n");
|
|
|
354f89 |
printf(" <match key=\"info.subsystem\" string=\"usb\">\n");
|
|
|
354f89 |
+ printf(" \n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.class\" compare_ne=\"8\">\n");
|
|
|
354f89 |
return 0;
|
|
|
354f89 |
}
|
|
|
354f89 |
|
|
|
354f89 |
@@ -991,28 +996,28 @@ fdi_device_camera_func (const func_param
|
|
|
354f89 |
/* do not set category. We don't really know what this device really is.
|
|
|
354f89 |
* But we do now that is capable of being a camera, so add to capabilities
|
|
|
354f89 |
*/
|
|
|
354f89 |
- printf(" <match key=\"usb_device.vendor_id\" int=\"%d\">\n", a->usb_vendor);
|
|
|
354f89 |
- printf(" <match key=\"usb_device.product_id\" int=\"%d\">\n", a->usb_product);
|
|
|
354f89 |
+ printf(" <match key=\"usb_device.vendor_id\" int=\"%d\">\n", a->usb_vendor);
|
|
|
354f89 |
+ printf(" <match key=\"usb_device.product_id\" int=\"%d\">\n", a->usb_product);
|
|
|
354f89 |
if (params->add_comments) {
|
|
|
354f89 |
printf(" \n", a->model);
|
|
|
354f89 |
}
|
|
|
354f89 |
if (a->device_type & GP_DEVICE_AUDIO_PLAYER)
|
|
|
354f89 |
- printf(" <append key=\"info.capabilities\" type=\"strlist\">portable_audio_player</append>\n");
|
|
|
354f89 |
+ printf(" <append key=\"info.capabilities\" type=\"strlist\">portable_audio_player</append>\n");
|
|
|
354f89 |
else
|
|
|
354f89 |
- printf(" <append key=\"info.capabilities\" type=\"strlist\">camera</append>\n");
|
|
|
354f89 |
+ printf(" <append key=\"info.capabilities\" type=\"strlist\">camera</append>\n");
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
- printf(" </match>\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
#if 0
|
|
|
354f89 |
/* would need to be able to merge upwards ... but cannot currently */
|
|
|
354f89 |
else if ((a->usb_class) && (a->usb_class != 666)) {
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.class\" int=\"%d\">\n", a->usb_class);
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.subclass\" int=\"%d\">\n", a->usb_subclass);
|
|
|
354f89 |
- printf(" <match key=\"usb.interface.protocol\" int=\"%d\">\n", a->usb_protocol);
|
|
|
354f89 |
- printf(" <append key=\"info.capabilities\" type=\"strlist\">camera</append>\n");
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.class\" int=\"%d\">\n", a->usb_class);
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.subclass\" int=\"%d\">\n", a->usb_subclass);
|
|
|
354f89 |
+ printf(" <match key=\"usb.interface.protocol\" int=\"%d\">\n", a->usb_protocol);
|
|
|
354f89 |
+ printf(" <append key=\"info.capabilities\" type=\"strlist\">camera</append>\n");
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
- printf(" </match>\n");
|
|
|
354f89 |
}
|
|
|
354f89 |
#endif
|
|
|
354f89 |
}
|
|
|
354f89 |
@@ -1022,6 +1027,7 @@ fdi_device_camera_func (const func_param
|
|
|
354f89 |
static int
|
|
|
354f89 |
fdi_device_end_func (const func_params_t *params, void *data)
|
|
|
354f89 |
{
|
|
|
354f89 |
+ printf(" </match>\n");
|
|
|
354f89 |
printf(" </match>\n");
|
|
|
354f89 |
printf(" </device>\n");
|
|
|
354f89 |
printf("</deviceinfo>\n");
|