Hello, I have been working today on the UDev backend to get it in shape. Some comments:
I can't remember exactly how the discussion of the needed-to-be-implemented interfaces was, so, from bugzilla I understand the next: - GenericInterface - Processor - Camera - PortableMediaPlayer And I don't know if I have to implement the next: - AudioInterface - Video Some more comments on what I found a bit frustrating: I haven't got too many hardware here, so I can't really test what I have been doing, actually _right now_ here at home I have only Processor. My main problem has been also to map on what is what; to explain it further: what is exactly a Camera ? (I guess it is a Camera for taking photos, since a webcam should fall back to Video category), and a PortableMediaPlayer ? (any MP3 can be considered a PortableMediaPlayer ?). Now, more specific: I still have to implement devicesFromQuery call of the UDev, since the parent stuff was rethought (as far as I understood on the sprint) I'd like to know if I really need to check some kind of tree (with real depth) or just check if I am being asked for the root or an element that is not root. Icons and descriptions sure can be tweaked, and my question here is also: I have used queryDeviceInterface for not duplicating logic to detect certain types of devices, and I'd like to know if that is an accepted procedure to check this information. Since I haven't got Camera or PortableMediaPlayers right now I just couldn't find out what HAL was returning in this case (the HAL backend most of the time just forwards what HAL returns) so I couldn't adapt it to the UDev backend. Processors. I get them by asking driver == "processor", what I guess is fine. I get their "number of processor" just by analyzing the URI and stripping out the last number, what in UDev determines which CPU it is, starting by 0, as the solid documentation points out. Here I (or better said, we) have to do some kind of black magic to get the rest of the information of the processor, that is not provided by UDev. In the sprint we talked about directly parsing /proc/cpuinfo (yeah, it is kind of *hackish*), but we need to check out if there are other less dirty possible solutions. I implemented hot plugging, but since I am only using "solid-hardware" helper, I can't really check it (anyways right now I filter out everything that is not a processor). How do you test hot plugging ? (I remember Kevin told me about a graphical application that lives in some branch at subversion, maybe it was that). So to wrap up: - I am filtering everything except processors right now. I need to know how to filter the rest of the devices depending on what you tell me that it is needed to be implemented (see the top of this email). Probably I will have to filter: Processors, Cameras and PortableMediaPlayers. I think I can get a Camera (if Camera means a "Camera"), if not I will need some kind of help from someone that has one, and I also can check how to filter out PortableMediaPlayers if an MP3 is considered one (I have an MP3 at my cottage, which is very close from home). All this point basically affects UDevManager::Private::isOfInterest, that filters out the non interesting devices. - Once I have this devices I can check what HAL returns for them, and I can just copy that behavior. I'd need someone with an iWHATEVER to help me out in how to detect that is _this_ kind of device. - I also didn't know if when returning the root node I have to make the distinction between "computer" or "computer-laptop" on the icon. I think I am not missing anything. Best regards, Rafael Fernández López. _______________________________________________ Kde-hardware-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-hardware-devel
