From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 2/7] test/example-advertisement: Fix data format of properties
Date: Thu, 11 Aug 2016 10:41:07 -0300 [thread overview]
Message-ID: <87shubxw24.fsf@intel.com> (raw)
In-Reply-To: <1470917692-8878-3-git-send-email-luiz.dentz@gmail.com>
Hi,
Luiz Augusto von Dentz <luiz.dentz@gmail.com> writes:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> D-Bus dictionaries always except the values to be of variant type.
nitpick: expect
> ---
> test/example-advertisement | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/test/example-advertisement b/test/example-advertisement
> index ce6e40f..7da0c7b 100755
> --- a/test/example-advertisement
> +++ b/test/example-advertisement
> @@ -65,10 +65,10 @@ class Advertisement(dbus.service.Object):
> signature='s')
> if self.manufacturer_data is not None:
> properties['ManufacturerData'] = dbus.Dictionary(
> - self.manufacturer_data, signature='qay')
> + self.manufacturer_data, signature='qv')
> if self.service_data is not None:
> properties['ServiceData'] = dbus.Dictionary(self.service_data,
> - signature='say')
> + signature='sv')
> if self.include_tx_power is not None:
> properties['IncludeTxPower'] = dbus.Boolean(self.include_tx_power)
> return {LE_ADVERTISEMENT_IFACE: properties}
> @@ -88,13 +88,13 @@ class Advertisement(dbus.service.Object):
>
> def add_manufacturer_data(self, manuf_code, data):
> if not self.manufacturer_data:
> - self.manufacturer_data = dict()
> - self.manufacturer_data[manuf_code] = data
> + self.manufacturer_data = dbus.Dictionary({}, signature='qv')
> + self.manufacturer_data[manuf_code] = dbus.Array(data, signature='y')
>
> def add_service_data(self, uuid, data):
> if not self.service_data:
> - self.service_data = dict()
> - self.service_data[uuid] = data
> + self.service_data = dbus.Dictionary({}, signature='sv')
> + self.service_data[uuid] = dbus.Array(data, signature='y')
>
> @dbus.service.method(DBUS_PROP_IFACE,
> in_signature='s',
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
--
Vinicius
next prev parent reply other threads:[~2016-08-11 13:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 12:14 [PATCH BlueZ 0/7] client: Add advertise support Luiz Augusto von Dentz
2016-08-11 12:14 ` [PATCH BlueZ 1/7] core/advertising: Fix not parsing data properly Luiz Augusto von Dentz
2016-08-11 12:14 ` [PATCH BlueZ 2/7] test/example-advertisement: Fix data format of properties Luiz Augusto von Dentz
2016-08-11 13:41 ` Vinicius Costa Gomes [this message]
2016-08-11 12:14 ` [PATCH BlueZ 3/7] client: Add advertise command Luiz Augusto von Dentz
2016-08-11 12:14 ` [PATCH BlueZ 4/7] client: Add set-advertise-uuids command Luiz Augusto von Dentz
2016-08-11 12:14 ` [PATCH BlueZ 5/7] client: Add set-advertise-service command Luiz Augusto von Dentz
2016-08-11 12:14 ` [PATCH BlueZ 6/7] client: Add set-advertise-manufacturer command Luiz Augusto von Dentz
2016-08-11 12:14 ` [PATCH BlueZ 7/7] client: Add set-advertise-tx-power command Luiz Augusto von Dentz
2016-08-16 11:59 ` [PATCH BlueZ 0/7] client: Add advertise support Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87shubxw24.fsf@intel.com \
--to=vinicius.gomes@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.