1 package org
.asamk
.signal
;
3 import org
.asamk
.signal
.dbus
.DbusUtils
;
7 public class DbusConfig
{
9 private static final String SIGNAL_BUSNAME
= "org.asamk.Signal";
10 private static final String SIGNAL_BUSNAME_FLATPAK
= "org.asamk.SignalCli";
11 private static final String SIGNAL_OBJECT_BASE_PATH
= "/org/asamk/Signal";
13 public static String
getBusname() {
14 if (new File("/.flatpak-info").exists()) {
15 return SIGNAL_BUSNAME_FLATPAK
;
17 return SIGNAL_BUSNAME
;
21 public static String
getObjectPath() {
22 return getObjectPath(null);
25 public static String
getObjectPath(String account
) {
26 if (account
== null) {
27 return SIGNAL_OBJECT_BASE_PATH
;
30 return SIGNAL_OBJECT_BASE_PATH
+ "/" + DbusUtils
.makeValidObjectPathElement(account
);