2014-10-20 15:04:27

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 1/3] obexd/map: Add support for MAP feature bits

Handles MAP supported feature bits as per the
MAP 1.2 specs section 7.1.1.
---
obexd/client/map.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 44db96c..43b0471 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -100,6 +100,7 @@ struct map_data {
GHashTable *messages;
int16_t mas_instance_id;
uint8_t supported_message_types;
+ uint32_t supported_features;
};

struct pending_request {
@@ -2003,6 +2004,14 @@ static void parse_service_record(struct map_data *map)
map->supported_message_types = *(uint8_t *)data;
else
DBG("Failed to read supported message types");
+
+ /* Supported Feature Bits */
+ data = obc_session_get_attribute(map->session,
+ SDP_ATTR_MAP_SUPPORTED_FEATURES);
+ if(data != NULL)
+ map->supported_features = *(uint32_t *)data;
+ else
+ map->supported_features = 0x0000001f;
}

static int map_probe(struct obc_session *session)
--
1.9.1



2014-10-22 10:44:14

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH 1/3] obexd/map: Add support for MAP feature bits

Hi,

On Mon, Oct 20, 2014 at 6:04 PM, Gowtham Anandha Babu
<[email protected]> wrote:
> Handles MAP supported feature bits as per the
> MAP 1.2 specs section 7.1.1.
> ---
> obexd/client/map.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/obexd/client/map.c b/obexd/client/map.c
> index 44db96c..43b0471 100644
> --- a/obexd/client/map.c
> +++ b/obexd/client/map.c
> @@ -100,6 +100,7 @@ struct map_data {
> GHashTable *messages;
> int16_t mas_instance_id;
> uint8_t supported_message_types;
> + uint32_t supported_features;
> };
>
> struct pending_request {
> @@ -2003,6 +2004,14 @@ static void parse_service_record(struct map_data *map)
> map->supported_message_types = *(uint8_t *)data;
> else
> DBG("Failed to read supported message types");
> +
> + /* Supported Feature Bits */
> + data = obc_session_get_attribute(map->session,
> + SDP_ATTR_MAP_SUPPORTED_FEATURES);
> + if(data != NULL)
> + map->supported_features = *(uint32_t *)data;
> + else
> + map->supported_features = 0x0000001f;
> }
>
> static int map_probe(struct obc_session *session)
> --
> 1.9.1

Applied, thanks.


--
Luiz Augusto von Dentz

2014-10-20 15:04:29

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 3/3] tools/sdptool: Add MAP supported features

Add MapSupportedFeatures into MAS
attribute names.
---
tools/sdptool.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/sdptool.c b/tools/sdptool.c
index 1600c3e..f2d3068 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -236,6 +236,7 @@ static struct attrib_def goep_attrib_names[] = {
static struct attrib_def mas_attrib_names[] = {
{ 0x0315, "MASInstanceID", NULL, 0 },
{ 0x0316, "SupportedMessageTypes", NULL, 0 },
+ { 0x0317, "MapSupportedFeatures", NULL, 0 },
};

/* Same for the UUIDs. See BT assigned numbers */
--
1.9.1


2014-10-20 15:04:28

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 2/3] src/profile: Add feature bits to MAS SDP record

Add MAP supported features bits to MAS SDP record
as per the MAP 1.2 specs section 7.1.1.

Fix the PTS 5.3 test-cases:
TC_MSE_MFB_BV_02_I
TC_MSE_MFB_BV_05_I
---
src/profile.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/profile.c b/src/profile.c
index 7aca3be..bccb145 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -439,6 +439,9 @@
<attribute id=\"0x0316\"> \
<uint8 value=\"0x0F\"/> \
</attribute> \
+ <attribute id=\"0x0317\"> \
+ <uint32 value=\"0x0000007f\"/> \
+ </attribute> \
</record>"

#define MNS_RECORD \
--
1.9.1