Last change
on this file since 25884 was
25884,
checked in by ecloud, 9 years ago
|
Removed dbus: prefix; you can add it back like this: (use (prefix dbus dbus:))
|
File size:
570 bytes
|
Line | |
---|
1 | (use (prefix dbus dbus:)) |
---|
2 | |
---|
3 | (define ctxt (dbus:make-context |
---|
4 | service: 'test.method.server |
---|
5 | interface: 'test.method.Type |
---|
6 | path: '/test/method/Object)) |
---|
7 | |
---|
8 | (define remote-method (dbus:make-method-proxy ctxt "Method")) |
---|
9 | |
---|
10 | (let ([response (remote-method "query" |
---|
11 | "What is the meaning of life, the universe and everything?") ]) |
---|
12 | |
---|
13 | (printf "sent a very important query with a known answer; got flippant response ~s~%" response) |
---|
14 | (if (and (list? response) (eq? 42 (cadr response))) |
---|
15 | (printf "bingo!~%") |
---|
16 | (printf "and the answer is wrong too! Bad supercomputer, bad!~%"))) |
---|
17 | |
---|
18 | (exit) |
---|
Note: See
TracBrowser
for help on using the repository browser.