Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ The library will remain open source and MIT licensed and can still be used, fork
- Virtual-Threads can be enabled/disabled for each of the different executor services used in `ReceivingService`: `SIGNAL`, `ERROR`, `METHODCALL`, `METHODRETURN`
- default remains native threads on all executors
- Fixed possible NullPointerException in SASL auth ([#294](https://github.com/hypfvieh/dbus-java/issues/294))
- Fixed SASL authentication issue when running in server mode in combination with unix sockets ([#298](https://github.com/hypfvieh/dbus-java/issues/298))
- Fixed SASL authentication issue when running in server mode in combination with unix sockets ([#298](https://github.com/hypfvieh/dbus-java/issues/298))
- Fixed various issues with `InterfaceCodeGenerator` ([#302](https://github.com/hypfvieh/dbus-java/issues/302), [#303](https://github.com/hypfvieh/dbus-java/issues/303), [#304], (https://github.com/hypfvieh/dbus-java/issues/304), [#306](https://github.com/hypfvieh/dbus-java/issues/306)

##### Changes in 5.2.0 (2025-12-21):
- removed properties from dbus-java.version which causes issues with reproducable builds ([PR#279](https://github.com/hypfvieh/dbus-java/issues/279))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public String toString() {
}

private String handleArg(Object _value) {
if (_value instanceof String s) {
if (_value instanceof String s && !s.endsWith(".class")) {
return "\"" + s + "\"";
} else {
return String.valueOf(_value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ void testHandleStructSignals() throws Exception {

}

@Test
void testIssue306() throws Exception {
InterfaceCodeGenerator ci2 = loadDBusXmlFile(true,
new File("src/test/resources/CreateInterface/xdg-desktop/org.freedesktop.impl.portal.Notification.xml"),
"/", "org.freedesktop.impl.portal.Notification");
Map<File, String> analyze = ci2.analyze(true);

assertEquals(1, analyze.size());

String clzContent = analyze.get(analyze.keySet().iterator().next());

assertTrue(clzContent.contains("@DBusBoundProperty(type = PropertySupportedOptionsType.class)"));
}

@Test
void testCreateSampleStructArgs() throws Exception {
InterfaceCodeGenerator ci2 = loadDBusXmlFile(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.

SPDX-License-Identifier: LGPL-2.1-or-later

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.

Author: Matthias Clasen <mclasen@redhat.com>
-->

<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Notification:
@short_description: Notification portal backend interface

This notification interface lets sandboxed applications
send and withdraw notifications.

This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.impl.portal.Notification">
<!--
AddNotification:
@app_id: App id of the application
@id: Application-provided ID for this notification
@notification: Vardict with the serialized notification

Sends a notification.

The ID can be used to later withdraw the notification.
If the application reuses the same ID without withdrawing,
the notification is updated with the new one. It's possible
to set ``show-as-new`` hint in the ``display-hint`` property
to animate replacing the notification instead of updating it.

The format of the @notification is the same as for
:ref:`org.freedesktop.portal.Notification.AddNotification`.

Since version 2, the icon property never uses the ``bytes`` option.
-->
<method name="AddNotification">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="notification" direction="in"/>
</method>
<!--
RemoveNotification:
@app_id: App id of the application
@id: Application-provided ID for this notification

Withdraws a notification.
-->
<method name="RemoveNotification">
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="id" direction="in"/>
</method>

<!--
SupportedOptions:

Some properties in :ref:`org.freedesktop.impl.portal.Notification.AddNotification`
may have options advertised by the notification server.

The format is the same as for ``SupportedOptions`` property of
:ref:`org.freedesktop.portal.Notification`.
-->
<property name="SupportedOptions" type="a{sv}" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
</property>

<!--
ActionInvoked:
@app_id: App id of the application
@id: the application-provided ID for the notification
@action: the name of the action
@parameter: an array containing additional information

Send to the application when a non-exported action is
activated.

The @parameter contains the following values in order:

#. The `target` for the action, if one was specified.

#. The `platform-data` as vardict containing an ``activation-token`` (``s``) for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
-->
<signal name="ActionInvoked">
<arg type="s" name="app_id"/>
<arg type="s" name="id"/>
<arg type="s" name="action"/>
<arg type="av" name="parameter"/>
</signal>

<property name="version" type="u" access="read"/>
</interface>
</node>
Loading