00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _GUAC_PROTOCOL_H
00021 #define _GUAC_PROTOCOL_H
00022
00031 #include "layer-types.h"
00032 #include "object-types.h"
00033 #include "protocol-constants.h"
00034 #include "protocol-types.h"
00035 #include "socket-types.h"
00036 #include "stream-types.h"
00037 #include "timestamp-types.h"
00038
00039 #include <cairo/cairo.h>
00040 #include <stdarg.h>
00041
00042
00043
00058 int guac_protocol_send_ack(guac_socket* socket, guac_stream* stream,
00059 const char* error, guac_protocol_status status);
00060
00071 int guac_protocol_send_args(guac_socket* socket, const char** args);
00072
00083 int guac_protocol_send_connect(guac_socket* socket, const char** args);
00084
00094 int guac_protocol_send_disconnect(guac_socket* socket);
00095
00107 int guac_protocol_send_error(guac_socket* socket, const char* error,
00108 guac_protocol_status status);
00109
00133 int guac_protocol_send_key(guac_socket* socket, int keysym, int pressed,
00134 guac_timestamp timestamp);
00135
00148 int guac_protocol_send_log(guac_socket* socket, const char* format, ...);
00149
00171 int vguac_protocol_send_log(guac_socket* socket, const char* format,
00172 va_list args);
00173
00209 int guac_protocol_send_mouse(guac_socket* socket, int x, int y,
00210 int button_mask, guac_timestamp timestamp);
00211
00255 int guac_protocol_send_touch(guac_socket* socket, int id, int x, int y,
00256 int x_radius, int y_radius, double angle, double force,
00257 guac_timestamp timestamp);
00258
00279 int guac_protocol_send_nest(guac_socket* socket, int index,
00280 const char* data);
00281
00292 int guac_protocol_send_nop(guac_socket* socket);
00293
00304 int guac_protocol_send_ready(guac_socket* socket, const char* id);
00305
00318 int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer,
00319 const char* name, const char* value);
00320
00344 int guac_protocol_send_set_int(guac_socket* socket, const guac_layer* layer,
00345 const char* name, int value);
00346
00357 int guac_protocol_send_select(guac_socket* socket, const char* protocol);
00358
00370 int guac_protocol_send_sync(guac_socket* socket, guac_timestamp timestamp);
00371
00372
00373
00399 int guac_protocol_send_body(guac_socket* socket, const guac_object* object,
00400 const guac_stream* stream, const char* mimetype, const char* name);
00401
00420 int guac_protocol_send_filesystem(guac_socket* socket,
00421 const guac_object* object, const char* name);
00422
00438 int guac_protocol_send_undefine(guac_socket* socket,
00439 const guac_object* object);
00440
00441
00442
00461 int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream,
00462 const char* mimetype);
00463
00476 int guac_protocol_send_file(guac_socket* socket, const guac_stream* stream,
00477 const char* mimetype, const char* name);
00478
00491 int guac_protocol_send_pipe(guac_socket* socket, const guac_stream* stream,
00492 const char* mimetype, const char* name);
00493
00508 int guac_protocol_send_blob(guac_socket* socket, const guac_stream* stream,
00509 const void* data, int count);
00510
00539 int guac_protocol_send_blobs(guac_socket* socket, const guac_stream* stream,
00540 const void* data, int count);
00541
00552 int guac_protocol_send_end(guac_socket* socket, const guac_stream* stream);
00553
00575 int guac_protocol_send_video(guac_socket* socket, const guac_stream* stream,
00576 const guac_layer* layer, const char* mimetype);
00577
00578
00579
00597 int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer,
00598 int x, int y, int radius, double startAngle, double endAngle,
00599 int negative);
00600
00616 int guac_protocol_send_cfill(guac_socket* socket,
00617 guac_composite_mode mode, const guac_layer* layer,
00618 int r, int g, int b, int a);
00619
00630 int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer);
00631
00642 int guac_protocol_send_close(guac_socket* socket, const guac_layer* layer);
00643
00664 int guac_protocol_send_copy(guac_socket* socket,
00665 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00666 guac_composite_mode mode, const guac_layer* dstl, int dstx, int dsty);
00667
00686 int guac_protocol_send_cstroke(guac_socket* socket,
00687 guac_composite_mode mode, const guac_layer* layer,
00688 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00689 int r, int g, int b, int a);
00690
00707 int guac_protocol_send_cursor(guac_socket* socket, int x, int y,
00708 const guac_layer* srcl, int srcx, int srcy, int w, int h);
00709
00726 int guac_protocol_send_curve(guac_socket* socket, const guac_layer* layer,
00727 int cp1x, int cp1y, int cp2x, int cp2y, int x, int y);
00728
00739 int guac_protocol_send_identity(guac_socket* socket, const guac_layer* layer);
00740
00753 int guac_protocol_send_lfill(guac_socket* socket,
00754 guac_composite_mode mode, const guac_layer* layer,
00755 const guac_layer* srcl);
00756
00769 int guac_protocol_send_line(guac_socket* socket, const guac_layer* layer,
00770 int x, int y);
00771
00787 int guac_protocol_send_lstroke(guac_socket* socket,
00788 guac_composite_mode mode, const guac_layer* layer,
00789 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00790 const guac_layer* srcl);
00791
00825 int guac_protocol_send_img(guac_socket* socket, const guac_stream* stream,
00826 guac_composite_mode mode, const guac_layer* layer,
00827 const char* mimetype, int x, int y);
00828
00839 int guac_protocol_send_pop(guac_socket* socket, const guac_layer* layer);
00840
00851 int guac_protocol_send_push(guac_socket* socket, const guac_layer* layer);
00852
00867 int guac_protocol_send_rect(guac_socket* socket, const guac_layer* layer,
00868 int x, int y, int width, int height);
00869
00884 int guac_protocol_send_required(guac_socket* socket, const char** required);
00885
00896 int guac_protocol_send_reset(guac_socket* socket, const guac_layer* layer);
00897
00910 int guac_protocol_send_start(guac_socket* socket, const guac_layer* layer,
00911 int x, int y);
00912
00933 int guac_protocol_send_transfer(guac_socket* socket,
00934 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00935 guac_transfer_function fn, const guac_layer* dstl, int dstx, int dsty);
00936
00953 int guac_protocol_send_transform(guac_socket* socket,
00954 const guac_layer* layer,
00955 double a, double b, double c,
00956 double d, double e, double f);
00957
00958
00959
00970 int guac_protocol_send_dispose(guac_socket* socket, const guac_layer* layer);
00971
00988 int guac_protocol_send_distort(guac_socket* socket,
00989 const guac_layer* layer,
00990 double a, double b, double c,
00991 double d, double e, double f);
00992
01008 int guac_protocol_send_move(guac_socket* socket, const guac_layer* layer,
01009 const guac_layer* parent, int x, int y, int z);
01010
01022 int guac_protocol_send_shade(guac_socket* socket, const guac_layer* layer,
01023 int a);
01024
01037 int guac_protocol_send_size(guac_socket* socket, const guac_layer* layer,
01038 int w, int h);
01039
01040
01041
01064 int guac_protocol_send_argv(guac_socket* socket, guac_stream* stream,
01065 const char* mimetype, const char* name);
01066
01078 int guac_protocol_send_clipboard(guac_socket* socket, const guac_stream* stream,
01079 const char* mimetype);
01080
01088 int guac_protocol_send_name(guac_socket* socket, const char* name);
01089
01097 int guac_protocol_decode_base64(char* base64);
01098
01111 guac_protocol_version guac_protocol_string_to_version(const char* version_string);
01112
01124 const char* guac_protocol_version_to_string(guac_protocol_version version);
01125
01126 #endif
01127