aboutsummaryrefslogtreecommitdiff
path: root/xC-proto
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-21 12:13:30 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-21 12:15:27 +0200
commit919b12510b49b7b32850b1153d04bb40506bf0a1 (patch)
tree93401102c09f5a2185b64fe9b3708e97102fc1ae /xC-proto
parent414859d309df7282fbb044c5303f8ce7a32461c8 (diff)
downloadxK-919b12510b49b7b32850b1153d04bb40506bf0a1.tar.gz
xK-919b12510b49b7b32850b1153d04bb40506bf0a1.tar.xz
xK-919b12510b49b7b32850b1153d04bb40506bf0a1.zip
xC/xP: relay and render channel topics
Diffstat (limited to 'xC-proto')
-rw-r--r--xC-proto73
1 files changed, 37 insertions, 36 deletions
diff --git a/xC-proto b/xC-proto
index ea39b86..25d48e8 100644
--- a/xC-proto
+++ b/xC-proto
@@ -53,12 +53,12 @@ struct EventMessage {
u32 event_seq;
union EventData switch (enum Event {
PING,
+ BUFFER_LINE,
BUFFER_UPDATE,
BUFFER_STATS,
BUFFER_RENAME,
BUFFER_REMOVE,
BUFFER_ACTIVATE,
- BUFFER_LINE,
BUFFER_CLEAR,
SERVER_UPDATE,
SERVER_RENAME,
@@ -69,41 +69,6 @@ struct EventMessage {
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.
- // 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).
- u32 new_messages;
- u32 new_unimportant_messages;
- bool highlighted;
- case BUFFER_RENAME:
- string buffer_name;
- string new;
- case BUFFER_REMOVE:
- string buffer_name;
- case BUFFER_ACTIVATE:
- string buffer_name;
case BUFFER_LINE:
string buffer_name;
// Whether the line should also be displayed in the active buffer.
@@ -150,6 +115,42 @@ struct EventMessage {
case FLIP_MONOSPACE:
void;
} items<>;
+ 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;
+ ItemData topic<>;
+ case PRIVATE_MESSAGE:
+ string server_name;
+ } context;
+ 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).
+ u32 new_messages;
+ u32 new_unimportant_messages;
+ bool highlighted;
+ case BUFFER_RENAME:
+ string buffer_name;
+ string new;
+ case BUFFER_REMOVE:
+ string buffer_name;
+ case BUFFER_ACTIVATE:
+ string buffer_name;
case BUFFER_CLEAR:
string buffer_name;