All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Rymarkiewicz Waldemar <waldemar.rymarkiewicz@tieto.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC] bloodpressure: Add Blood Pressure API
Date: Wed, 8 May 2013 10:41:38 +0300	[thread overview]
Message-ID: <20130508074138.GA11502@x220> (raw)
In-Reply-To: <514021F5.1040005@tieto.com>

Hi Waldek,

On Wed, Mar 13, 2013, Rymarkiewicz Waldemar wrote:
>>>>+Interface	org.bluez.BloodPressure1
>>>>+Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
>>>>+
>>>>+Methods		RegisterWatcher(object watcher)
>>>>+
>>>>+			Registers a watcher to monitor blood pressure
>>>>+			measurements. This watcher will be notified about
>>>>+			final pressure measurements.
>>>>+
>>>>+			Possible Errors: org.bluez.Error.InvalidArguments
>>>>+
>>>>+		UnregisterWatcher(object watcher)
>>>>+
>>>>+			Unregisters a watcher.
>>>>+
>>>>+		EnableIntermediateMeasurement(object watcher)
>>>>+
>>>>+			Enables intermediate measurement notifications
>>>>+			for this watcher. Intermediate measurements will
>>>>+			be enabled only for devices which support it.
>>>>+
>>>>+			Possible Errors: org.bluez.Error.InvalidArguments
>>>>+					org.bluez.Error.NotSupported
>>>>+
>>>>+		DisableIntermediateMeasurement(object watcher)
>>>>+
>>>>+			Disables intermediate measurement notifications
>>>>+			for this watcher. It will disable notifications in
>>>>+			devices when the last watcher is removed for
>>>>+			intermediate measurements.
>>>>+
>>>>+			Possible Errors: org.bluez.Error.InvalidArguments
>>>>+					org.bluez.Error.NotFound
>>>
>>> why don't we make these two methods parts of a dict for
>>> RegisterWatcher. Enabling them manually seems rather pointless.
>>
>> It's been done intentionally to be able to return "not supported" error
>> when intermediate measurement is not available.
>>
>> Having RegisterWatcher(object watcher, boolean intermediate) and
>> additionally Intermediate property [read only] is an another option.
>>
>> In this case app will check intermediate property and set intermediate
>> param to RegisterWatcher appropriately.
>
> Any comments on this.

Are you still working on this? Seems this discussion was forgotten or
just abandoned.

Having the intermediate measurement enabling in the registration instead
of a separate method and you being fine with it (assuming that an
Intermediate property is added) raises some questions.

Apparently it was never a requirement to be able to enable/disable this
an arbitrary amount of times during the watcher life time, and instead
just leave it disabled or enabled until the watcher gets unregistered?

Also, do you think there will be UIs that will refuse to work if a
device does not support intermediate measurement or that any UI that is
interested in intermediate measurement will forgive devices that do not
support it and simply get on with working without it being enabled? If
the latter is true then why not make an API which allows requesting
"register watcher and enable intermediate measurement if it's
supported". In such a case you wouldn't need a separate property and the
registration would succeed even if intermediate measurement isn't
supported. Thoughts?

Johan

  reply	other threads:[~2013-05-08  7:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 11:21 [RFC] bloodpressure: Add Blood Pressure API Waldemar Rymarkiewicz
2013-02-20  7:57 ` Johan Hedberg
2013-02-28 14:00   ` Rymarkiewicz Waldemar
2013-02-28 14:18     ` Johan Hedberg
2013-03-01  8:34       ` Rymarkiewicz Waldemar
2013-03-01  8:39         ` Johan Hedberg
2013-03-01 12:11       ` Rymarkiewicz Waldemar
2013-03-01 13:37         ` Johan Hedberg
2013-03-02  3:09 ` Marcel Holtmann
2013-03-05 11:39   ` Rymarkiewicz Waldemar
2013-03-05 16:15     ` Marcel Holtmann
2013-03-06  8:51       ` Rymarkiewicz Waldemar
2013-03-13  6:51         ` Rymarkiewicz Waldemar
2013-05-08  7:41           ` Johan Hedberg [this message]
2013-05-16 12:17             ` Waldemar Rymarkiewicz
2013-05-16 12:22               ` Waldemar Rymarkiewicz

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=20130508074138.GA11502@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=waldemar.rymarkiewicz@tieto.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.