20 #ifndef _GUAC_CLIENT_H 21 #define _GUAC_CLIENT_H 41 #include <cairo/cairo.h> 165 pthread_rwlock_t __users_lock;
258 void* __plugin_handle;
288 const char* format, ...);
302 const char* format, va_list ap);
325 const char* format, ...);
340 const char* format, va_list ap);
582 cairo_surface_t* surface);
620 cairo_surface_t* surface,
int quality);
665 cairo_surface_t* surface,
int quality,
int lossless);
guac_user_join_handler * join_handler
Handler for join events, called whenever a new user is joining an active connection.
Definition: client.h:207
void guac_client_foreach_user(guac_client *client, guac_user_callback *callback, void *data)
Calls the given function on all currently-connected users of the given client.
int guac_client_end_frame(guac_client *client)
Marks the end of the current frame by sending a "sync" instruction to all connected users...
void vguac_client_abort(guac_client *client, guac_protocol_status status, const char *format, va_list ap)
Signals the given client to stop gracefully, while also signalling via the Guacamole protocol that an...
const guac_layer * GUAC_DEFAULT_LAYER
The default Guacamole client layer, layer 0.
int guac_client_supports_webp(guac_client *client)
Returns whether all users of the given client support WebP.
Constants related to the Guacamole client structure, guac_client.
int guac_client_load_plugin(guac_client *client, const char *protocol)
Initializes the given guac_client using the initialization routine provided by the plugin correspondi...
Type definitions related to the guac_socket object.
void * guac_user_callback(guac_user *user, void *data)
Callback which relates to a single guac_user at a time, along with arbitrary data.
Definition: user-fntypes.h:59
guac_socket * socket
The guac_socket structure to be used to communicate with all connected web-clients (users)...
Definition: client.h:57
guac_timestamp last_sent_timestamp
The time (in milliseconds) that the last sync message was sent to the client.
Definition: client.h:78
const char ** args
NULL-terminated array of all arguments accepted by this client , in order.
Definition: client.h:251
Type definitions related to Guacamole protocol streams.
The core I/O object of Guacamole.
Definition: socket.h:39
guac_stream * guac_client_alloc_stream(guac_client *client)
Allocates a new stream.
Type definitions related to Guacamole protocol objects.
guac_client_state
Possible current states of the Guacamole client.
Definition: client-types.h:41
void * data
Arbitrary reference to proxy client-specific data.
Definition: client.h:72
void guac_client_free_layer(guac_client *client, guac_layer *layer)
Returns the given layer to the pool of available layers, such that it can be reused by any subsequent...
Type definitions related to the Guacamole client structure, guac_client.
guac_layer * guac_client_alloc_buffer(guac_client *client)
Allocates a new buffer (invisible layer).
void guac_client_abort(guac_client *client, guac_protocol_status status, const char *format,...)
Signals the given client to stop gracefully, while also signalling via the Guacamole protocol that an...
void vguac_client_log(guac_client *client, guac_client_log_level level, const char *format, va_list ap)
Writes a message in the log used by the given client.
guac_client_log_handler * log_handler
Logging handler.
Definition: client.h:125
void guac_client_stream_jpeg(guac_client *client, guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, int x, int y, cairo_surface_t *surface, int quality)
Streams the image data of the given surface over an image stream ("img" instruction) as JPEG-encoded ...
void guac_client_free_buffer(guac_client *client, guac_layer *layer)
Returns the given buffer to the pool of available buffers, such that it can be reused by any subseque...
Function type definitions related to the guac_user object.
int guac_client_free_handler(guac_client *client)
Handler for freeing up any extra data allocated by the client implementation.
Definition: client-fntypes.h:49
Representation of a physical connection within a larger logical connection which may be shared...
Definition: user.h:94
int guac_client_add_user(guac_client *client, guac_user *user, int argc, char **argv)
Adds the given user to the internal list of connected users.
Type definitions related to the guac_pool pool of unique integers.
guac_client_state state
The current state of the client.
Definition: client.h:65
int64_t guac_timestamp
An arbitrary timestamp denoting a relative time value in milliseconds.
Definition: timestamp-types.h:34
Function type definitions related to the Guacamole client structure, guac_client. ...
Guacamole proxy client.
Definition: client.h:46
int connected_users
The number of currently-connected users.
Definition: client.h:184
A pool of integers.
Definition: pool.h:34
guac_client * guac_client_alloc()
Returns a new, barebones guac_client.
guac_user_leave_handler * leave_handler
Handler for leave events, called whenever a new user is leaving an active connection.
Definition: client.h:225
void * guac_client_for_owner(guac_client *client, guac_user_callback *callback, void *data)
Calls the given function with the currently-connected user that is marked as the owner.
void guac_client_free(guac_client *client)
Free all resources associated with the given client.
void guac_client_stream_webp(guac_client *client, guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, int x, int y, cairo_surface_t *surface, int quality, int lossless)
Streams the image data of the given surface over an image stream ("img" instruction) as WebP-encoded ...
guac_layer * guac_client_alloc_layer(guac_client *client)
Allocates a new layer.
Type definitions related to Guacamole layers.
int guac_user_leave_handler(guac_user *user)
Handler for Guacamole leave events.
Definition: user-fntypes.h:355
guac_composite_mode
Composite modes used by Guacamole draw instructions.
Definition: protocol-types.h:141
guac_client_free_handler * free_handler
Handler for freeing data when the client is being unloaded.
Definition: client.h:101
guac_protocol_status
Set of all possible status codes returned by protocol operations.
Definition: protocol-types.h:44
Represents a single layer within the Guacamole protocol.
Definition: layer.h:34
void guac_client_stop(guac_client *client)
Signals the given client to stop gracefully.
void guac_client_stream_png(guac_client *client, guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, int x, int y, cairo_surface_t *surface)
Streams the image data of the given surface over an image stream ("img" instruction) as PNG-encoded d...
void guac_client_remove_user(guac_client *client, guac_user *user)
Removes the given user, removing the user from the internally-tracked list of connected users...
Represents a single stream within the Guacamole protocol.
Definition: stream.h:32
void guac_client_log_handler(guac_client *client, guac_client_log_level level, const char *format, va_list args)
Handler for logging messages related to a given guac_client instance.
Definition: client-fntypes.h:67
int guac_client_get_processing_lag(guac_client *client)
Calculates and returns the approximate processing lag experienced by the pool of users.
guac_client_log_level
All supported log levels used by the logging subsystem of each Guacamole client.
Definition: client-types.h:62
void guac_client_free_stream(guac_client *client, guac_stream *stream)
Returns the given stream to the pool of available streams, such that it can be reused by any subseque...
int guac_user_join_handler(guac_user *user, int argc, char **argv)
Handler for Guacamole join events.
Definition: user-fntypes.h:336
Type definitions related to Guacamole protocol timestamps.
Type definitions related to the guac_user object.
char * connection_id
The unique identifier allocated for the connection, which may be used within the Guacamole protocol t...
Definition: client.h:159
void guac_client_log(guac_client *client, guac_client_log_level level, const char *format,...)
Writes a message in the log used by the given client.
void * guac_client_for_user(guac_client *client, guac_user *user, guac_user_callback *callback, void *data)
Calls the given function with the given user ONLY if they are currently connected.