blob: bf29543ad35a42ff5c1392ce65b52927641d240d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/*
* 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
import moe.nea.firmament.features.FirmamentFeature
interface SubscriptionOwner {
val delegateFeature: FirmamentFeature
}
data class Subscription<T : FirmamentEvent>(
val owner: Any,
val invoke: (T) -> Unit,
val eventBus: FirmamentEventBus<T>,
)
|