Oops, checkin java code too

This commit is contained in:
niten 2023-04-15 03:43:42 -07:00
parent f10de92455
commit cc93882d8f
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,47 @@
package org.freedesktop;
import java.util.List;
import java.util.Map;
import org.freedesktop.dbus.DBusInterface;
import org.freedesktop.dbus.DBusSignal;
import org.freedesktop.dbus.UInt32;
import org.freedesktop.dbus.Variant;
import org.freedesktop.dbus.exceptions.DBusException;
public interface Notifications extends DBusInterface {
public static class ActionInvoked extends DBusSignal {
public final UInt32 id;
public final String action_key;
public ActionInvoked(String path, UInt32 id, String action_key) throws DBusException {
super(path, id, action_key);
this.id = id;
this.action_key = action_key;
}
}
public static class NotificationClosed extends DBusSignal {
public final UInt32 id;
public final UInt32 reason;
public NotificationClosed(String path, UInt32 id, UInt32 reason) throws DBusException {
super(path, id, reason);
this.id = id;
this.reason = reason;
}
}
public void CloseNotification(UInt32 id);
public List<String> GetCapabilities();
public Quad<String, String, String, String> GetServerInformation();
public UInt32 Notify(
String app_name,
UInt32 replaces_id,
String app_icon,
String summary,
String body,
List<String> actions,
Map<String, Variant<?>> hints,
int expire_timeout);
}

View File

@ -0,0 +1,22 @@
package org.freedesktop;
import org.freedesktop.dbus.Position;
import org.freedesktop.dbus.Tuple;
public final class Quad<A, B, C, D> extends Tuple {
@Position(0)
public final A a;
@Position(1)
public final B b;
@Position(3)
public final C c;
@Position(4)
public final D d;
public Quad(A a, B b, C c, D d) {
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
}