From 4690f0cec21669eb5c54a4dfec78bef7e568beed Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 3 Oct 2020 19:58:54 +0200 Subject: ssh: Update clientlib for protocol version 3 --- ssh/tomsg_clientlib.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ssh/tomsg_clientlib.h') diff --git a/ssh/tomsg_clientlib.h b/ssh/tomsg_clientlib.h index 8a4aae4..20eb96e 100644 --- a/ssh/tomsg_clientlib.h +++ b/ssh/tomsg_clientlib.h @@ -123,6 +123,7 @@ enum tomsg_event_type { TOMSG_EV_LIST_ROOMS, // list_rooms TOMSG_EV_LIST_MEMBERS, // list_members TOMSG_EV_CREATE_ROOM, // create_room + TOMSG_EV_LEAVE_ROOM, // leave_room TOMSG_EV_INVITE, // join TOMSG_EV_SEND, // send TOMSG_EV_HISTORY, // history @@ -134,6 +135,7 @@ enum tomsg_event_type { TOMSG_EV_PUSH_MESSAGE, // push_message TOMSG_EV_PUSH_INVITE, // push_invite TOMSG_EV_PUSH_JOIN, // join + TOMSG_EV_PUSH_LEAVE, // push_leave }; struct history_message { @@ -168,6 +170,9 @@ struct tomsg_event { struct { char *room_name; } create_room; + struct { + char *room_name; + } leave_room; struct { char *room_name; char *username; @@ -200,6 +205,10 @@ struct tomsg_event { char *room_name; char *inviter; } push_invite; + struct { + char *room_name; + char *username; + } push_leave; }; }; @@ -243,6 +252,10 @@ enum tomsg_retval tomsg_list_members(struct tomsg_client *client, const char *ro // Send a create_room command to the server. enum tomsg_retval tomsg_create_room(struct tomsg_client *client); +// Send a leave_room command to the server. +enum tomsg_retval tomsg_leave_room( + struct tomsg_client *client, const char *room_name); + // Send an invite command to the server. enum tomsg_retval tomsg_invite( struct tomsg_client *client, const char *room_name, const char *username); -- cgit v1.2.3-70-g09d2