bridge (dbus): new bridge_dbus_int_prefix option (in [DEFAULT] settings) to change interface prefix

This commit is contained in:
Goffi 2020-01-29 18:54:40 +01:00
commit 4cb56362ec

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python3
# SAT: a jabber client
# SàT communication bridge
# Copyright (C) 2009-2020 Jérôme Poisson (goffi@goffi.org)
# This program is free software: you can redistribute it and/or modify
@ -23,12 +22,19 @@ import dbus.service
import dbus.mainloop.glib
import inspect
from sat.core.log import getLogger
log = getLogger(__name__)
from sat.tools import config
from twisted.internet.defer import Deferred
from sat.core.exceptions import BridgeInitError
const_INT_PREFIX = "org.salutatoi.SAT" # Interface prefix
log = getLogger(__name__)
# Interface prefix
const_INT_PREFIX = config.getConfig(
config.parseMainConf(),
"",
"bridge_dbus_int_prefix",
"org.salutatoi.SAT")
const_ERROR_PREFIX = const_INT_PREFIX + ".error"
const_OBJ_PATH = "/org/salutatoi/SAT/bridge"
const_CORE_SUFFIX = ".core"