* [MAP] obexd/client: Handle MAP event types
@ 2014-08-28 5:46 gowtham babu
2014-08-28 7:57 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 7+ messages in thread
From: gowtham babu @ 2014-08-28 5:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: cpgs, bharat.panda, gowtham babu
Adds below MCE event types handling in map_handle_notification()
MAP_ET_MEMORY_FULL
MAP_ET_MEMORY_AVAILABLE
---
obexd/client/map.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 520e492..84feecf 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1927,6 +1927,12 @@ static void map_handle_notification(struct map_event *event, void *user_data)
case MAP_ET_MESSAGE_SHIFT:
map_handle_folder_changed(map, event, event->folder);
break;
+ case MAP_ET_MEMORY_FULL:
+ map_handle_status_changed(map, event, "memory-full");
+ break;
+ case MAP_ET_MEMORY_AVAILABLE:
+ map_handle_status_changed(map, event, "memory-available");
+ break;
default:
break;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [MAP] obexd/client: Handle MAP event types
2014-08-28 5:46 [MAP] obexd/client: Handle MAP event types gowtham babu
@ 2014-08-28 7:57 ` Luiz Augusto von Dentz
2014-08-28 9:11 ` Gowtham Anandha Babu
0 siblings, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2014-08-28 7:57 UTC (permalink / raw)
To: gowtham babu; +Cc: linux-bluetooth@vger.kernel.org, cpgs, Bharat Panda
Hi,
On Thu, Aug 28, 2014 at 8:46 AM, gowtham babu <gowtham.ab@samsung.com> wrote:
> Adds below MCE event types handling in map_handle_notification()
> MAP_ET_MEMORY_FULL
> MAP_ET_MEMORY_AVAILABLE
> ---
> obexd/client/map.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/obexd/client/map.c b/obexd/client/map.c
> index 520e492..84feecf 100644
> --- a/obexd/client/map.c
> +++ b/obexd/client/map.c
> @@ -1927,6 +1927,12 @@ static void map_handle_notification(struct map_event *event, void *user_data)
> case MAP_ET_MESSAGE_SHIFT:
> map_handle_folder_changed(map, event, event->folder);
> break;
> + case MAP_ET_MEMORY_FULL:
> + map_handle_status_changed(map, event, "memory-full");
> + break;
> + case MAP_ET_MEMORY_AVAILABLE:
> + map_handle_status_changed(map, event, "memory-available");
> + break;
> default:
> break;
> }
> --
> 1.9.1
Those are actually ignored on purpose since there is nothing the
applications can do with them, in fact I find it very awkward that it
got into MAP spec and in any case this not really work since the
handle for those events is not set to a specific message according to
the spec page 33:
'"handle" is not used when the event "type" is "MemoryFull" or
"MemoryAvailable".'
I could be mapped to the session itself but then again how a client is
suppose to handle those and is there any server that is sending them.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [MAP] obexd/client: Handle MAP event types
2014-08-28 7:57 ` Luiz Augusto von Dentz
@ 2014-08-28 9:11 ` Gowtham Anandha Babu
2014-08-28 9:46 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 7+ messages in thread
From: Gowtham Anandha Babu @ 2014-08-28 9:11 UTC (permalink / raw)
To: 'Luiz Augusto von Dentz'; +Cc: linux-bluetooth
Hi Luiz,
But in the obexd/client/mns.c
Inside parse_event_report_type() function, event types are assigned with the values MAP_ET_MEMORY_FULL and MAP_ET_MEMORY_AVAILABLE.
It should be handled in the map_handle_notification() inside map.c.
-----Original Message-----
From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
Sent: Thursday, August 28, 2014 1:27 PM
To: gowtham babu
Cc: linux-bluetooth@vger.kernel.org; cpgs@samsung.com; Bharat Panda
Subject: Re: [MAP] obexd/client: Handle MAP event types
Hi,
On Thu, Aug 28, 2014 at 8:46 AM, gowtham babu <gowtham.ab@samsung.com> wrote:
> Adds below MCE event types handling in map_handle_notification()
> MAP_ET_MEMORY_FULL MAP_ET_MEMORY_AVAILABLE
> ---
> obexd/client/map.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/obexd/client/map.c b/obexd/client/map.c index
> 520e492..84feecf 100644
> --- a/obexd/client/map.c
> +++ b/obexd/client/map.c
> @@ -1927,6 +1927,12 @@ static void map_handle_notification(struct map_event *event, void *user_data)
> case MAP_ET_MESSAGE_SHIFT:
> map_handle_folder_changed(map, event, event->folder);
> break;
> + case MAP_ET_MEMORY_FULL:
> + map_handle_status_changed(map, event, "memory-full");
> + break;
> + case MAP_ET_MEMORY_AVAILABLE:
> + map_handle_status_changed(map, event, "memory-available");
> + break;
> default:
> break;
> }
> --
> 1.9.1
Those are actually ignored on purpose since there is nothing the applications can do with them, in fact I find it very awkward that it got into MAP spec and in any case this not really work since the handle for those events is not set to a specific message according to the spec page 33:
'"handle" is not used when the event "type" is "MemoryFull" or "MemoryAvailable".'
I could be mapped to the session itself but then again how a client is suppose to handle those and is there any server that is sending them.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MAP] obexd/client: Handle MAP event types
2014-08-28 9:11 ` Gowtham Anandha Babu
@ 2014-08-28 9:46 ` Luiz Augusto von Dentz
2014-08-28 13:32 ` Gowtham Anandha Babu
2014-09-04 14:22 ` Gowtham Anandha Babu
0 siblings, 2 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2014-08-28 9:46 UTC (permalink / raw)
To: Gowtham Anandha Babu; +Cc: linux-bluetooth@vger.kernel.org
Hi,
On Thu, Aug 28, 2014 at 12:11 PM, Gowtham Anandha Babu
<gowtham.ab@samsung.com> wrote:
> Hi Luiz,
> But in the obexd/client/mns.c
> Inside parse_event_report_type() function, event types are assigned with the values MAP_ET_MEMORY_FULL and MAP_ET_MEMORY_AVAILABLE.
> It should be handled in the map_handle_notification() inside map.c.
Please do not top post in the mailing list, use inline posting.
Regarding the parsing, yes it does have proper handling of those event
but there is no mapping to the D-Bus API therefore we ignore those
memory event. As I mentioned the they are not per message so they
cannot be set as a status of a message, anyway it would not make
sense, and having it on the MessageAccess interface has not been
considered but first I need to have a proper user case where it makes
sense to expose those events.
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [MAP] obexd/client: Handle MAP event types
2014-08-28 9:46 ` Luiz Augusto von Dentz
@ 2014-08-28 13:32 ` Gowtham Anandha Babu
2014-09-04 14:22 ` Gowtham Anandha Babu
1 sibling, 0 replies; 7+ messages in thread
From: Gowtham Anandha Babu @ 2014-08-28 13:32 UTC (permalink / raw)
To: 'Luiz Augusto von Dentz'; +Cc: linux-bluetooth
Hi Luiz,
> -----Original Message-----
> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
> Sent: Thursday, August 28, 2014 3:16 PM
> To: Gowtham Anandha Babu
> Cc: linux-bluetooth@vger.kernel.org
> Subject: Re: [MAP] obexd/client: Handle MAP event types
>
> Hi,
>
> On Thu, Aug 28, 2014 at 12:11 PM, Gowtham Anandha Babu
> <gowtham.ab@samsung.com> wrote:
> > Hi Luiz,
> > But in the obexd/client/mns.c
> > Inside parse_event_report_type() function, event types are assigned
> with the values MAP_ET_MEMORY_FULL and
> MAP_ET_MEMORY_AVAILABLE.
> > It should be handled in the map_handle_notification() inside map.c.
>
> Please do not top post in the mailing list, use inline posting.
> Regarding the parsing, yes it does have proper handling of those event but
> there is no mapping to the D-Bus API therefore we ignore those memory
> event. As I mentioned the they are not per message so they cannot be set as
> a status of a message, anyway it would not make sense, and having it on the
> MessageAccess interface has not been considered but first I need to have a
> proper user case where it makes sense to expose those events.
>
> Luiz Augusto von Dentz
The use cases are:
1) What if one tries to push a message, but the space available in the MSE device is not enough. So MCE will receive Memory Full Event.
2) Once the user cleared some memory in the MSE device, MCE should be notified with Memory Available Event.
As you mentioned earlier, these cannot be set as a status of a message. But MCE device needs to be get notified about this events.
If the MCE receives Memory Full event, it will set the status as "delivery-failure".
Once MSE device(server) deletes some messages and send Memory Available event then MCE will push the pending message.
Can it be done like this?
Regards,
Gowtham
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [MAP] obexd/client: Handle MAP event types
2014-08-28 9:46 ` Luiz Augusto von Dentz
2014-08-28 13:32 ` Gowtham Anandha Babu
@ 2014-09-04 14:22 ` Gowtham Anandha Babu
2014-09-04 14:42 ` Luiz Augusto von Dentz
1 sibling, 1 reply; 7+ messages in thread
From: Gowtham Anandha Babu @ 2014-09-04 14:22 UTC (permalink / raw)
To: 'Luiz Augusto von Dentz'
Cc: linux-bluetooth, bharat.panda, p.sinha, d.kasatkin
[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]
Hi,
> -----Original Message-----
> From: Gowtham Anandha Babu [mailto:gowtham.ab@samsung.com]
> Sent: Thursday, August 28, 2014 7:03 PM
> To: 'Luiz Augusto von Dentz'
> Cc: 'linux-bluetooth@vger.kernel.org'
> Subject: RE: [MAP] obexd/client: Handle MAP event types
>
> Hi Luiz,
>
> > -----Original Message-----
> > From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
> > Sent: Thursday, August 28, 2014 3:16 PM
> > To: Gowtham Anandha Babu
> > Cc: linux-bluetooth@vger.kernel.org
> > Subject: Re: [MAP] obexd/client: Handle MAP event types
> >
> > Hi,
> >
> > On Thu, Aug 28, 2014 at 12:11 PM, Gowtham Anandha Babu
> > <gowtham.ab@samsung.com> wrote:
> > > Hi Luiz,
> > > But in the obexd/client/mns.c
> > > Inside parse_event_report_type() function, event types are
> > > assigned
> > with the values MAP_ET_MEMORY_FULL and
> MAP_ET_MEMORY_AVAILABLE.
> > > It should be handled in the map_handle_notification() inside map.c.
> >
> > Please do not top post in the mailing list, use inline posting.
> > Regarding the parsing, yes it does have proper handling of those event
> > but there is no mapping to the D-Bus API therefore we ignore those
> > memory event. As I mentioned the they are not per message so they
> > cannot be set as a status of a message, anyway it would not make
> > sense, and having it on the MessageAccess interface has not been
> > considered but first I need to have a proper user case where it makes
> sense to expose those events.
> >
> > Luiz Augusto von Dentz
>
>
> The use cases are:
> 1) What if one tries to push a message, but the space available in the MSE
> device is not enough. So MCE will receive Memory Full Event.
> 2) Once the user cleared some memory in the MSE device, MCE should be
> notified with Memory Available Event.
> As you mentioned earlier, these cannot be set as a status of a message. But
> MCE device needs to be get notified about this events.
>
> If the MCE receives Memory Full event, it will set the status as "delivery-
> failure".
> Once MSE device(server) deletes some messages and send Memory
> Available event then MCE will push the pending message.
> Can it be done like this?
>
> Regards,
> Gowtham
Just a reminder. With little bit clarity , If MCE pushes the message, the "Memory Full" event type is given by MSE. Then I think the status of that message will be empty. Instead we can set the status as a "sending-failure".
Whatever explained I added in the attached patch for your kind perusal.
Regards,
Gowtham
[-- Attachment #2: 0001-obexd-client-Handle-MAP-event-types.patch --]
[-- Type: application/octet-stream, Size: 847 bytes --]
>From 448f7b2f3910e667e45f7e48ae01a96529be1a78 Mon Sep 17 00:00:00 2001
From: gowtham babu <gowtham.ab@samsung.com>
Date: Thu, 4 Sep 2014 19:35:49 +0530
Subject: [MAP] obexd/client: Handle MAP event types
Adds below MCE event types handling in map_handle_notification()
MAP_ET_MEMORY_FULL
---
obexd/client/map.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 520e492..d80ad98 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1927,6 +1927,9 @@ static void map_handle_notification(struct map_event *event, void *user_data)
case MAP_ET_MESSAGE_SHIFT:
map_handle_folder_changed(map, event, event->folder);
break;
+ case MAP_ET_MEMORY_FULL:
+ map_handle_status_changed(map, event, "sending-failure");
+ break;
default:
break;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [MAP] obexd/client: Handle MAP event types
2014-09-04 14:22 ` Gowtham Anandha Babu
@ 2014-09-04 14:42 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2014-09-04 14:42 UTC (permalink / raw)
To: Gowtham Anandha Babu
Cc: linux-bluetooth@vger.kernel.org, Bharat Panda, p.sinha,
Dmitry Kasatkin
Hi,
On Thu, Sep 4, 2014 at 5:22 PM, Gowtham Anandha Babu
<gowtham.ab@samsung.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: Gowtham Anandha Babu [mailto:gowtham.ab@samsung.com]
>> Sent: Thursday, August 28, 2014 7:03 PM
>> To: 'Luiz Augusto von Dentz'
>> Cc: 'linux-bluetooth@vger.kernel.org'
>> Subject: RE: [MAP] obexd/client: Handle MAP event types
>>
>> Hi Luiz,
>>
>> > -----Original Message-----
>> > From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
>> > Sent: Thursday, August 28, 2014 3:16 PM
>> > To: Gowtham Anandha Babu
>> > Cc: linux-bluetooth@vger.kernel.org
>> > Subject: Re: [MAP] obexd/client: Handle MAP event types
>> >
>> > Hi,
>> >
>> > On Thu, Aug 28, 2014 at 12:11 PM, Gowtham Anandha Babu
>> > <gowtham.ab@samsung.com> wrote:
>> > > Hi Luiz,
>> > > But in the obexd/client/mns.c
>> > > Inside parse_event_report_type() function, event types are
>> > > assigned
>> > with the values MAP_ET_MEMORY_FULL and
>> MAP_ET_MEMORY_AVAILABLE.
>> > > It should be handled in the map_handle_notification() inside map.c.
>> >
>> > Please do not top post in the mailing list, use inline posting.
>> > Regarding the parsing, yes it does have proper handling of those event
>> > but there is no mapping to the D-Bus API therefore we ignore those
>> > memory event. As I mentioned the they are not per message so they
>> > cannot be set as a status of a message, anyway it would not make
>> > sense, and having it on the MessageAccess interface has not been
>> > considered but first I need to have a proper user case where it makes
>> sense to expose those events.
>> >
>> > Luiz Augusto von Dentz
>>
>>
>> The use cases are:
>> 1) What if one tries to push a message, but the space available in the MSE
>> device is not enough. So MCE will receive Memory Full Event.
>> 2) Once the user cleared some memory in the MSE device, MCE should be
>> notified with Memory Available Event.
>> As you mentioned earlier, these cannot be set as a status of a message. But
>> MCE device needs to be get notified about this events.
>>
>> If the MCE receives Memory Full event, it will set the status as "delivery-
>> failure".
>> Once MSE device(server) deletes some messages and send Memory
>> Available event then MCE will push the pending message.
>> Can it be done like this?
>>
>> Regards,
>> Gowtham
>
> Just a reminder. With little bit clarity , If MCE pushes the message, the "Memory Full" event type is given by MSE. Then I think the status of that message will be empty. Instead we can set the status as a "sending-failure".
> Whatever explained I added in the attached patch for your kind perusal.
Im afraid this would not work because the event handle is not set it
will fail trying to find the message object, it really needs to be a
property of the session to be propagated.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-09-04 14:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 5:46 [MAP] obexd/client: Handle MAP event types gowtham babu
2014-08-28 7:57 ` Luiz Augusto von Dentz
2014-08-28 9:11 ` Gowtham Anandha Babu
2014-08-28 9:46 ` Luiz Augusto von Dentz
2014-08-28 13:32 ` Gowtham Anandha Babu
2014-09-04 14:22 ` Gowtham Anandha Babu
2014-09-04 14:42 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).