[RigoDaemon] move dbus configuration to separate module
This commit is contained in:
@@ -60,6 +60,7 @@ from entropy.core.settings.base import SystemSettings
|
||||
import entropy.tools
|
||||
|
||||
from RigoDaemon.enums import ActivityStates
|
||||
from RigoDaemon.config import DbusConfig
|
||||
|
||||
TEXT = TextInterface()
|
||||
DAEMON_LOGFILE = os.path.join(etpConst['syslogdir'], "rigo-daemon.log")
|
||||
@@ -202,8 +203,8 @@ class DaemonUrlFetcher(UrlFetcher):
|
||||
|
||||
class RigoDaemonService(dbus.service.Object):
|
||||
|
||||
BUS_NAME = "org.sabayon.Rigo"
|
||||
OBJECT_PATH = "/daemon"
|
||||
BUS_NAME = DbusConfig.BUS_NAME
|
||||
OBJECT_PATH = DbusConfig.OBJECT_PATH
|
||||
|
||||
"""
|
||||
RigoDaemon is the dbus service Object in charge of executing
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
|
||||
@author: Fabio Erculiani <lxnay@sabayon.org>
|
||||
@contact: lxnay@sabayon.org
|
||||
@copyright: Fabio Erculiani
|
||||
@license: GPL-3
|
||||
|
||||
B{Entropy Package Manager Rigo Daemon Config}.
|
||||
|
||||
"""
|
||||
|
||||
class DbusConfig:
|
||||
|
||||
BUS_NAME = "org.sabayon.Rigo"
|
||||
OBJECT_PATH = "/"
|
||||
|
||||
+3
-2
@@ -59,6 +59,7 @@ from rigo.utils import build_application_store_url, build_register_url, \
|
||||
escape_markup, prepare_markup
|
||||
|
||||
from RigoDaemon.enums import ActivityStates as DaemonActivityStates
|
||||
from RigoDaemon.config import DbusConfig as DaemonDbusConfig
|
||||
|
||||
from entropy.const import etpConst, etpUi, const_debug_write, \
|
||||
const_debug_enabled, const_convert_to_unicode, const_isunicode
|
||||
@@ -122,8 +123,8 @@ class RigoServiceController(GObject.Object):
|
||||
),
|
||||
}
|
||||
|
||||
DBUS_INTERFACE = "org.sabayon.Rigo"
|
||||
DBUS_PATH = "/daemon"
|
||||
DBUS_INTERFACE = DaemonDbusConfig.BUS_NAME
|
||||
DBUS_PATH = DaemonDbusConfig.OBJECT_PATH
|
||||
_OUTPUT_SIGNAL = "output"
|
||||
_REPOSITORIES_UPDATED_SIGNAL = "repositories_updated"
|
||||
_TRANSFER_OUTPUT_SIGNAL = "transfer_output"
|
||||
|
||||
Reference in New Issue
Block a user