From: Christian Fetzer <christian.fetzer@oss.bmw-carit.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 5/8] obexd: Add RegisterNotifications function
Date: Wed, 13 Mar 2013 14:20:56 +0100 [thread overview]
Message-ID: <51407D38.2080600@oss.bmw-carit.de> (raw)
In-Reply-To: <72B23061-16D8-4949-AAB4-9537F6726FCB@holtmann.org>
Hi Marcel,
On 03/11/2013 05:19 PM, Marcel Holtmann wrote:
> Hi Christian,
>
>> This allows applications to register for all different types
>> of MAP event reports.
>>
>> In response to this call, the MSE should connect to the local MNS
>> instance.
>> ---
>> doc/obex-api.txt | 6 ++++
>> obexd/client/map.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 92 insertions(+)
> never ever intermix doc/ changes with actual code. You really need to learn on how to split patches properly. There is no reason at all that this are not two patches.
>
>
>> diff --git a/doc/obex-api.txt b/doc/obex-api.txt
>> index 759c4d8..ef5d85e 100644
>> --- a/doc/obex-api.txt
>> +++ b/doc/obex-api.txt
>> @@ -651,6 +651,12 @@ Methods void SetFolder(string name)
>> Possible errors: org.bluez.obex.Error.InvalidArguments
>> org.bluez.obex.Error.Failed
>>
>> + void RegisterNotifications(boolean)
>> +
>> + Register / unregister reception of notifications.
>> +
>> + Possible errors: org.bluez.obex.Error.InvalidArguments
>> + org.bluez.obex.Error.Failed
> Why don't you describe the boolean variable and what it does. If this is an on/off switch, then we are not doing this stupid thing here.
>
> Simple things like EnableNotifications and DisableNotifications would be better. Also this needs a bit detailed explanations why you thing this is the right API for handling this. I am not even convinced we should be doing it like this.
>
> Regards
>
> Marcel
Thanks for your comments. I'll split the patches and send an updated
patch set.
Yes, RegisterNotification simply enables / disabled receiving event
reports. I can change it as suggested.
The reason for having an API function instead of enabling it implicitly
is that the application can control
for which device it wants to receive event reports.
Event reports can be received for multiple MAP sessions on the same device.
This is used for example when the phone exposes different E-Mail
accounts as different MAP instances.
But according to the specification, we need to have one MNS (obex
server) instance for each remote device.
The current code is limited to exactly one static MNS instance, and you
can receive notifications only for one device.
In the future we could eventually work around that limitation by
dynamically instantiating MNS instances when
needed.
Br,
Christian
next prev parent reply other threads:[~2013-03-13 13:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 15:05 [PATCH v3 0/8] MAP client: notification support Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 1/8] obexd: Add get_service_record to obc_transport Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 2/8] obexd: Provide SDP record in get_service_record Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 3/8] obexd: Read MAP client SDP attributes Christian Fetzer
2013-03-11 16:12 ` Marcel Holtmann
2013-03-11 15:05 ` [PATCH v3 4/8] obexd: Add Message Notification Server (MNS) Christian Fetzer
2013-03-11 16:15 ` Marcel Holtmann
2013-03-11 15:05 ` [PATCH v3 5/8] obexd: Add RegisterNotifications function Christian Fetzer
2013-03-11 16:19 ` Marcel Holtmann
2013-03-13 13:20 ` Christian Fetzer [this message]
2013-03-13 16:27 ` Marcel Holtmann
2013-03-13 19:57 ` Luiz Augusto von Dentz
2013-03-15 15:38 ` Christian Fetzer
2013-03-15 15:43 ` Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 6/8] obexd: Add MAP notification dispatcher Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 7/8] obexd: Register MAP notification handler Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 8/8] obexd: Notify registered notification handlers Christian Fetzer
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=51407D38.2080600@oss.bmw-carit.de \
--to=christian.fetzer@oss.bmw-carit.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox