Files
dawn/ipc/instance.lxdr
p 3521c25c37
Alpine 3.24 Success
Alpine 3.24 Flatpak Success
Arch Linux AUR Success
Prepare for future modes
2026-09-09 22:42:54 +02:00

58 lines
914 B
Plaintext

//
// instance.lxdr: dn single-instance IPC envelope
//
// Copyright The Dawn Authors
// SPDX-License-Identifier: MPL-2.0
//
const INSTANCE_PROTOCOL_VERSION = 3;
struct Request {
u64 id;
union RequestBody switch (enum RequestKind {
OPEN,
} kind) {
case OPEN:
struct OpenRequest {
string urls<>;
string activation_token;
// Stable application/mode name, independent of enum ordering.
string mode;
} 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;
};