1
0
mirror of https://github.com/ubf/ubf.git synced 2026-04-18 10:46:04 +00:00
Files
ubf/test_plugin.con
Joseph Wayne Norton 3d1086071e import ubf-1.11.tgz
2009-04-11 23:55:00 +09:00

65 lines
1.4 KiB
Plaintext

+NAME("test").
+VSN("ubf1.0").
+TYPES
info() = info;
description() = description;
services() = services;
contract() = contract;
serviceList() = [string()];
password() = string();
file() = string();
noSuchFile() = {error, noSuchFile};
doubleInt() = [int()];
upCase() = string();
logon() = {logon, password()};
ls() = ls;
files() = {files, [string()]} "request a list of file";
callback() = {callback, void()};
getFile() = {get, file()};
okFile() = {ok, binary()};
stop() = stop;
yes() = yes;
ack() = ack;
error() = error;
ok() = ok;
intList() = [int()];
testAmbiguities() = testAmbiguities;
callbackOnItsWay() = callbackOnItsWay.
+STATE start
logon() => ok() & active
| error() & stop.
+STATE active
ls() => files() & active;
callback() => callbackOnItsWay() & active;
getFile() => okFile() & active
| noSuchFile() & stop;
stop() => void() & stop;
testAmbiguities() => yes() & funny;
EVENT => callback().
+STATE funny
string() => upCase() & funny;
intList() => doubleInt() & funny;
stop() => ack() & start.
+ANYSTATE
info() => string();
description() => string();
services() => serviceList();
contract() => term().