aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates/dbus/NEUDbusObject.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/dbus/NEUDbusObject.kt')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/dbus/NEUDbusObject.kt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/dbus/NEUDbusObject.kt b/src/main/kotlin/moe/nea/notenoughupdates/dbus/NEUDbusObject.kt
new file mode 100644
index 0000000..4e3d362
--- /dev/null
+++ b/src/main/kotlin/moe/nea/notenoughupdates/dbus/NEUDbusObject.kt
@@ -0,0 +1,21 @@
+package moe.nea.notenoughupdates.dbus
+
+import moe.nea.notenoughupdates.repo.RepoManager
+
+object NEUDbusObject : NEUDbusInterface {
+ override fun sayHello(): String {
+ return "Hello from NEU"
+ }
+
+ override fun getCurrentRepoCommit(): String {
+ return RepoManager.currentDownloadedSha ?: "none"
+ }
+
+ override fun requestRepoReDownload() {
+ RepoManager.launchAsyncUpdate()
+ }
+
+ override fun getObjectPath(): String {
+ return "/moe/nea/NotEnoughUpdates"
+ }
+}