diff mbox series

[BlueZ] Fix missing required properties in MPRIS

Message ID 20230305170551.2572-1-qydwhotmail@gmail.com (mailing list archive)
State New, archived
Headers show
Series [BlueZ] Fix missing required properties in MPRIS | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch warning WARNING:TYPO_SPELLING: 'requried' may be misspelled - perhaps 'required'? #79: "SupportedUriSchemes" and "SupportedMimeTypes" are requried properties ^^^^^^^^ /github/workspace/src/src/13160178.patch total: 0 errors, 1 warnings, 26 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13160178.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Fushan Wen March 5, 2023, 5:05 p.m. UTC
"SupportedUriSchemes" and "SupportedMimeTypes" are requried properties
in org.mpris.MediaPlayer2. Some MPRIS clients will ignore an MPRIS
interface if the two properties do not exist.

This helps fix https://bugs.kde.org/show_bug.cgi?id=466288
---
 tools/mpris-proxy.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

bluez.test.bot@gmail.com March 5, 2023, 6:07 p.m. UTC | #1
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=726694

---Test result---

Test Summary:
CheckPatch                    FAIL      0.66 seconds
GitLint                       PASS      0.28 seconds
BuildEll                      PASS      26.58 seconds
BluezMake                     PASS      774.54 seconds
MakeCheck                     PASS      10.78 seconds
MakeDistcheck                 PASS      150.29 seconds
CheckValgrind                 PASS      241.45 seconds
CheckSmatch                   PASS      322.65 seconds
bluezmakeextell               PASS      97.04 seconds
IncrementalBuild              PASS      620.01 seconds
ScanBuild                     PASS      981.51 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ] Fix missing required properties in MPRIS
WARNING:TYPO_SPELLING: 'requried' may be misspelled - perhaps 'required'?
#79: 
"SupportedUriSchemes" and "SupportedMimeTypes" are requried properties
                                                   ^^^^^^^^

/github/workspace/src/src/13160178.patch total: 0 errors, 1 warnings, 26 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13160178.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/tools/mpris-proxy.c b/tools/mpris-proxy.c
index e5fc91f..a69b872 100644
--- a/tools/mpris-proxy.c
+++ b/tools/mpris-proxy.c
@@ -1401,6 +1401,18 @@  static gboolean get_tracklist(const GDBusPropertyTable *property,
 	return TRUE;
 }
 
+static gboolean get_emptylist(const GDBusPropertyTable *property,
+					DBusMessageIter *iter, void *data)
+{
+	DBusMessageIter array_iter;
+
+	dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
+			DBUS_TYPE_STRING_AS_STRING, &array_iter);
+	dbus_message_iter_close_container(iter, &array_iter);
+
+	return TRUE;
+}
+
 static const GDBusPropertyTable mpris_properties[] = {
 	{ "CanQuit", "b", get_disable, NULL, NULL },
 	{ "Fullscreen", "b", get_disable, NULL, NULL },
@@ -1408,6 +1420,8 @@  static const GDBusPropertyTable mpris_properties[] = {
 	{ "CanRaise", "b", get_disable, NULL, NULL },
 	{ "HasTrackList", "b", get_tracklist, NULL, NULL },
 	{ "Identity", "s", get_name, NULL, NULL },
+	{ "SupportedUriSchemes", "as", get_emptylist, NULL, NULL },
+	{ "SupportedMimeTypes", "as", get_emptylist, NULL, NULL },
 	{ }
 };