12 lines
1.2 KiB
Plaintext
12 lines
1.2 KiB
Plaintext
external atom Display id "device:display";
|
|||
|
|
type Request=record {url:string;text:string;version:int32;};
|
||
|
|
interface Device id "device" revision "device@1" {
|
||
|
|
static operation create id "device:create" : string -> atom-ref<Display> {call id "device:create:call" execution transaction targets [browser,server];}
|
||
|
|
queryable value enabled id "device:enabled" : bool {get id "device:enabled:get" execution snapshot targets [browser,server];set id "device:enabled:set" execution transaction targets [browser,server];}
|
||
|
|
queryable value requested id "device:requested" : Request {get id "device:requested:get" execution snapshot targets [browser,server];}
|
||
|
|
queryable value observed id "device:observed" : optional<Request> {get id "device:observed:get" execution snapshot targets [browser,server];}
|
||
|
|
operation requestText id "device:request" : string -> unit {call id "device:request:call" execution transaction targets [browser,server];}
|
||
|
|
operation recordObservation id "device:record" : Request -> unit {call id "device:record:call" execution transaction targets [server];}
|
||
|
|
operation remove id "device:remove" : unit -> unit {call id "device:remove:call" execution transaction targets [server];}
|
||
|
|
}
|