From aa92239eddd56820b47cb829d6ff6d1a1ce1b4f6 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Tue, 8 Nov 2022 07:15:15 -0500 Subject: [PATCH] GUACAMOLE-1293: Rename new enum values to be more consistent with existing code. --- src/libguac/client.c | 4 ++-- src/libguac/guacamole/protocol-types.h | 8 ++++---- src/libguac/guacamole/protocol.h | 2 +- src/libguac/protocol.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libguac/client.c b/src/libguac/client.c index e8739580..9738d9b7 100644 --- a/src/libguac/client.c +++ b/src/libguac/client.c @@ -776,7 +776,7 @@ static void* guac_client_owner_notify_join_callback(guac_user* user, void* data) /* Send required parameters to owner. */ const char* args[] = { (const char*)joinName, NULL }; - return (void*) ((intptr_t) guac_protocol_send_msg(user->socket, GUAC_MSG_CLIENT_JOINED, args)); + return (void*) ((intptr_t) guac_protocol_send_msg(user->socket, GUAC_MESSAGE_USER_JOINED, args)); } @@ -831,7 +831,7 @@ static void* guac_client_owner_notify_leave_callback(guac_user* user, void* data /* Send required parameters to owner. */ const char* args[] = { (const char*)quitterName, NULL }; - return (void*) ((intptr_t) guac_protocol_send_msg(user->socket, GUAC_MSG_CLIENT_LEFT, args)); + return (void*) ((intptr_t) guac_protocol_send_msg(user->socket, GUAC_MESSAGE_USER_LEFT, args)); } diff --git a/src/libguac/guacamole/protocol-types.h b/src/libguac/guacamole/protocol-types.h index 5bb1e04c..5c209c89 100644 --- a/src/libguac/guacamole/protocol-types.h +++ b/src/libguac/guacamole/protocol-types.h @@ -323,23 +323,23 @@ typedef enum guac_protocol_version { * The codes will be interpreted by the client into translatable messages, and * make take arguments, as noted below. */ -typedef enum guac_msg_client { +typedef enum guac_message_type { /** * A message that notifies the owner of a connection that another user has * joined their connection. There should be a single argument, the username * of the user who has joined. */ - GUAC_MSG_CLIENT_JOINED = 0x0001, + GUAC_MESSAGE_USER_JOINED = 0x0001, /** * A message that notifies the owner of a connection that another user has * left their connection. There should be a single argument provided, the * username of the user who has left. */ - GUAC_MSG_CLIENT_LEFT = 0x0002 + GUAC_MESSAGE_USER_LEFT = 0x0002 -} guac_msg_client; +} guac_message_type; #endif diff --git a/src/libguac/guacamole/protocol.h b/src/libguac/guacamole/protocol.h index 16111314..91debdde 100644 --- a/src/libguac/guacamole/protocol.h +++ b/src/libguac/guacamole/protocol.h @@ -189,7 +189,7 @@ int vguac_protocol_send_log(guac_socket* socket, const char* format, * @return * Zero if the message is sent successfully; otherwise non-zero. */ -int guac_protocol_send_msg(guac_socket* socket, guac_msg_client msg, +int guac_protocol_send_msg(guac_socket* socket, guac_message_type msg, const char** args); /** diff --git a/src/libguac/protocol.c b/src/libguac/protocol.c index 407b056e..3421af50 100644 --- a/src/libguac/protocol.c +++ b/src/libguac/protocol.c @@ -659,7 +659,7 @@ int guac_protocol_send_log(guac_socket* socket, const char* format, ...) { } -int guac_protocol_send_msg(guac_socket* socket, guac_msg_client msg, +int guac_protocol_send_msg(guac_socket* socket, guac_message_type msg, const char** args) { int ret_val;