Re: [RFC 1/2] Add Type property to Device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

On Mon, Apr 11, 2011 at 4:00 PM, Gustavo F. Padovan
<padovan@xxxxxxxxxxxxxx> wrote:
> * Andre Dieb Martins <andre.dieb@xxxxxxxxxxx> [2011-03-30 15:33:55 -0300]:
>
>> ---
>> Âdoc/device-api.txt | Â Â4 ++++
>> Âsrc/device.c    |  18 ++++++++++++++++++
>> Âsrc/device.h    |  Â2 ++
>> Â3 files changed, 24 insertions(+), 0 deletions(-)
>>
>> diff --git a/doc/device-api.txt b/doc/device-api.txt
>> index d1feb18..a667296 100644
>> --- a/doc/device-api.txt
>> +++ b/doc/device-api.txt
>> @@ -130,6 +130,10 @@ Properties    string Address [readonly]
>> Â Â Â Â Â Â Â Â Â Â Â Proposed icon name according to the freedesktop.org
>> Â Â Â Â Â Â Â Â Â Â Â icon naming specification.
>>
>> + Â Â Â Â Â Â string Type [readonly]
>> +
>> + Â Â Â Â Â Â Â Â Â Â Device type (BR/EDR, LE, BR/EDR/LE).
>> +
>> Â Â Â Â Â Â Â uint32 Class [readonly]
>>
>> Â Â Â Â Â Â Â Â Â Â Â The Bluetooth class of device of the remote device.
>> diff --git a/src/device.c b/src/device.c
>> index d567952..96683de 100644
>> --- a/src/device.c
>> +++ b/src/device.c
>> @@ -228,6 +228,20 @@ static void device_free(gpointer user_data)
>> Â Â Â g_free(device);
>> Â}
>>
>> +const char *devtype2str(device_type_t type)
>> +{
>> + Â Â switch (type) {
>> + Â Â case DEVICE_TYPE_BREDR:
>> + Â Â Â Â Â Â return "BR/EDR";
>> + Â Â case DEVICE_TYPE_LE:
>> + Â Â Â Â Â Â return "LE";
>> + Â Â case DEVICE_TYPE_DUALMODE:
>> + Â Â Â Â Â Â return "BR/EDR/LE";
>
> I think that Âuse "Dual Mode" is much better here.
>
> --
> Gustavo F. Padovan
> http://profusion.mobi
> --


Marcel asked me to wait until we have a request from UI developers.

This property is more useful in the DeviceFound() signal, since it is
not clear how to guess the type of the device found. For the Adapter
and Device objects it is less relevant at the moment.

BR,
Claudio
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux