GUACAMOLE-1293: Rename new enum values to be more consistent with existing code.

This commit is contained in:
Virtually Nick 2022-11-08 07:15:15 -05:00
parent 897712c743
commit aa92239edd
4 changed files with 8 additions and 8 deletions

View File

@ -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));
}

View File

@ -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

View File

@ -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);
/**

View File

@ -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;