From 180fe09b94ea219017c785d66d6eabe379625c03 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 4 Oct 2020 19:09:28 +0200 Subject: org.ArcticaProject.RWASupportSessionService: Adapt DBus service path to new project namespace. --- org.ArcticaProject.RWA.service | 28 ---------------------- ...ArcticaProject.RWASupportSessionService.service | 28 ++++++++++++++++++++++ service.py | 18 +++++++------- test_client.py | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 org.ArcticaProject.RWA.service create mode 100644 org.ArcticaProject.RWASupportSessionService.service diff --git a/org.ArcticaProject.RWA.service b/org.ArcticaProject.RWA.service deleted file mode 100644 index cca1829..0000000 --- a/org.ArcticaProject.RWA.service +++ /dev/null @@ -1,28 +0,0 @@ -# This file is part of Remote Support Desktop -# https://gitlab.das-netzwerkteam.de/RemoteWebApp/rwa.support.sessionservice -# Copyright 2020 Jonathan Weth -# Copyright 2020 Daniel Teichmann -# Copyright 2020 Mike Gabriel -# SPDX-License-Identifier: GPL-2.0-or-later -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -[D-BUS Service] -Name=org.ArcticaProject.RWA -Exec=/opt/rwa.support.sessionservice/service.py -o diff --git a/org.ArcticaProject.RWASupportSessionService.service b/org.ArcticaProject.RWASupportSessionService.service new file mode 100644 index 0000000..ca17519 --- /dev/null +++ b/org.ArcticaProject.RWASupportSessionService.service @@ -0,0 +1,28 @@ +# This file is part of Remote Support Desktop +# https://gitlab.das-netzwerkteam.de/RemoteWebApp/rwa.support.sessionservice +# Copyright 2020 Jonathan Weth +# Copyright 2020 Daniel Teichmann +# Copyright 2020 Mike Gabriel +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +[D-BUS Service] +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) -- cgit v1.2.3