aboutsummaryrefslogtreecommitdiff
path: root/xC-proto
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-11 20:46:35 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-11 21:50:08 +0200
commit96fc12bc4c852f1343a120126f1f46ac7cca447d (patch)
treeca6135f3b7b495af480f1be9e5f39527f2982427 /xC-proto
parent1493d9998bb526e6f13bd5de37ec4f790b3592b8 (diff)
downloadxK-96fc12bc4c852f1343a120126f1f46ac7cca447d.tar.gz
xK-96fc12bc4c852f1343a120126f1f46ac7cca447d.tar.xz
xK-96fc12bc4c852f1343a120126f1f46ac7cca447d.zip
xC/xP: send buffer type and server state
Also make PM highlighting behaviour consistent.
Diffstat (limited to 'xC-proto')
-rw-r--r--xC-proto40
1 files changed, 38 insertions, 2 deletions
diff --git a/xC-proto b/xC-proto
index 52bab54..819eb24 100644
--- a/xC-proto
+++ b/xC-proto
@@ -19,8 +19,8 @@ struct CommandMessage {
case HELLO:
u32 version;
// If the version check succeeds, the client will receive
- // an initial stream of BUFFER_UPDATE, BUFFER_STATS, BUFFER_LINE,
- // and finally a BUFFER_ACTIVATE message.
+ // an initial stream of SERVER_UPDATE, BUFFER_UPDATE, BUFFER_STATS,
+ // BUFFER_LINE, and finally a BUFFER_ACTIVATE message.
case ACTIVE:
void;
case BUFFER_INPUT:
@@ -56,14 +56,33 @@ struct EventMessage {
BUFFER_ACTIVATE,
BUFFER_LINE,
BUFFER_CLEAR,
+ SERVER_UPDATE,
+ SERVER_RENAME,
+ SERVER_REMOVE,
ERROR,
RESPONSE,
} event) {
case PING:
void;
+
case BUFFER_UPDATE:
string buffer_name;
bool hide_unimportant;
+ union BufferContext switch (enum BufferKind {
+ GLOBAL,
+ SERVER,
+ CHANNEL,
+ PRIVATE_MESSAGE,
+ } kind) {
+ case GLOBAL:
+ void;
+ case SERVER:
+ string server_name;
+ case CHANNEL:
+ string server_name;
+ case PRIVATE_MESSAGE:
+ string server_name;
+ } context;
case BUFFER_STATS:
string buffer_name;
// These are cumulative, even for lines flushed out from buffers.
@@ -130,6 +149,23 @@ struct EventMessage {
case BUFFER_CLEAR:
string buffer_name;
+ case SERVER_UPDATE:
+ string server_name;
+ enum ServerState {
+ DISCONNECTED,
+ CONNECTING,
+ CONNECTED,
+ REGISTERED,
+ DISCONNECTING,
+ } state;
+ case SERVER_RENAME:
+ // Buffers aren't sent updates for in this circumstance,
+ // as that wouldn't be sufficiently atomic anyway.
+ string server_name;
+ string new;
+ case SERVER_REMOVE:
+ string server_name;
+
// Restriction: command_seq strictly follows the sequence received
// by the relay, across both of these replies.
case ERROR: