On Sunday 20 of December 2020 13:31:36 deloptes wrote:
Hi,
looking into how to add MTP some questions arise
1. Why is there the usb.ids file in
core/tdebase/kcontrol/usbview/usb.ids
Why is the file so outdated - actually has no revision, but compared
to /var/lib/usbutils/usb.ids which is part of package usb.ids Why not
using the officially maintained usb.ids file?
There is a build option WITH_USBIDS that allows to specify the usb.ids path
on the system. For example, in tde-packaging for deb packages you can see
that this option is used. Therefore, this file is not installed as part of
deb packages.
2. the USB ids are handled in tdelibs and tdebase.
Adding MTP as
separate tdeio module would impact also these, or is there a better
approach?
How is an MTP tdeio slave assigned to a device? Is it based on a mimetype?
Or does tdeio-mtp work as a special ioslave to find and provide all MTP
devices?
If during the device recognition in tdehw-lib there we would identify the
MTP device and set the appropriate device type and flags, this could
probably be useful?
3. as I understand the TDE library classifies the
device based on some
string in the usb.ids, but I am not exactly sure how it will classify
one device as Camera (PTP) and another as MTP.
Devices in tdehw-lib are recognized by data from udev => values visible in
sysfs and discoverable by udevadm. I tried to find out if there is
information available that the device is MTP and I found the value
ID_MTP_DEVICE=1.
So far, there doesn't seem to be any code in tdehw-lib to recognize and
operate MTP devices.
Can someone elaborate on these questions please?
____________________________________________________
Cheers
--
Slávek