Re: [Bluez-devel] CUPS plugin discovery bits

Johan Hedberg
2007-05-24T15:31:32Z

Hi Bastien,

On May 24, 2007, at 15:39, Bastien Nocera wrote:
> On Wed, 2007-05-23 at 18:56 +0200, Johan Hedberg wrote:
>> Hi Bastien,
>>
>> On May 23, 2007, at 18:26, Bastien Nocera wrote:
>>> Updated patch attached.
>>
>> A little about optimizing the device discovery.
>
> Fixed in this version, and also added recent devices (through
> ListRemoteDevices and ListBondings).

I see you're now using the manual name resolving discovery and
deciding from the device class whether to get the name or not. Great!
However, you are causing an unecessary roundtrip back to hcid by
calling GetRemoteMinorClass because you in fact already have the
necessary information encoded in the class parameter of the
RemoteDeviceFound signal. It's not as convenient as a string to do a
strcmp on, but you can just take example from hcid code how it
converts the 3 byte value to the string.

Johan