avoid pulling in the dbus libraries for now

This commit is contained in:
Irmen de Jong 2020-03-14 14:40:39 +01:00
parent 3245a9b157
commit 91d9559f79
11 changed files with 74 additions and 78 deletions

View File

@ -34,7 +34,7 @@ dependencies {
implementation 'org.antlr:antlr4-runtime:4.8'
implementation 'org.jetbrains.kotlinx:kotlinx-cli-jvm:0.1.0-dev-5'
// implementation 'net.razorvine:ksim65:1.6'
implementation("com.github.hypfvieh:dbus-java:3.2.0")
// implementation "com.github.hypfvieh:dbus-java:3.2.0"
implementation project(':parser')
testImplementation "org.jetbrains.kotlin:kotlin-test-junit5"
@ -101,7 +101,7 @@ test {
// Show test results.
testLogging {
events "passed", "skipped", "failed"
events "skipped", "failed"
}
}

View File

@ -1,22 +1,22 @@
package prog8.server.dbus
import org.freedesktop.dbus.interfaces.DBusInterface
interface IrmenDbusTest: DBusInterface
{
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() = "/razorvine/TestService"
}
//import org.freedesktop.dbus.interfaces.DBusInterface
//
//
//interface IrmenDbusTest: DBusInterface
//{
// 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() = "/razorvine/TestService"
//}

View File

@ -1,16 +1,17 @@
package prog8.server.dbus
import org.freedesktop.dbus.connections.impl.DBusConnection
fun main() {
DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION).use {
println(it.names.toList())
println(it.uniqueName)
println(it.address)
println(it.machineId)
val obj = it.getRemoteObject("local.net.razorvine.dbus.test", "/razorvine/TestService", IrmenDbusTest::class.java)
println(obj.Status("irmen"))
}
}
//import org.freedesktop.dbus.connections.impl.DBusConnection
//
//
//fun main() {
// DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION).use {
// println(it.names.toList())
// println(it.uniqueName)
// println(it.address)
// println(it.machineId)
// val obj = it.getRemoteObject("local.net.razorvine.dbus.test", "/razorvine/TestService", IrmenDbusTest::class.java)
// println(obj.Status("irmen"))
// }
//}
//

View File

@ -1,18 +1,18 @@
package prog8.server.dbus
import org.freedesktop.dbus.connections.impl.DBusConnection
fun main() {
DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION).use {
it.requestBusName("local.net.razorvine.dbus.test")
println(it.names.toList())
println(it.uniqueName)
println(it.address)
println(it.machineId)
val service = TestService()
it.exportObject(service.objectPath, service)
Thread.sleep(100000)
}
}
//import org.freedesktop.dbus.connections.impl.DBusConnection
//
//
//fun main() {
// DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION).use {
// it.requestBusName("local.net.razorvine.dbus.test")
// println(it.names.toList())
// println(it.uniqueName)
// println(it.address)
// println(it.machineId)
// val service = TestService()
// it.exportObject(service.objectPath, service)
//
// Thread.sleep(100000)
// }
//}

View File

@ -34,27 +34,28 @@ sub start() {
delay()
}
}
}
sub delay() {
ubyte d
for d in 0 to 12 {
while(c64.RASTER!=0) {
; tempo delay synced to screen refresh
}
sub delay() {
ubyte d
for d in 0 to 12 {
while(c64.RASTER!=0) {
; tempo delay synced to screen refresh
}
}
sub print_notes(ubyte n1, ubyte n2) {
c64.CHROUT('\n')
c64scr.plot(n1/2, 24)
c64.COLOR=7
c64.CHROUT('Q')
c64scr.plot(n2/2, 24)
c64.COLOR=4
c64.CHROUT('Q')
}
}
sub print_notes(ubyte n1, ubyte n2) {
c64.CHROUT('\n')
c64scr.plot(n1/2, 24)
c64.COLOR=7
c64.CHROUT('Q')
c64scr.plot(n2/2, 24)
c64.COLOR=4
c64.CHROUT('Q')
}
; details about the boulderdash music can be found here:
; https://www.elmerproductions.com/sp/peterb/sounds.html#Theme%20tune

View File

@ -55,8 +55,7 @@ main {
check_eval_stack()
return
sub compare() {
sub compare() {
c64scr.print(" == != < > <= >=\n")
if v1==v2

View File

@ -71,7 +71,7 @@ main {
check_eval_stack()
return
sub compare() {
sub compare() {
c64scr.print(" == != < > <= >=\n")
if v1==v2
@ -106,7 +106,6 @@ main {
}
}
sub check_eval_stack() {

View File

@ -55,7 +55,7 @@ main {
check_eval_stack()
return
sub compare() {
sub compare() {
c64scr.print(" == != < > <= >=\n")
if v1==v2

View File

@ -85,7 +85,7 @@ main {
check_eval_stack()
return
sub compare() {
sub compare() {
c64scr.print(" == != < > <= >=\n")
if v1==v2

View File

@ -121,7 +121,7 @@ main {
check_eval_stack()
return
sub compare() {
sub compare() {
c64scr.print(" == != < > <= >=\n")
if v1==v2

View File

@ -27,10 +27,6 @@ main {
c64scr.print("sp2:")
sub3()
sub blerp() {
;-- keep this!
}
sub3()
sub3()
sub3()