libguac  0.9.10-incubating
Data Fields
guac_user Struct Reference

Representation of a physical connection within a larger logical connection which may be shared. More...

Data Fields

guac_clientclient
 The guac_client to which this user belongs.
 
guac_socketsocket
 This user's actual socket. More...
 
char * user_id
 The unique identifier allocated for this user, which may be used within the Guacamole protocol to refer to this user. More...
 
int owner
 Non-zero if this user is the owner of the associated connection, zero otherwise. More...
 
int active
 Non-zero if this user is active (connected), and zero otherwise. More...
 
guac_timestamp last_received_timestamp
 The time (in milliseconds) of receipt of the last sync message from the user.
 
int last_frame_duration
 The duration of the last frame rendered by the user, in milliseconds. More...
 
int processing_lag
 The overall lag experienced by the user relative to the stream of frames, roughly excluding network lag.
 
guac_user_info info
 Information structure containing properties exposed by the remote user during the initial handshake process.
 
void * data
 Arbitrary user-specific data.
 
guac_user_mouse_handlermouse_handler
 Handler for mouse events sent by the Gaucamole web-client. More...
 
guac_user_key_handlerkey_handler
 Handler for key events sent by the Guacamole web-client. More...
 
guac_user_clipboard_handlerclipboard_handler
 Handler for clipboard events sent by the Guacamole web-client. More...
 
guac_user_size_handlersize_handler
 Handler for size events sent by the Guacamole web-client. More...
 
guac_user_file_handlerfile_handler
 Handler for file events sent by the Guacamole web-client. More...
 
guac_user_pipe_handlerpipe_handler
 Handler for pipe events sent by the Guacamole web-client. More...
 
guac_user_ack_handlerack_handler
 Handler for ack events sent by the Guacamole web-client. More...
 
guac_user_blob_handlerblob_handler
 Handler for blob events sent by the Guacamole web-client. More...
 
guac_user_end_handlerend_handler
 Handler for stream end events sent by the Guacamole web-client. More...
 
guac_user_sync_handlersync_handler
 Handler for sync events sent by the Guacamole web-client. More...
 
guac_user_leave_handlerleave_handler
 Handler for leave events fired by the guac_client when a guac_user is leaving an active connection. More...
 
guac_user_get_handlerget_handler
 Handler for get events sent by the Guacamole web-client. More...
 
guac_user_put_handlerput_handler
 Handler for put events sent by the Guacamole web-client. More...
 
guac_user_audio_handleraudio_handler
 Handler for audio events sent by the Guacamole web-client. More...
 

Detailed Description

Representation of a physical connection within a larger logical connection which may be shared.

Logical connections are represented by guac_client.

Field Documentation

guac_user_ack_handler* guac_user::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_user* user, guac_stream* stream,
char* error, guac_protocol_status status);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
int guac_user::active

Non-zero if this user is active (connected), and zero otherwise.

When the user is created, this will be set to a non-zero value. If an event occurs which requires that the user disconnect, or the user has disconnected, this will be reset to zero.

guac_user_audio_handler* guac_user::audio_handler

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

This handler will be called whenever the web-client wishes to send a continuous stream of audio data from some arbitrary source (a microphone, for example).

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:

int audio_handler(guac_user* user, guac_stream* stream,
char* mimetype);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_blob_handler* guac_user::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_user* user, guac_stream* stream,
void* data, int length);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_clipboard_handler* guac_user::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_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_end_handler* guac_user::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_user* user, guac_stream* stream);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_file_handler* guac_user::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_user* user, guac_stream* stream,
char* mimetype, char* filename);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_get_handler* guac_user::get_handler

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

The handler takes a guac_object, containing the object index which will persist through the duration of the transfer, and the name of the stream being requested. It is up to the get handler to create the required body stream.

Example:

int get_handler(guac_user* user, guac_object* object,
char* name);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_key_handler* guac_user::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_user* user, int keysym, int pressed);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
int guac_user::last_frame_duration

The duration of the last frame rendered by the user, in milliseconds.

This duration will include network and processing lag, and thus should be slightly higher than the true frame duration.

guac_user_leave_handler* guac_user::leave_handler

Handler for leave events fired by the guac_client when a guac_user is leaving an active connection.

The handler takes only a guac_user which will be the guac_user that left the connection. This guac_user will be disposed of immediately after this event is finished.

Example:

int my_join_handler(guac_user* user, int argv, char** argv) {
}
guac_user_mouse_handler* guac_user::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_user* user, int x, int y, int button_mask);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
int guac_user::owner

Non-zero if this user is the owner of the associated connection, zero otherwise.

The owner is the user which created the connection.

guac_user_pipe_handler* guac_user::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_user* user, guac_stream* stream,
char* mimetype, char* name);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_put_handler* guac_user::put_handler

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

The handler takes a guac_object and guac_stream, which each contain their respective indices which will persist through the duration of the transfer, the mimetype of the data being transferred, and the name of the stream within the object being written to.

Example:

int put_handler(guac_user* user, guac_object* object,
guac_stream* stream, char* mimetype, char* name);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_user_size_handler* guac_user::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_user* user, int width, int height);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
guac_socket* guac_user::socket

This user's actual socket.

Data written to this socket will be received by this user alone, and data sent by this specific user will be received by this socket.

guac_user_sync_handler* guac_user::sync_handler

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

Sync events are used to track per-user latency.

The handler takes only a guac_timestamp which contains the timestamp received from the user. Latency can be determined by comparing this timestamp against the last_sent_timestamp of guac_client.

Example:

int sync_handler(guac_user* user, guac_timestamp timestamp);
int guac_user_init(guac_user* user, int argc, char** argv) {
}
char* guac_user::user_id

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

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


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