mirror of
https://github.com/irmen/prog8.git
synced 2024-06-10 20:29:33 +00:00
29 lines
639 B
Kotlin
29 lines
639 B
Kotlin
package prog8.dbus
|
|
|
|
import org.freedesktop.dbus.annotations.IntrospectionDescription
|
|
import org.freedesktop.dbus.interfaces.DBusInterface
|
|
|
|
|
|
const val serviceObjectPath = "/razorvine/TestService"
|
|
|
|
|
|
interface IrmenDbusTest: DBusInterface
|
|
{
|
|
@IntrospectionDescription("return some sort of status")
|
|
fun Status(address: String): Map<Int, String>
|
|
}
|
|
|
|
|
|
internal class TestService: IrmenDbusTest {
|
|
|
|
override fun Status(address: String): Map<Int, String> {
|
|
return mapOf(
|
|
5 to "hello",
|
|
42 to address
|
|
)
|
|
}
|
|
|
|
override fun isRemote() = true
|
|
override fun getObjectPath() = serviceObjectPath
|
|
}
|