mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-03 20:50:38 +00:00
Merge remote-tracking branch 'AsamK/master' into master
This commit is contained in:
commit
7aa31842dd
91 changed files with 3917 additions and 1594 deletions
|
@ -6,8 +6,9 @@ import net.sourceforge.argparse4j.inf.Subparser;
|
|||
|
||||
import org.asamk.signal.DbusReceiveMessageHandler;
|
||||
import org.asamk.signal.JsonDbusReceiveMessageHandler;
|
||||
import org.asamk.signal.dbus.DbusSignalImpl;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.freedesktop.dbus.DBusConnection;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnection;
|
||||
import org.freedesktop.dbus.exceptions.DBusException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -41,15 +42,15 @@ public class DaemonCommand implements LocalCommand {
|
|||
DBusConnection conn = null;
|
||||
try {
|
||||
try {
|
||||
int busType;
|
||||
DBusConnection.DBusBusType busType;
|
||||
String busName;
|
||||
if (ns.getBoolean("system")) {
|
||||
busType = DBusConnection.SYSTEM;
|
||||
busType = DBusConnection.DBusBusType.SYSTEM;
|
||||
} else {
|
||||
busType = DBusConnection.SESSION;
|
||||
busType = DBusConnection.DBusBusType.SESSION;
|
||||
}
|
||||
conn = DBusConnection.getConnection(busType);
|
||||
conn.exportObject(SIGNAL_OBJECTPATH, m);
|
||||
conn.exportObject(SIGNAL_OBJECTPATH, new DbusSignalImpl(m));
|
||||
busName = ns.getString("busname");
|
||||
if (busName == null) {
|
||||
conn.requestBusName(SIGNAL_BUSNAME);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue