Re: [PATCH v2 1/3] obexd: Move Message.Get parameter attachment into dictionary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On Tue, Mar 5, 2013 at 6:12 PM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> Hi Christian,
>
>> This is a preparation for adding additional parameters to Message.Get.
>> The parsing of the args dictionary is done in parse_get_options.
>>
>> The Attachment parameter has been moved into the args dictionary.
>> The parameter is now optional defaulting to true.
>> ---
>> doc/obex-api.txt   | 11 ++++++--
>> obexd/client/map.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++--------
>> 2 files changed, 78 insertions(+), 14 deletions(-)
>>
>> diff --git a/doc/obex-api.txt b/doc/obex-api.txt
>> index 759c4d8..9a78284 100644
>> --- a/doc/obex-api.txt
>> +++ b/doc/obex-api.txt
>> @@ -714,10 +714,10 @@ Message hierarchy
>> =================
>>
>> Service               org.bluez.obex
>> -Interface    org.bluez.obex.Message1
>> +Interface    org.bluez.obex.Message2
>> Object path   [variable prefix]/{session0,session1,...}/{message0,...}
>>
>> -Methods              object, dict Get(string targetfile, boolean attachment)
>> +Methods              object, dict Get(string targetfile, dict args)
>
> you can not do this. We need to support both APIs in this case. Also where is the discussion on this API change and especially why do we need it.

The discussion is in another thread but let me quote the important part here:

Use case
----------

Fractioned messages are used by some email push-services. Only the
first small part of the message is available on the phone.
The rest of the message has to be downloaded from the internet /
network. Which is slow, has high latency and causes additional costs.

For most of the messages, it might be enough for the user to have only
the first part of the fraction.
For other messages, the user might want to read the complete text.


Details from the spec
---------------------

The required attribute "reception_status" in the MAP-msg-listing is
set to "fractioned" for the specific message.
For normal messages it's set to "complete".

Two possibilities to download fractioned messages:
(1) Retreive complete message at once:
    One OBEX Get request (GetMessage omitting parameter FractionRequest)
    One OBEX Get response (bMessage)
    The MSE has to download the complete message from the internet and
deliver it transparently to the client

(2) Retreive message in fractions:
    Several OBEX Get requests (GetMessage, set parameter
FractionRequest to "first" or "more")
    Several OBEX Get responses (first: bMessage, further: bBody,
parameter FractionDeliver is set to "more" or "last")
    The fractions of one message must be downloaded sequentially and
it is not supported to interrupt by calling GetMessage for
    a different message


Blackberry seems to be doing this for emails, they keep it stored in
some server and only fractions of the message are in the device, so
with the current API it will force to download the remaining content
from the server.


--
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux