Files

58 lines
914 B
Plaintext
Raw Permalink Normal View History

2026-08-09 06:48:31 +02:00
//
// instance.lxdr: dn single-instance IPC envelope
//
// Copyright The Dawn Authors
// SPDX-License-Identifier: MPL-2.0
//
2026-09-09 19:42:52 +02:00
const INSTANCE_PROTOCOL_VERSION = 3;
2026-08-09 06:48:31 +02:00
struct Request {
u64 id;
union RequestBody switch (enum RequestKind {
OPEN,
} kind) {
case OPEN:
struct OpenRequest {
string urls<>;
string activation_token;
2026-09-09 19:42:52 +02:00
// Stable application/mode name, independent of enum ordering.
string mode;
2026-08-09 06:48:31 +02:00
} open;
} body;
};
struct Response {
u64 id;
union Result switch (enum ResponseKind {
DONE,
ERROR,
} kind) {
case DONE:
void;
case ERROR:
Error error;
} result;
};
struct Frame {
union Payload switch (enum FrameKind {
HELLO,
HELLO_REPLY,
REQUEST,
RESPONSE,
CANCEL,
} kind) {
case HELLO:
Hello hello;
case HELLO_REPLY:
HelloReply hello_reply;
case REQUEST:
Request request;
case RESPONSE:
Response response;
case CANCEL:
Cancel cancel;
} payload;
};