* [PATCH BlueZ 1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1
@ 2025-02-20 7:24 Frédéric Danis
2025-02-20 7:24 ` [PATCH BlueZ 2/2] doc: " Frédéric Danis
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Frédéric Danis @ 2025-02-20 7:24 UTC (permalink / raw)
To: linux-bluetooth
This lists the message types supported the remote MSE.
Possible values are: EMAIL, SMS_GSM, SMS_CDMA, MMS and IM.
Those values can be used as message type when sending a message
using PushMessage method.
---
obexd/client/map.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index b8820335b..7ca33cfe0 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -51,6 +51,12 @@
#define CHARSET_NATIVE 0
#define CHARSET_UTF8 1
+#define SDP_MESSAGE_TYPE_EMAIL 0x01
+#define SDP_MESSAGE_TYPE_SMS_GSM 0x02
+#define SDP_MESSAGE_TYPE_SMS_CDMA 0x04
+#define SDP_MESSAGE_TYPE_MMS 0x08
+#define SDP_MESSAGE_TYPE_IM 0x10
+
static const char * const filter_list[] = {
"subject",
"timestamp",
@@ -1992,6 +1998,45 @@ static const GDBusMethodTable map_methods[] = {
{ }
};
+static gboolean get_supported_types(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *user_data)
+{
+ struct map_data *map = user_data;
+ DBusMessageIter entry;
+ const char *str;
+
+ dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
+ DBUS_TYPE_STRING_AS_STRING, &entry);
+ if (map->supported_message_types & SDP_MESSAGE_TYPE_EMAIL) {
+ str = "EMAIL";
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &str);
+ }
+ if (map->supported_message_types & SDP_MESSAGE_TYPE_SMS_GSM) {
+ str = "SMS_GSM";
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &str);
+ }
+ if (map->supported_message_types & SDP_MESSAGE_TYPE_SMS_CDMA) {
+ str = "SMS_CDMA";
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &str);
+ }
+ if (map->supported_message_types & SDP_MESSAGE_TYPE_MMS) {
+ str = "MMS";
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &str);
+ }
+ if (map->supported_message_types & SDP_MESSAGE_TYPE_IM) {
+ str = "IM";
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &str);
+ }
+ dbus_message_iter_close_container(iter, &entry);
+
+ return TRUE;
+}
+
+static const GDBusPropertyTable map_properties[] = {
+ { "SupportedTypes", "as", get_supported_types },
+ { }
+};
+
static void map_msg_remove(void *data)
{
struct map_msg *msg = data;
@@ -2201,7 +2246,7 @@ static int map_probe(struct obc_session *session)
set_notification_registration(map, true);
if (!g_dbus_register_interface(conn, path, MAP_INTERFACE, map_methods,
- NULL, NULL, map, map_free)) {
+ NULL, map_properties, map, map_free)) {
map_free(map);
return -ENOMEM;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH BlueZ 2/2] doc: Add SupportedTypes property to MessageAccess1
2025-02-20 7:24 [PATCH BlueZ 1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1 Frédéric Danis
@ 2025-02-20 7:24 ` Frédéric Danis
2025-02-20 8:29 ` [BlueZ,1/2] obexd/client/map: " bluez.test.bot
2025-02-21 16:50 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: Frédéric Danis @ 2025-02-20 7:24 UTC (permalink / raw)
To: linux-bluetooth
---
doc/org.bluez.obex.MessageAccess.rst | 30 ++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/doc/org.bluez.obex.MessageAccess.rst b/doc/org.bluez.obex.MessageAccess.rst
index 4f7f07d1b..6962520a2 100644
--- a/doc/org.bluez.obex.MessageAccess.rst
+++ b/doc/org.bluez.obex.MessageAccess.rst
@@ -199,3 +199,33 @@ object, dict PushMessage(string sourcefile, string folder, dict args)
:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:
+
+Properties
+----------
+
+array{string} SupportedTypes [readonly]
+```````````````````````````````````````
+
+ List of supported message types.
+
+ Possible values:
+
+ :"EMAIL":
+
+ Email messages.
+
+ :"SMS_GSM":
+
+ GSM short messages.
+
+ :"SMS_CDMA":
+
+ CDMA short messages.
+
+ :"MMS":
+
+ MMS messages.
+
+ :"IM":
+
+ Instant messaging.
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [BlueZ,1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1
2025-02-20 7:24 [PATCH BlueZ 1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1 Frédéric Danis
2025-02-20 7:24 ` [PATCH BlueZ 2/2] doc: " Frédéric Danis
@ 2025-02-20 8:29 ` bluez.test.bot
2025-02-21 16:50 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-02-20 8:29 UTC (permalink / raw)
To: linux-bluetooth, frederic.danis
[-- 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=935872
---Test result---
Test Summary:
CheckPatch PENDING 0.20 seconds
GitLint PENDING 0.24 seconds
BuildEll PASS 20.18 seconds
BluezMake PASS 1469.28 seconds
MakeCheck PASS 22.35 seconds
MakeDistcheck PASS 155.80 seconds
CheckValgrind PASS 212.05 seconds
CheckSmatch PASS 281.72 seconds
bluezmakeextell PASS 97.19 seconds
IncrementalBuild PENDING 0.22 seconds
ScanBuild PASS 848.62 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 BlueZ 1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1
2025-02-20 7:24 [PATCH BlueZ 1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1 Frédéric Danis
2025-02-20 7:24 ` [PATCH BlueZ 2/2] doc: " Frédéric Danis
2025-02-20 8:29 ` [BlueZ,1/2] obexd/client/map: " bluez.test.bot
@ 2025-02-21 16:50 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2025-02-21 16:50 UTC (permalink / raw)
To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 20 Feb 2025 08:24:45 +0100 you wrote:
> This lists the message types supported the remote MSE.
> Possible values are: EMAIL, SMS_GSM, SMS_CDMA, MMS and IM.
>
> Those values can be used as message type when sending a message
> using PushMessage method.
> ---
> obexd/client/map.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 46 insertions(+), 1 deletion(-)
Here is the summary with links:
- [BlueZ,1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=1c4f52767236
- [BlueZ,2/2] doc: Add SupportedTypes property to MessageAccess1
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=41431caf8af3
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-02-21 16:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-20 7:24 [PATCH BlueZ 1/2] obexd/client/map: Add SupportedTypes property to MessageAccess1 Frédéric Danis
2025-02-20 7:24 ` [PATCH BlueZ 2/2] doc: " Frédéric Danis
2025-02-20 8:29 ` [BlueZ,1/2] obexd/client/map: " bluez.test.bot
2025-02-21 16:50 ` [PATCH BlueZ 1/2] " 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.