aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt b/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt
new file mode 100644
index 0000000..1e7a6a8
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt
@@ -0,0 +1,18 @@
+/*
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.events.subscription
+
+import moe.nea.firmament.events.FirmamentEvent
+import moe.nea.firmament.events.FirmamentEventBus
+
+interface SubscriptionOwner
+
+data class Subscription<T : FirmamentEvent>(
+ val owner: SubscriptionOwner,
+ val invoke: (T) -> Unit,
+ val eventBus: FirmamentEventBus<T>,
+)