aboutsummaryrefslogtreecommitdiff
path: root/ssh/tomsg_clientlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'ssh/tomsg_clientlib.h')
-rw-r--r--ssh/tomsg_clientlib.h13
1 files changed, 13 insertions, 0 deletions
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 {
@@ -170,6 +172,9 @@ struct tomsg_event {
} create_room;
struct {
char *room_name;
+ } leave_room;
+ struct {
+ char *room_name;
char *username;
} join;
struct {
@@ -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);