All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request
@ 2025-03-20 12:31 Amisha Jain
  2025-03-20 14:18 ` [v1] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amisha Jain @ 2025-03-20 12:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: quic_mohamull, quic_hbandi, quic_anubhavg

This change is required for below PTS testcase -

1. MAP/MCE/MFB/BV-06-C
Verify that the MCE sends its MapSupportedFeatures in the OBEX Connect
request if the MSE declares support for the feature MapSupportedFeatures
in Connect Request in its SDP record.

If Server's SDP record contains the field 'MapSupportedFeatures in Connect
Request' as supported then include the supported features
apparam in obex connect request.

---
 obexd/client/map.c | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 7ca33cfe0..ef0bff3ee 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -39,6 +39,17 @@
 #define OBEX_MAS_UUID \
 	"\xBB\x58\x2B\x40\x42\x0C\x11\xDB\xB0\xDE\x08\x00\x20\x0C\x9A\x66"
 #define OBEX_MAS_UUID_LEN 16
+#define SUPPORTED_FEATURES_TAG  0x29
+
+#define NOTIFICATION_REGISTRATION_FEATURE 0x00000001
+#define NOTIFICATION_FEATURE 0x00000002
+#define BROWSING_FEATURE 0x00000004
+#define UPLOADING_FEATURE 0x00000008
+#define DELETE_FEATURE 0x00000010
+#define INSTANCE_INFORMATION_FEATURE 0x00000020
+#define EXTENDED_EVENT_REPORT_1_1 0x00000040
+#define MESSAGES_LISTING_FORMAT_VERSION_1_1 0x00000200
+#define MAPSUPPORTEDFEATURES_IN_CONNECT_REQUEST 0x00080000
 
 #define MAP_INTERFACE "org.bluez.obex.MessageAccess1"
 #define MAP_MSG_INTERFACE "org.bluez.obex.Message1"
@@ -2224,6 +2235,35 @@ static void parse_service_record(struct map_data *map)
 		map->supported_features = 0x0000001f;
 }
 
+static void *map_supported_features(struct obc_session *session)
+{
+	const void *data;
+	uint32_t supported_features;
+
+	/* Supported Feature Bits */
+	data = obc_session_get_attribute(session,
+					SDP_ATTR_MAP_SUPPORTED_FEATURES);
+	if (!data)
+		return NULL;
+
+	supported_features = *(uint32_t *) data;
+	if (!supported_features)
+		return NULL;
+
+	if (supported_features & MAPSUPPORTEDFEATURES_IN_CONNECT_REQUEST)
+		return g_obex_apparam_set_uint32(NULL, SUPPORTED_FEATURES_TAG,
+				NOTIFICATION_REGISTRATION_FEATURE |
+				NOTIFICATION_FEATURE |
+				BROWSING_FEATURE |
+				UPLOADING_FEATURE |
+				DELETE_FEATURE |
+				INSTANCE_INFORMATION_FEATURE |
+				EXTENDED_EVENT_REPORT_1_1 |
+				MESSAGES_LISTING_FORMAT_VERSION_1_1);
+
+	return NULL;
+}
+
 static int map_probe(struct obc_session *session)
 {
 	struct map_data *map;
@@ -2269,6 +2309,7 @@ static struct obc_driver map = {
 	.uuid = MAS_UUID,
 	.target = OBEX_MAS_UUID,
 	.target_len = OBEX_MAS_UUID_LEN,
+	.supported_features = map_supported_features,
 	.probe = map_probe,
 	.remove = map_remove
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [v1] obex: Add supported-features tag in MAP Client Connect Request
  2025-03-20 12:31 [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request Amisha Jain
@ 2025-03-20 14:18 ` bluez.test.bot
  2025-03-26  8:36 ` [PATCH v1] " Frédéric Danis
  2025-03-26 15:10 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-03-20 14:18 UTC (permalink / raw)
  To: linux-bluetooth, quic_amisjain

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=945920

---Test result---

Test Summary:
CheckPatch                    PENDING   0.23 seconds
GitLint                       PENDING   0.23 seconds
BuildEll                      PASS      20.66 seconds
BluezMake                     PASS      1494.92 seconds
MakeCheck                     PASS      12.95 seconds
MakeDistcheck                 PASS      159.52 seconds
CheckValgrind                 PASS      214.63 seconds
CheckSmatch                   PASS      285.96 seconds
bluezmakeextell               PASS      98.58 seconds
IncrementalBuild              PENDING   0.31 seconds
ScanBuild                     PASS      874.42 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request
  2025-03-20 12:31 [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request Amisha Jain
  2025-03-20 14:18 ` [v1] " bluez.test.bot
@ 2025-03-26  8:36 ` Frédéric Danis
  2025-03-26 15:10 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: Frédéric Danis @ 2025-03-26  8:36 UTC (permalink / raw)
  To: Amisha Jain, linux-bluetooth; +Cc: quic_mohamull, quic_hbandi, quic_anubhavg

Hi,

On 20/03/2025 13:31, Amisha Jain wrote:
> This change is required for below PTS testcase -
>
> 1. MAP/MCE/MFB/BV-06-C
> Verify that the MCE sends its MapSupportedFeatures in the OBEX Connect
> request if the MSE declares support for the feature MapSupportedFeatures
> in Connect Request in its SDP record.
>
> If Server's SDP record contains the field 'MapSupportedFeatures in Connect
> Request' as supported then include the supported features
> apparam in obex connect request.
>
> ---
Tested-by: Frédéric Danis <frederic.danis@collabora.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request
  2025-03-20 12:31 [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request Amisha Jain
  2025-03-20 14:18 ` [v1] " bluez.test.bot
  2025-03-26  8:36 ` [PATCH v1] " Frédéric Danis
@ 2025-03-26 15:10 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2025-03-26 15:10 UTC (permalink / raw)
  To: Amisha Jain; +Cc: linux-bluetooth, quic_mohamull, quic_hbandi, quic_anubhavg

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 20 Mar 2025 18:01:26 +0530 you wrote:
> This change is required for below PTS testcase -
> 
> 1. MAP/MCE/MFB/BV-06-C
> Verify that the MCE sends its MapSupportedFeatures in the OBEX Connect
> request if the MSE declares support for the feature MapSupportedFeatures
> in Connect Request in its SDP record.
> 
> [...]

Here is the summary with links:
  - [v1] obex: Add supported-features tag in MAP Client Connect Request
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f8219bccb485

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-26 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20 12:31 [PATCH v1] obex: Add supported-features tag in MAP Client Connect Request Amisha Jain
2025-03-20 14:18 ` [v1] " bluez.test.bot
2025-03-26  8:36 ` [PATCH v1] " Frédéric Danis
2025-03-26 15:10 ` patchwork-bot+bluetooth

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.