libguac  0.9.6
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Fields
guac_client Struct Reference

Guacamole proxy client. More...

Data Fields

guac_socketsocket
 The guac_socket structure to be used to communicate with the web-client. More...
 
guac_client_state state
 The current state of the client. More...
 
guac_timestamp last_received_timestamp
 The time (in milliseconds) of receipt of the last sync message from the client.
 
guac_timestamp last_sent_timestamp
 The time (in milliseconds) that the last sync message was sent to the client.
 
guac_client_info info
 Information structure containing properties exposed by the remote client during the initial handshake process.
 
void * data
 Arbitrary reference to proxy client-specific data. More...
 
guac_client_handle_messageshandle_messages
 Handler for server messages. More...
 
guac_client_mouse_handlermouse_handler
 Handler for mouse events sent by the Gaucamole web-client. More...
 
guac_client_key_handlerkey_handler
 Handler for key events sent by the Guacamole web-client. More...
 
guac_client_clipboard_handlerclipboard_handler
 Handler for clipboard events sent by the Guacamole web-client. More...
 
guac_client_size_handlersize_handler
 Handler for size events sent by the Guacamole web-client. More...
 
guac_client_file_handlerfile_handler
 Handler for file events sent by the Guacamole web-client. More...
 
guac_client_pipe_handlerpipe_handler
 Handler for pipe events sent by the Guacamole web-client. More...
 
guac_client_ack_handlerack_handler
 Handler for ack events sent by the Guacamole web-client. More...
 
guac_client_blob_handlerblob_handler
 Handler for blob events sent by the Guacamole web-client. More...
 
guac_client_end_handlerend_handler
 Handler for stream end events sent by the Guacamole web-client. More...
 
guac_client_free_handlerfree_handler
 Handler for freeing data when the client is being unloaded. More...
 
guac_client_log_handlerlog_handler
 Logging handler. More...
 
char * connection_id
 The unique identifier allocated for the connection, which may be used within the Guacamole protocol to refer to this connection. More...
 

Detailed Description

Guacamole proxy client.

Represents a Guacamole proxy client (the client which communicates to a server on behalf of Guacamole, on behalf of the web-client).

Field Documentation

guac_client_ack_handler* guac_client::ack_handler

Handler for ack events sent by the Guacamole web-client.

The handler takes a guac_stream which contains the stream index and will persist through the duration of the transfer, a string containing the error or status message, and a status code.

Example:

int ack_handler(guac_client* client, guac_stream* stream,
char* error, guac_protocol_status status);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_blob_handler* guac_client::blob_handler

Handler for blob events sent by the Guacamole web-client.

The handler takes a guac_stream which contains the stream index and will persist through the duration of the transfer, an arbitrary buffer containing the blob, and the length of the blob.

Example:

int blob_handler(guac_client* client, guac_stream* stream,
void* data, int length);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_clipboard_handler* guac_client::clipboard_handler

Handler for clipboard events sent by the Guacamole web-client.

This handler will be called whenever the web-client sets the data of the clipboard.

The handler takes a guac_stream, which contains the stream index and will persist through the duration of the transfer, and the mimetype of the data being transferred.

Example:

char* mimetype);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
char* guac_client::connection_id

The unique identifier allocated for the connection, which may be used within the Guacamole protocol to refer to this connection.

This identifier is guaranteed to be unique from all existing connections and will not collide with any available protocol names.

void* guac_client::data

Arbitrary reference to proxy client-specific data.

Implementors of a Guacamole proxy client can store any data they want here, which can then be retrieved as necessary in the message handlers.

guac_client_end_handler* guac_client::end_handler

Handler for stream end events sent by the Guacamole web-client.

The handler takes only a guac_stream which contains the stream index. This guac_stream will be disposed of immediately after this event is finished.

Example:

int end_handler(guac_client* client, guac_stream* stream);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_file_handler* guac_client::file_handler

Handler for file events sent by the Guacamole web-client.

The handler takes a guac_stream which contains the stream index and will persist through the duration of the transfer, the mimetype of the file being transferred, and the filename.

Example:

int file_handler(guac_client* client, guac_stream* stream,
char* mimetype, char* filename);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_free_handler* guac_client::free_handler

Handler for freeing data when the client is being unloaded.

This handler will be called when the client needs to be unloaded by the proxy, and any data allocated by the proxy client should be freed.

Note that this handler will NOT be called if the client's guac_client_init() function fails.

Implement this handler if you store data inside the client.

Example:

int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_handle_messages* guac_client::handle_messages

Handler for server messages.

If set, this function will be called occasionally by the Guacamole proxy to give the client a chance to handle messages from whichever server it is connected to.

Example:

int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_key_handler* guac_client::key_handler

Handler for key events sent by the Guacamole web-client.

The handler takes the integer X11 keysym associated with the key being pressed/released, and an integer representing whether the key is being pressed (1) or released (0).

Example:

int key_handler(guac_client* client, int keysym, int pressed);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_log_handler* guac_client::log_handler

Logging handler.

This handler will be called via guac_client_log() when the client needs to log messages of any type.

In general, only programs loading the client should implement this handler, as those are the programs that would provide the logging facilities.

Client implementations should expect these handlers to already be set.

Example:

void log_handler(guac_client* client, guac_client_log_level level, const char* format, va_list args);
void function_of_daemon() {
guac_client* client = [pass log_handler to guac_client_plugin_get_client()];
}
guac_client_mouse_handler* guac_client::mouse_handler

Handler for mouse events sent by the Gaucamole web-client.

The handler takes the integer mouse X and Y coordinates, as well as a button mask containing the bitwise OR of all button values currently being pressed. Those values are:

Button Value
Left 1
Middle 2
Right 4
Scrollwheel Up 8
Scrollwheel Down16

Example:

int mouse_handler(guac_client* client, int x, int y, int button_mask);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_pipe_handler* guac_client::pipe_handler

Handler for pipe events sent by the Guacamole web-client.

The handler takes a guac_stream which contains the stream index and will persist through the duration of the transfer, the mimetype of the data being transferred, and the pipe name.

Example:

int pipe_handler(guac_client* client, guac_stream* stream,
char* mimetype, char* name);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_client_size_handler* guac_client::size_handler

Handler for size events sent by the Guacamole web-client.

The handler takes an integer width and integer height, representing the current visible screen area of the client.

Example:

int size_handler(guac_client* client, int width, int height);
int guac_client_init(guac_client* client, int argc, char** argv) {
}
guac_socket* guac_client::socket

The guac_socket structure to be used to communicate with the web-client.

It is expected that the implementor of any Guacamole proxy client will provide their own mechanism of I/O for their protocol. The guac_socket structure is used only to communicate conveniently with the Guacamole web-client.

guac_client_state guac_client::state

The current state of the client.

When the client is first allocated, this will be initialized to GUAC_CLIENT_RUNNING. It will remain at GUAC_CLIENT_RUNNING until an event occurs which requires the client to shutdown, at which point the state becomes GUAC_CLIENT_STOPPING.


The documentation for this struct was generated from the following file: