2009-03-04 01:09:28

by Bea Lam

[permalink] [raw]
Subject: [PATCH] Add "Class" property to org.bluez.Adapter

Hi Marcel,

I mentioned on IRC a while back that a "Class" property for the Adapter
interface might be useful. I've attached a patch to this effect. Please
let me know if there are any issues.

cheers,

Bea



Attachments:
adapter-class-property.patch (1.92 kB)

2009-03-16 02:20:09

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Add "Class" property to org.bluez.Adapter

Hi Bea,

On Mon, Mar 16, 2009, Bea Lam wrote:
> Here's the formatted patch, without the unnecessary
> update_ext_inquiry_response() call.

Thanks! The patch is now pushed upstream. Unfortunately you just missed
the 4.33 release (Marcel already tagged it) so your patch will go into
4.34.

Johan

2009-03-16 01:38:48

by Bea Lam

[permalink] [raw]
Subject: Re: [PATCH] Add "Class" property to org.bluez.Adapter

Hi Johan,

> I can apply the patch but could you first create a proper version of it
> with git format-patch so that I don't have to start manipulating
> GIT_AUTHOR_NAME etc. myself. (I realize this isn't much work for myself
> either but it'd be good to get everyone submitting patches into this
> habit since otherwise the workload on our (me & Marcel) side starts
> accumulating pretty quickly.) Thanks.
Here's the formatted patch, without the unnecessary
update_ext_inquiry_response() call.

Thanks,

Bea


Attachments:
0001-Add-Class-property-to-org.bluez.Adapter-interface.patch (2.13 kB)

2009-03-12 15:09:47

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Add "Class" property to org.bluez.Adapter

Hi Bea,

On Thu, Mar 05, 2009, Bea Lam wrote:
> The revised patch is attached. The original format was based on
> similar code in security.c.

I can apply the patch but could you first create a proper version of it
with git format-patch so that I don't have to start manipulating
GIT_AUTHOR_NAME etc. myself. (I realize this isn't much work for myself
either but it'd be good to get everyone submitting patches into this
habit since otherwise the workload on our (me & Marcel) side starts
accumulating pretty quickly.) Thanks.

Johan

2009-03-05 00:24:22

by Bea Lam

[permalink] [raw]
Subject: Re: [PATCH] Add "Class" property to org.bluez.Adapter

Hi Marcel,
> + /* Class */
> + class = adapter->dev.class[0]
> + | (adapter->dev.class[1] << 8)
> + | (adapter->dev.class[2] << 16);
> + dict_append_entry(&dict, "Class", DBUS_TYPE_UINT32, &class);
> +
>
> This should more like this:
>
> class = adapter->dev.class[0] |
> adapter->dev.class[1] << 8 | ...
>
The revised patch is attached. The original format was based on similar
code in security.c.

Thanks

Bea



Attachments:
adapter-class-property.patch (1.92 kB)

2009-03-04 21:04:02

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Add "Class" property to org.bluez.Adapter

Hi Bea,

> I mentioned on IRC a while back that a "Class" property for the Adapter
> interface might be useful. I've attached a patch to this effect. Please
> let me know if there are any issues.

+ /* Class */
+ class = adapter->dev.class[0]
+ | (adapter->dev.class[1] << 8)
+ | (adapter->dev.class[2] << 16);
+ dict_append_entry(&dict, "Class", DBUS_TYPE_UINT32, &class);
+

This should more like this:

class = adapter->dev.class[0] |
adapter->dev.class[1] << 8 | ...

Regards

Marcel