From 632ac992ab4a032a3415b99a419c0c88c22157e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?=
Date: Sat, 10 Sep 2022 17:37:19 +0200 Subject: xC/xP: only send buffer stats in the initial sync The client and frontends track these separately, there is no need for hard synchronization. --- xC-proto | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xC-proto') diff --git a/xC-proto b/xC-proto index fd06491..7b77e5d 100644 --- a/xC-proto +++ b/xC-proto @@ -19,7 +19,7 @@ struct CommandMessage { case HELLO: u32 version; // If the version check succeeds, the client will receive - // an initial stream of BUFFER_UPDATE, BUFFER_LINE, + // an initial stream of BUFFER_UPDATE, BUFFER_STATS, BUFFER_LINE, // and finally a BUFFER_ACTIVATE message. case ACTIVE: void; @@ -50,6 +50,7 @@ struct EventMessage { union EventData switch (enum Event { PING, BUFFER_UPDATE, + BUFFER_STATS, BUFFER_RENAME, BUFFER_REMOVE, BUFFER_ACTIVATE, @@ -62,12 +63,13 @@ struct EventMessage { void; case BUFFER_UPDATE: string buffer_name; + case BUFFER_STATS: + string buffer_name; // These are cumulative, even for lines flushed out from buffers. // Updates to these values aren't broadcasted, thus handle: // - BUFFER_LINE by bumping/setting them as appropriate, // - BUFFER_ACTIVATE by clearing them for the previous buffer // (this way, they can be used to mark unread messages). - // Any updates received after the initial sync should be ignored. u32 new_messages; u32 new_unimportant_messages; bool highlighted; -- cgit v1.2.3