From ead6762eb1c005914b05f9d3c29f334989c67513 Mon Sep 17 00:00:00 2001 From: nea Date: Tue, 16 May 2023 01:23:43 +0200 Subject: Replace references to NEU with Firmament --- .../nea/firmament/dbus/FirmamentDbusInterface.kt | 11 +++++++++++ .../moe/nea/firmament/dbus/FirmamentDbusObject.kt | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt create mode 100644 src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt (limited to 'src/main/kotlin/moe/nea/firmament/dbus') diff --git a/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt b/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt new file mode 100644 index 0000000..24b7dc8 --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt @@ -0,0 +1,11 @@ +package moe.nea.firmament.dbus + +import org.freedesktop.dbus.annotations.DBusInterfaceName +import org.freedesktop.dbus.interfaces.DBusInterface + +@DBusInterfaceName("moe.nea.Firmament") +interface FirmamentDbusInterface : DBusInterface { + fun sayHello(): String + fun getCurrentRepoCommit(): String + fun requestRepoReDownload() +} diff --git a/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt b/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt new file mode 100644 index 0000000..48d4cf7 --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt @@ -0,0 +1,21 @@ +package moe.nea.firmament.dbus + +import moe.nea.firmament.repo.RepoManager + +object FirmamentDbusObject : FirmamentDbusInterface { + override fun sayHello(): String { + return "Hello from Firmanet" + } + + override fun getCurrentRepoCommit(): String { + return RepoManager.currentDownloadedSha ?: "none" + } + + override fun requestRepoReDownload() { + RepoManager.launchAsyncUpdate() + } + + override fun getObjectPath(): String { + return "/moe/nea/Firmament" + } +} -- cgit