libguac 1.5.5
|
Provides functions and structures required for communicating using the Guacamole protocol over a guac_socket connection, such as that provided by guac_client objects. More...
Go to the source code of this file.
Functions | |
int | guac_protocol_send_ack (guac_socket *socket, guac_stream *stream, const char *error, guac_protocol_status status) |
Sends an ack instruction over the given guac_socket connection. | |
int | guac_protocol_send_args (guac_socket *socket, const char **args) |
Sends an args instruction over the given guac_socket connection. | |
int | guac_protocol_send_connect (guac_socket *socket, const char **args) |
Sends a connect instruction over the given guac_socket connection. | |
int | guac_protocol_send_disconnect (guac_socket *socket) |
Sends a disconnect instruction over the given guac_socket connection. | |
int | guac_protocol_send_error (guac_socket *socket, const char *error, guac_protocol_status status) |
Sends an error instruction over the given guac_socket connection. | |
int | guac_protocol_send_key (guac_socket *socket, int keysym, int pressed, guac_timestamp timestamp) |
Sends a key instruction over the given guac_socket connection. | |
int | guac_protocol_send_log (guac_socket *socket, const char *format,...) |
Sends a log instruction over the given guac_socket connection. | |
int | vguac_protocol_send_log (guac_socket *socket, const char *format, va_list args) |
Sends a log instruction over the given guac_socket connection. | |
int | guac_protocol_send_msg (guac_socket *socket, guac_message_type msg, const char **args) |
Sends the given string over the socket to be displayed on the client. | |
int | guac_protocol_send_mouse (guac_socket *socket, int x, int y, int button_mask, guac_timestamp timestamp) |
Sends a mouse instruction over the given guac_socket connection. | |
int | guac_protocol_send_touch (guac_socket *socket, int id, int x, int y, int x_radius, int y_radius, double angle, double force, guac_timestamp timestamp) |
Sends a touch instruction over the given guac_socket connection. | |
int | guac_protocol_send_nest (guac_socket *socket, int index, const char *data) |
Sends a nest instruction over the given guac_socket connection. | |
int | guac_protocol_send_nop (guac_socket *socket) |
Sends a nop instruction (null-operation) over the given guac_socket connection. | |
int | guac_protocol_send_ready (guac_socket *socket, const char *id) |
Sends a ready instruction over the given guac_socket connection. | |
int | guac_protocol_send_set (guac_socket *socket, const guac_layer *layer, const char *name, const char *value) |
Sends a set instruction over the given guac_socket connection. | |
int | guac_protocol_send_set_int (guac_socket *socket, const guac_layer *layer, const char *name, int value) |
Sends a set instruction over the given guac_socket connection. | |
int | guac_protocol_send_select (guac_socket *socket, const char *protocol) |
Sends a select instruction over the given guac_socket connection. | |
int | guac_protocol_send_sync (guac_socket *socket, guac_timestamp timestamp) |
Sends a sync instruction over the given guac_socket connection. | |
int | guac_protocol_send_body (guac_socket *socket, const guac_object *object, const guac_stream *stream, const char *mimetype, const char *name) |
Sends a body instruction over the given guac_socket connection. | |
int | guac_protocol_send_filesystem (guac_socket *socket, const guac_object *object, const char *name) |
Sends a filesystem instruction over the given guac_socket connection. | |
int | guac_protocol_send_undefine (guac_socket *socket, const guac_object *object) |
Sends an undefine instruction over the given guac_socket connection. | |
int | guac_protocol_send_audio (guac_socket *socket, const guac_stream *stream, const char *mimetype) |
Sends an audio instruction over the given guac_socket connection. | |
int | guac_protocol_send_file (guac_socket *socket, const guac_stream *stream, const char *mimetype, const char *name) |
Sends a file instruction over the given guac_socket connection. | |
int | guac_protocol_send_pipe (guac_socket *socket, const guac_stream *stream, const char *mimetype, const char *name) |
Sends a pipe instruction over the given guac_socket connection. | |
int | guac_protocol_send_blob (guac_socket *socket, const guac_stream *stream, const void *data, int count) |
Writes a block of data to the currently in-progress blob which was already created. | |
int | guac_protocol_send_blobs (guac_socket *socket, const guac_stream *stream, const void *data, int count) |
Sends a series of blob instructions, splitting the given data across the number of instructions required to ensure the size of each blob does not exceed GUAC_PROTOCOL_BLOB_MAX_LENGTH. | |
int | guac_protocol_send_end (guac_socket *socket, const guac_stream *stream) |
Sends an end instruction over the given guac_socket connection. | |
int | guac_protocol_send_video (guac_socket *socket, const guac_stream *stream, const guac_layer *layer, const char *mimetype) |
Sends a video instruction over the given guac_socket connection. | |
int | guac_protocol_send_arc (guac_socket *socket, const guac_layer *layer, int x, int y, int radius, double startAngle, double endAngle, int negative) |
Sends an arc instruction over the given guac_socket connection. | |
int | guac_protocol_send_cfill (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, int r, int g, int b, int a) |
Sends a cfill instruction over the given guac_socket connection. | |
int | guac_protocol_send_clip (guac_socket *socket, const guac_layer *layer) |
Sends a clip instruction over the given guac_socket connection. | |
int | guac_protocol_send_close (guac_socket *socket, const guac_layer *layer) |
Sends a close instruction over the given guac_socket connection. | |
int | guac_protocol_send_copy (guac_socket *socket, const guac_layer *srcl, int srcx, int srcy, int w, int h, guac_composite_mode mode, const guac_layer *dstl, int dstx, int dsty) |
Sends a copy instruction over the given guac_socket connection. | |
int | guac_protocol_send_cstroke (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, guac_line_cap_style cap, guac_line_join_style join, int thickness, int r, int g, int b, int a) |
Sends a cstroke instruction over the given guac_socket connection. | |
int | guac_protocol_send_cursor (guac_socket *socket, int x, int y, const guac_layer *srcl, int srcx, int srcy, int w, int h) |
Sends a cursor instruction over the given guac_socket connection. | |
int | guac_protocol_send_curve (guac_socket *socket, const guac_layer *layer, int cp1x, int cp1y, int cp2x, int cp2y, int x, int y) |
Sends a curve instruction over the given guac_socket connection. | |
int | guac_protocol_send_identity (guac_socket *socket, const guac_layer *layer) |
Sends an identity instruction over the given guac_socket connection. | |
int | guac_protocol_send_lfill (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, const guac_layer *srcl) |
Sends an lfill instruction over the given guac_socket connection. | |
int | guac_protocol_send_line (guac_socket *socket, const guac_layer *layer, int x, int y) |
Sends a line instruction over the given guac_socket connection. | |
int | guac_protocol_send_lstroke (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, guac_line_cap_style cap, guac_line_join_style join, int thickness, const guac_layer *srcl) |
Sends an lstroke instruction over the given guac_socket connection. | |
int | guac_protocol_send_img (guac_socket *socket, const guac_stream *stream, guac_composite_mode mode, const guac_layer *layer, const char *mimetype, int x, int y) |
Sends an img instruction over the given guac_socket connection. | |
int | guac_protocol_send_pop (guac_socket *socket, const guac_layer *layer) |
Sends a pop instruction over the given guac_socket connection. | |
int | guac_protocol_send_push (guac_socket *socket, const guac_layer *layer) |
Sends a push instruction over the given guac_socket connection. | |
int | guac_protocol_send_rect (guac_socket *socket, const guac_layer *layer, int x, int y, int width, int height) |
Sends a rect instruction over the given guac_socket connection. | |
int | guac_protocol_send_required (guac_socket *socket, const char **required) |
Sends a "required" instruction over the given guac_socket connection. | |
int | guac_protocol_send_reset (guac_socket *socket, const guac_layer *layer) |
Sends a reset instruction over the given guac_socket connection. | |
int | guac_protocol_send_start (guac_socket *socket, const guac_layer *layer, int x, int y) |
Sends a start instruction over the given guac_socket connection. | |
int | guac_protocol_send_transfer (guac_socket *socket, const guac_layer *srcl, int srcx, int srcy, int w, int h, guac_transfer_function fn, const guac_layer *dstl, int dstx, int dsty) |
Sends a transfer instruction over the given guac_socket connection. | |
int | guac_protocol_send_transform (guac_socket *socket, const guac_layer *layer, double a, double b, double c, double d, double e, double f) |
Sends a transform instruction over the given guac_socket connection. | |
int | guac_protocol_send_dispose (guac_socket *socket, const guac_layer *layer) |
Sends a dispose instruction over the given guac_socket connection. | |
int | guac_protocol_send_distort (guac_socket *socket, const guac_layer *layer, double a, double b, double c, double d, double e, double f) |
Sends a distort instruction over the given guac_socket connection. | |
int | guac_protocol_send_move (guac_socket *socket, const guac_layer *layer, const guac_layer *parent, int x, int y, int z) |
Sends a move instruction over the given guac_socket connection. | |
int | guac_protocol_send_shade (guac_socket *socket, const guac_layer *layer, int a) |
Sends a shade instruction over the given guac_socket connection. | |
int | guac_protocol_send_size (guac_socket *socket, const guac_layer *layer, int w, int h) |
Sends a size instruction over the given guac_socket connection. | |
int | guac_protocol_send_argv (guac_socket *socket, guac_stream *stream, const char *mimetype, const char *name) |
Sends an argv instruction over the given guac_socket connection. | |
int | guac_protocol_send_clipboard (guac_socket *socket, const guac_stream *stream, const char *mimetype) |
Sends a clipboard instruction over the given guac_socket connection. | |
int | guac_protocol_send_name (guac_socket *socket, const char *name) |
Sends a name instruction over the given guac_socket connection. | |
int | guac_protocol_decode_base64 (char *base64) |
Decodes the given base64-encoded string in-place. | |
guac_protocol_version | guac_protocol_string_to_version (const char *version_string) |
Given a string representation of a protocol version, return the enum value of that protocol version, or GUAC_PROTOCOL_VERSION_UNKNOWN if the value is not a known version. | |
const char * | guac_protocol_version_to_string (guac_protocol_version version) |
Given the enum value of the protocol version, return a pointer to the string representation of the version, or NULL if the version is unknown. | |
Provides functions and structures required for communicating using the Guacamole protocol over a guac_socket connection, such as that provided by guac_client objects.
int guac_protocol_decode_base64 | ( | char * | base64 | ) |
Decodes the given base64-encoded string in-place.
The base64 string must be NULL-terminated.
base64 | The base64-encoded string to decode. |
int guac_protocol_send_ack | ( | guac_socket * | socket, |
guac_stream * | stream, | ||
const char * | error, | ||
guac_protocol_status | status ) |
Sends an ack instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
stream | The guac_stream associated with the operation this ack is acknowledging. |
error | The human-readable description associated with the error or status update. |
status | The status code related to the error or status. |
int guac_protocol_send_arc | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | x, | ||
int | y, | ||
int | radius, | ||
double | startAngle, | ||
double | endAngle, | ||
int | negative ) |
Sends an arc instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
x | The X coordinate of the center of the circle containing the arc. |
y | The Y coordinate of the center of the circle containing the arc. |
radius | The radius of the circle containing the arc. |
startAngle | The starting angle, in radians. |
endAngle | The ending angle, in radians. |
negative | Zero if the arc should be drawn in order of increasing angle, non-zero otherwise. |
int guac_protocol_send_args | ( | guac_socket * | socket, |
const char ** | args ) |
Sends an args instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
args | The NULL-terminated array of argument names (strings). |
int guac_protocol_send_argv | ( | guac_socket * | socket, |
guac_stream * | stream, | ||
const char * | mimetype, | ||
const char * | name ) |
Sends an argv instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use to send the connection parameter value. |
stream | The stream to use to send the connection parameter value. |
mimetype | The mimetype of the connection parameter value being sent. |
name | The name of the connection parameter whose current value is being sent. |
int guac_protocol_send_audio | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const char * | mimetype ) |
Sends an audio instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use when sending the audio instruction. |
stream | The stream to use for future audio data. |
mimetype | The mimetype of the audio data which will be sent over the given stream. |
int guac_protocol_send_blob | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const void * | data, | ||
int | count ) |
Writes a block of data to the currently in-progress blob which was already created.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
stream | The stream to use. |
data | The file data to write. |
count | The number of bytes within the given buffer of file data that must be written. |
int guac_protocol_send_blobs | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const void * | data, | ||
int | count ) |
Sends a series of blob instructions, splitting the given data across the number of instructions required to ensure the size of each blob does not exceed GUAC_PROTOCOL_BLOB_MAX_LENGTH.
If the size of data provided is zero, no blob instructions are sent.
If an error occurs sending any blob instruction, a non-zero value is returned, guac_error is set appropriately, and no further blobs are sent.
socket | The guac_socket connection to use to send the blob instructions. |
stream | The stream to associate with each blob sent. |
data | The data which should be sent using the required number of blob instructions. |
count | The number of bytes within the given buffer of data that must be written. |
int guac_protocol_send_body | ( | guac_socket * | socket, |
const guac_object * | object, | ||
const guac_stream * | stream, | ||
const char * | mimetype, | ||
const char * | name ) |
Sends a body instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
object | The object to associated with the stream being used. |
stream | The stream to use. |
mimetype | The mimetype of the data being sent. |
name | The name of the stream whose body is being sent, as requested by a "get" instruction. |
int guac_protocol_send_cfill | ( | guac_socket * | socket, |
guac_composite_mode | mode, | ||
const guac_layer * | layer, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a ) |
Sends a cfill instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
mode | The composite mode to use. |
layer | The destination layer. |
r | The red component of the color of the rectangle. |
g | The green component of the color of the rectangle. |
b | The blue component of the color of the rectangle. |
a | The alpha (transparency) component of the color of the rectangle. |
int guac_protocol_send_clip | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends a clip instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to set the clipping region of. |
int guac_protocol_send_clipboard | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const char * | mimetype ) |
Sends a clipboard instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
stream | The stream to use. |
mimetype | The mimetype of the clipboard data being sent. |
int guac_protocol_send_close | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends a close instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
int guac_protocol_send_connect | ( | guac_socket * | socket, |
const char ** | args ) |
Sends a connect instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
args | The NULL-terminated array of argument values (strings). |
int guac_protocol_send_copy | ( | guac_socket * | socket, |
const guac_layer * | srcl, | ||
int | srcx, | ||
int | srcy, | ||
int | w, | ||
int | h, | ||
guac_composite_mode | mode, | ||
const guac_layer * | dstl, | ||
int | dstx, | ||
int | dsty ) |
Sends a copy instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
srcl | The source layer. |
srcx | The X coordinate of the source rectangle. |
srcy | The Y coordinate of the source rectangle. |
w | The width of the source rectangle. |
h | The height of the source rectangle. |
mode | The composite mode to use. |
dstl | The destination layer. |
dstx | The X coordinate of the destination, where the source rectangle should be copied. |
dsty | The Y coordinate of the destination, where the source rectangle should be copied. |
int guac_protocol_send_cstroke | ( | guac_socket * | socket, |
guac_composite_mode | mode, | ||
const guac_layer * | layer, | ||
guac_line_cap_style | cap, | ||
guac_line_join_style | join, | ||
int | thickness, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a ) |
Sends a cstroke instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
mode | The composite mode to use. |
layer | The destination layer. |
cap | The style of line cap to use when drawing the stroke. |
join | The style of line join to use when drawing the stroke. |
thickness | The thickness of the stroke in pixels. |
r | The red component of the color of the rectangle. |
g | The green component of the color of the rectangle. |
b | The blue component of the color of the rectangle. |
a | The alpha (transparency) component of the color of the rectangle. |
int guac_protocol_send_cursor | ( | guac_socket * | socket, |
int | x, | ||
int | y, | ||
const guac_layer * | srcl, | ||
int | srcx, | ||
int | srcy, | ||
int | w, | ||
int | h ) |
Sends a cursor instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
x | The X coordinate of the cursor hotspot. |
y | The Y coordinate of the cursor hotspot. |
srcl | The source layer. |
srcx | The X coordinate of the source rectangle. |
srcy | The Y coordinate of the source rectangle. |
w | The width of the source rectangle. |
h | The height of the source rectangle. |
int guac_protocol_send_curve | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | cp1x, | ||
int | cp1y, | ||
int | cp2x, | ||
int | cp2y, | ||
int | x, | ||
int | y ) |
Sends a curve instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
cp1x | The X coordinate of the first control point. |
cp1y | The Y coordinate of the first control point. |
cp2x | The X coordinate of the second control point. |
cp2y | The Y coordinate of the second control point. |
x | The X coordinate of the endpoint of the curve. |
y | The Y coordinate of the endpoint of the curve. |
int guac_protocol_send_disconnect | ( | guac_socket * | socket | ) |
Sends a disconnect instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
int guac_protocol_send_dispose | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends a dispose instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to dispose. |
int guac_protocol_send_distort | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
double | a, | ||
double | b, | ||
double | c, | ||
double | d, | ||
double | e, | ||
double | f ) |
Sends a distort instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to distort with the given transform matrix. |
a | The first value of the affine transform matrix. |
b | The second value of the affine transform matrix. |
c | The third value of the affine transform matrix. |
d | The fourth value of the affine transform matrix. |
e | The fifth value of the affine transform matrix. |
f | The sixth value of the affine transform matrix. |
int guac_protocol_send_end | ( | guac_socket * | socket, |
const guac_stream * | stream ) |
Sends an end instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
stream | The stream to use. |
int guac_protocol_send_error | ( | guac_socket * | socket, |
const char * | error, | ||
guac_protocol_status | status ) |
Sends an error instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
error | The human-readable description associated with the error. |
status | The status code related to the error. |
int guac_protocol_send_file | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const char * | mimetype, | ||
const char * | name ) |
Sends a file instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
stream | The stream to use. |
mimetype | The mimetype of the data being sent. |
name | A name describing the file being sent. |
int guac_protocol_send_filesystem | ( | guac_socket * | socket, |
const guac_object * | object, | ||
const char * | name ) |
Sends a filesystem instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
object | The object representing the filesystem being exposed. |
name | A name describing the filesystem being exposed. |
int guac_protocol_send_identity | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends an identity instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
int guac_protocol_send_img | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
guac_composite_mode | mode, | ||
const guac_layer * | layer, | ||
const char * | mimetype, | ||
int | x, | ||
int | y ) |
Sends an img instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use when sending the img instruction. |
stream | The stream over which the image data will be sent. |
mode | The composite mode to use when drawing the image over the destination layer. |
layer | The destination layer. |
mimetype | The mimetype of the image data being sent. |
x | The X coordinate of the upper-left corner of the destination rectangle within the destination layer, in pixels. |
y | The Y coordinate of the upper-left corner of the destination rectangle within the destination layer, in pixels. |
int guac_protocol_send_key | ( | guac_socket * | socket, |
int | keysym, | ||
int | pressed, | ||
guac_timestamp | timestamp ) |
Sends a key instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
keysym | The X11 keysym of the key that was pressed or released. |
pressed | Non-zero if the key represented by the given keysym is currently pressed, zero if it is released. |
timestamp | The server timestamp (in milliseconds) at the point in time this key event was acknowledged. |
int guac_protocol_send_lfill | ( | guac_socket * | socket, |
guac_composite_mode | mode, | ||
const guac_layer * | layer, | ||
const guac_layer * | srcl ) |
Sends an lfill instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
mode | The composite mode to use. |
layer | The destination layer. |
srcl | The source layer. |
int guac_protocol_send_line | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | x, | ||
int | y ) |
Sends a line instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
x | The X coordinate of the endpoint of the line. |
y | The Y coordinate of the endpoint of the line. |
int guac_protocol_send_log | ( | guac_socket * | socket, |
const char * | format, | ||
... ) |
Sends a log instruction over the given guac_socket connection.
This is mainly useful in debugging.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
format | A printf-style format string to log. |
... | Arguments to use when filling the format string for printing. |
int guac_protocol_send_lstroke | ( | guac_socket * | socket, |
guac_composite_mode | mode, | ||
const guac_layer * | layer, | ||
guac_line_cap_style | cap, | ||
guac_line_join_style | join, | ||
int | thickness, | ||
const guac_layer * | srcl ) |
Sends an lstroke instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
mode | The composite mode to use. |
layer | The destination layer. |
cap | The style of line cap to use when drawing the stroke. |
join | The style of line join to use when drawing the stroke. |
thickness | The thickness of the stroke in pixels. |
srcl | The source layer. |
int guac_protocol_send_mouse | ( | guac_socket * | socket, |
int | x, | ||
int | y, | ||
int | button_mask, | ||
guac_timestamp | timestamp ) |
Sends a mouse instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
x | The X coordinate of the current mouse position. |
y | The Y coordinate of the current mouse position. |
button_mask | An integer value representing the current state of each button, where the Nth bit within the integer is set to 1 if and only if the Nth mouse button is currently pressed. The lowest-order bit is the left mouse button, followed by the middle button, right button, and finally the up and down buttons of the scroll wheel. |
timestamp | The server timestamp (in milliseconds) at the point in time this mouse position was acknowledged. |
int guac_protocol_send_move | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
const guac_layer * | parent, | ||
int | x, | ||
int | y, | ||
int | z ) |
Sends a move instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to move. |
parent | The parent layer the specified layer will be positioned relative to. |
x | The X coordinate of the layer. |
y | The Y coordinate of the layer. |
z | The Z index of the layer, relative to other layers in its parent. |
int guac_protocol_send_msg | ( | guac_socket * | socket, |
guac_message_type | msg, | ||
const char ** | args ) |
Sends the given string over the socket to be displayed on the client.
Returns zero if the message was sent successfully or non-zero if an error occurs.
socket | The guac_socket connection to send the message to. |
msg | The message code to send to the client. |
args | A null-terminated array of strings that will be provided to the client as part of the message, that the client may then place in the message, or null if the message requires no arguments. |
int guac_protocol_send_name | ( | guac_socket * | socket, |
const char * | name ) |
Sends a name instruction over the given guac_socket connection.
socket | The guac_socket connection to use. |
name | The name to send within the name instruction. |
int guac_protocol_send_nest | ( | guac_socket * | socket, |
int | index, | ||
const char * | data ) |
Sends a nest instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
index | The integer index of the stream to send the protocol data over. |
data | A string containing protocol data, which must be UTF-8 encoded and null-terminated. |
int guac_protocol_send_nop | ( | guac_socket * | socket | ) |
Sends a nop instruction (null-operation) over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
int guac_protocol_send_pipe | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const char * | mimetype, | ||
const char * | name ) |
Sends a pipe instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
stream | The stream to use. |
mimetype | The mimetype of the data being sent. |
name | An arbitrary name uniquely identifying this pipe. |
int guac_protocol_send_pop | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends a pop instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to set the clipping region of. |
int guac_protocol_send_push | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends a push instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to set the clipping region of. |
int guac_protocol_send_ready | ( | guac_socket * | socket, |
const char * | id ) |
Sends a ready instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
id | The connection ID of the connection that is ready. |
int guac_protocol_send_rect | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height ) |
Sends a rect instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
x | The X coordinate of the rectangle. |
y | The Y coordinate of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
int guac_protocol_send_required | ( | guac_socket * | socket, |
const char ** | required ) |
Sends a "required" instruction over the given guac_socket connection.
This instruction indicates to the client that one or more additional parameters are needed to continue the connection.
socket | The guac_socket connection to which to send the instruction. |
required | A NULL-terminated array of required parameters. |
int guac_protocol_send_reset | ( | guac_socket * | socket, |
const guac_layer * | layer ) |
Sends a reset instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to set the clipping region of. |
int guac_protocol_send_select | ( | guac_socket * | socket, |
const char * | protocol ) |
Sends a select instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
protocol | The protocol to request. |
int guac_protocol_send_set | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
const char * | name, | ||
const char * | value ) |
Sends a set instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to set the parameter of. |
name | The name of the parameter to set. |
value | The value to set the parameter to. |
int guac_protocol_send_set_int | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
const char * | name, | ||
int | value ) |
Sends a set instruction over the given guac_socket connection.
This function behaves identically to guac_protocol_send_set() except that the provided parameter value is an integer, rather than a string.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to set the parameter of. |
name | The name of the parameter to set. |
value | The value to set the parameter to. |
int guac_protocol_send_shade | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | a ) |
Sends a shade instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to shade. |
a | The alpha value of the layer. |
int guac_protocol_send_size | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | w, | ||
int | h ) |
Sends a size instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to resize. |
w | The new width of the layer. |
h | The new height of the layer. |
int guac_protocol_send_start | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
int | x, | ||
int | y ) |
Sends a start instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The destination layer. |
x | The X coordinate of the first point of the subpath. |
y | The Y coordinate of the first point of the subpath. |
int guac_protocol_send_sync | ( | guac_socket * | socket, |
guac_timestamp | timestamp ) |
Sends a sync instruction over the given guac_socket connection.
The current time in milliseconds should be passed in as the timestamp.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
timestamp | The current timestamp (in milliseconds). |
int guac_protocol_send_touch | ( | guac_socket * | socket, |
int | id, | ||
int | x, | ||
int | y, | ||
int | x_radius, | ||
int | y_radius, | ||
double | angle, | ||
double | force, | ||
guac_timestamp | timestamp ) |
Sends a touch instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
id | An arbitrary integer ID which uniquely identifies this contact relative to other active contacts. |
x | The X coordinate of the center of the touch contact. |
y | The Y coordinate of the center of the touch contact. |
x_radius | The X radius of the ellipse covering the general area of the touch contact, in pixels. |
y_radius | The Y radius of the ellipse covering the general area of the touch contact, in pixels. |
angle | The rough angle of clockwise rotation of the general area of the touch contact, in degrees. |
force | The relative force exerted by the touch contact, where 0 is no force (the touch has been lifted) and 1 is maximum force (the maximum amount of force representable by the device). |
timestamp | The server timestamp (in milliseconds) at the point in time this touch event was acknowledged. |
int guac_protocol_send_transfer | ( | guac_socket * | socket, |
const guac_layer * | srcl, | ||
int | srcx, | ||
int | srcy, | ||
int | w, | ||
int | h, | ||
guac_transfer_function | fn, | ||
const guac_layer * | dstl, | ||
int | dstx, | ||
int | dsty ) |
Sends a transfer instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
srcl | The source layer. |
srcx | The X coordinate of the source rectangle. |
srcy | The Y coordinate of the source rectangle. |
w | The width of the source rectangle. |
h | The height of the source rectangle. |
fn | The transfer function to use. |
dstl | The destination layer. |
dstx | The X coordinate of the destination, where the source rectangle should be copied. |
dsty | The Y coordinate of the destination, where the source rectangle should be copied. |
int guac_protocol_send_transform | ( | guac_socket * | socket, |
const guac_layer * | layer, | ||
double | a, | ||
double | b, | ||
double | c, | ||
double | d, | ||
double | e, | ||
double | f ) |
Sends a transform instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
layer | The layer to apply the given transform matrix to. |
a | The first value of the affine transform matrix. |
b | The second value of the affine transform matrix. |
c | The third value of the affine transform matrix. |
d | The fourth value of the affine transform matrix. |
e | The fifth value of the affine transform matrix. |
f | The sixth value of the affine transform matrix. |
int guac_protocol_send_undefine | ( | guac_socket * | socket, |
const guac_object * | object ) |
Sends an undefine instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
object | The object being undefined. |
int guac_protocol_send_video | ( | guac_socket * | socket, |
const guac_stream * | stream, | ||
const guac_layer * | layer, | ||
const char * | mimetype ) |
Sends a video instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use when sending the video instruction. |
stream | The stream to use for future video data. |
layer | The destination layer on which the streamed video should be played. |
mimetype | The mimetype of the video data which will be sent over the given stream. |
guac_protocol_version guac_protocol_string_to_version | ( | const char * | version_string | ) |
Given a string representation of a protocol version, return the enum value of that protocol version, or GUAC_PROTOCOL_VERSION_UNKNOWN if the value is not a known version.
version_string | The string representation of the protocol version. |
const char * guac_protocol_version_to_string | ( | guac_protocol_version | version | ) |
Given the enum value of the protocol version, return a pointer to the string representation of the version, or NULL if the version is unknown.
version | The enum value of the protocol version. |
int vguac_protocol_send_log | ( | guac_socket * | socket, |
const char * | format, | ||
va_list | args ) |
Sends a log instruction over the given guac_socket connection.
This is mainly useful in debugging.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
format | A printf-style format string to log. |
args | The va_list containing the arguments to be used when filling the format string for printing. |