From 2ec25e126f54ba1e12c5b98a7d345f18fc52e898 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 29 Jul 2020 10:33:53 +0200 Subject: clientlib: Support get_message --- ssh/tomsg_clientlib.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ssh/tomsg_clientlib.h') diff --git a/ssh/tomsg_clientlib.h b/ssh/tomsg_clientlib.h index b164eb3..8a4aae4 100644 --- a/ssh/tomsg_clientlib.h +++ b/ssh/tomsg_clientlib.h @@ -126,6 +126,7 @@ enum tomsg_event_type { TOMSG_EV_INVITE, // join TOMSG_EV_SEND, // send TOMSG_EV_HISTORY, // history + TOMSG_EV_GET_MESSAGE, // get_message TOMSG_EV_PING, // - TOMSG_EV_IS_ONLINE, // is_online TOMSG_EV_USER_ACTIVE, // user_active @@ -180,6 +181,10 @@ struct tomsg_event { int64_t count; struct history_message *messages; } history; + struct { + char *room_name; + struct history_message message; + } get_message; struct { char *username; int64_t online_count; @@ -262,6 +267,9 @@ enum tomsg_retval tomsg_history( struct tomsg_client *client, const char *room_name, int64_t count, int64_t before_msgid); +// Send a get_message command to the server. +enum tomsg_retval tomsg_get_message(struct tomsg_client *client, int64_t msgid); + // Send a ping command to the server. enum tomsg_retval tomsg_ping(struct tomsg_client *client); -- cgit v1.2.3-54-g00ecf