aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-10-04 19:09:28 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-10-04 19:09:28 +0200
commit180fe09b94ea219017c785d66d6eabe379625c03 (patch)
tree802ce50b6adcbfe18ffb4158d5a2f41103627b12
parentc6c8f19f1af06678f66f37e3002990a9660e2950 (diff)
downloadRWA.Support.SessionService-180fe09b94ea219017c785d66d6eabe379625c03.tar.gz
RWA.Support.SessionService-180fe09b94ea219017c785d66d6eabe379625c03.tar.bz2
RWA.Support.SessionService-180fe09b94ea219017c785d66d6eabe379625c03.zip
org.ArcticaProject.RWASupportSessionService: Adapt DBus service path to new project namespace.
-rw-r--r--org.ArcticaProject.RWASupportSessionService.service (renamed from org.ArcticaProject.RWA.service)2
-rwxr-xr-xservice.py18
-rwxr-xr-xtest_client.py2
3 files changed, 11 insertions, 11 deletions
diff --git a/org.ArcticaProject.RWA.service b/org.ArcticaProject.RWASupportSessionService.service
index cca1829..ca17519 100644
--- a/org.ArcticaProject.RWA.service
+++ b/org.ArcticaProject.RWASupportSessionService.service
@@ -24,5 +24,5 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[D-BUS Service]
-Name=org.ArcticaProject.RWA
+Name=org.ArcticaProject.RWASupportSessionService
Exec=/opt/rwa.support.sessionservice/service.py -o
diff --git a/service.py b/service.py
index d86b91a..068f85b 100755
--- a/service.py
+++ b/service.py
@@ -50,9 +50,9 @@ ALLOW_ONLY_ONE_SESSION = True
class RWAService(dbus.service.Object):
"""D-Bus Session Service for RWA.
- D-Bus namespace: ``org.ArcticaProject.RWA``
+ D-Bus namespace: ``org.ArcticaProject.RWASupportSessionService``
- D-Bus object name: ``/RWA``
+ D-Bus object name: ``/RWASupportSessionService``
:param loop: GLib main loop running the service
:param mockup_mode: Starts the service in mock up mode
@@ -66,7 +66,7 @@ class RWAService(dbus.service.Object):
self.one_time = one_time
self.bus = dbus.SessionBus()
- name = dbus.service.BusName("org.ArcticaProject.RWA", bus=self.bus)
+ name = dbus.service.BusName("org.ArcticaProject.RWASupportSessionService", bus=self.bus)
self.check_lock_thread = Thread(target=self._check_lock)
self.check_lock_thread.start()
@@ -76,11 +76,11 @@ class RWAService(dbus.service.Object):
self.update_service_running = False
self.sessions = {}
- super().__init__(name, "/RWA")
+ super().__init__(name, "/RWASupportSessionService")
logging.info("D-Bus service has been started.")
- @dbus.service.method("org.ArcticaProject.RWA", out_signature="s")
+ @dbus.service.method("org.ArcticaProject.RWASupportSessionService", out_signature="s")
def start(self) -> str:
"""Start a new remote session and register it in RWA.
@@ -130,7 +130,7 @@ class RWAService(dbus.service.Object):
return json.dumps({"status": "error", "type": "connection"})
- @dbus.service.method("org.ArcticaProject.RWA", in_signature="i", out_signature="s")
+ @dbus.service.method("org.ArcticaProject.RWASupportSessionService", in_signature="i", out_signature="s")
def status(self, pid: int) -> str:
"""Return the status of a session.
@@ -158,14 +158,14 @@ class RWAService(dbus.service.Object):
"""
return self._get_status(pid)
- @dbus.service.method("org.ArcticaProject.RWA", in_signature="i", out_signature="s")
+ @dbus.service.method("org.ArcticaProject.RWASupportSessionService", in_signature="i", out_signature="s")
def refresh_status(self, pid: int) -> str:
- """Same as :meth:`status`, but updates status from RWA before returning it here.
+ """Same as :meth:`status`, but updates status from RWA.WebApp before returning it here.
"""
self._update_session(pid)
return self._get_status(pid)
- @dbus.service.method("org.ArcticaProject.RWA", in_signature="i", out_signature="s")
+ @dbus.service.method("org.ArcticaProject.RWASupportSessionService", in_signature="i", out_signature="s")
def stop(self, pid: int) -> str:
"""Stop a remote session.
diff --git a/test_client.py b/test_client.py
index 1a5f427..c847ccf 100755
--- a/test_client.py
+++ b/test_client.py
@@ -29,7 +29,7 @@ import dbus
bus = dbus.SessionBus()
-time = bus.get_object("org.ArcticaProject.RWA", "/RWA")
+time = bus.get_object("org.ArcticaProject.RWASupportSessionService", "/RWASupportSessionService")
curr = time.start()
print("Your VNC session is", curr)