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
00232 int guac_protocol_send_nest(guac_socket* socket, int index,
00233 const char* data);
00234
00245 int guac_protocol_send_nop(guac_socket* socket);
00246
00257 int guac_protocol_send_ready(guac_socket* socket, const char* id);
00258
00271 int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer,
00272 const char* name, const char* value);
00273
00284 int guac_protocol_send_select(guac_socket* socket, const char* protocol);
00285
00297 int guac_protocol_send_sync(guac_socket* socket, guac_timestamp timestamp);
00298
00299
00300
00326 int guac_protocol_send_body(guac_socket* socket, const guac_object* object,
00327 const guac_stream* stream, const char* mimetype, const char* name);
00328
00347 int guac_protocol_send_filesystem(guac_socket* socket,
00348 const guac_object* object, const char* name);
00349
00365 int guac_protocol_send_undefine(guac_socket* socket,
00366 const guac_object* object);
00367
00368
00369
00388 int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream,
00389 const char* mimetype);
00390
00403 int guac_protocol_send_file(guac_socket* socket, const guac_stream* stream,
00404 const char* mimetype, const char* name);
00405
00418 int guac_protocol_send_pipe(guac_socket* socket, const guac_stream* stream,
00419 const char* mimetype, const char* name);
00420
00435 int guac_protocol_send_blob(guac_socket* socket, const guac_stream* stream,
00436 const void* data, int count);
00437
00466 int guac_protocol_send_blobs(guac_socket* socket, const guac_stream* stream,
00467 const void* data, int count);
00468
00479 int guac_protocol_send_end(guac_socket* socket, const guac_stream* stream);
00480
00502 int guac_protocol_send_video(guac_socket* socket, const guac_stream* stream,
00503 const guac_layer* layer, const char* mimetype);
00504
00505
00506
00524 int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer,
00525 int x, int y, int radius, double startAngle, double endAngle,
00526 int negative);
00527
00543 int guac_protocol_send_cfill(guac_socket* socket,
00544 guac_composite_mode mode, const guac_layer* layer,
00545 int r, int g, int b, int a);
00546
00557 int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer);
00558
00569 int guac_protocol_send_close(guac_socket* socket, const guac_layer* layer);
00570
00591 int guac_protocol_send_copy(guac_socket* socket,
00592 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00593 guac_composite_mode mode, const guac_layer* dstl, int dstx, int dsty);
00594
00613 int guac_protocol_send_cstroke(guac_socket* socket,
00614 guac_composite_mode mode, const guac_layer* layer,
00615 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00616 int r, int g, int b, int a);
00617
00634 int guac_protocol_send_cursor(guac_socket* socket, int x, int y,
00635 const guac_layer* srcl, int srcx, int srcy, int w, int h);
00636
00653 int guac_protocol_send_curve(guac_socket* socket, const guac_layer* layer,
00654 int cp1x, int cp1y, int cp2x, int cp2y, int x, int y);
00655
00666 int guac_protocol_send_identity(guac_socket* socket, const guac_layer* layer);
00667
00680 int guac_protocol_send_lfill(guac_socket* socket,
00681 guac_composite_mode mode, const guac_layer* layer,
00682 const guac_layer* srcl);
00683
00696 int guac_protocol_send_line(guac_socket* socket, const guac_layer* layer,
00697 int x, int y);
00698
00714 int guac_protocol_send_lstroke(guac_socket* socket,
00715 guac_composite_mode mode, const guac_layer* layer,
00716 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00717 const guac_layer* srcl);
00718
00752 int guac_protocol_send_img(guac_socket* socket, const guac_stream* stream,
00753 guac_composite_mode mode, const guac_layer* layer,
00754 const char* mimetype, int x, int y);
00755
00766 int guac_protocol_send_pop(guac_socket* socket, const guac_layer* layer);
00767
00778 int guac_protocol_send_push(guac_socket* socket, const guac_layer* layer);
00779
00794 int guac_protocol_send_rect(guac_socket* socket, const guac_layer* layer,
00795 int x, int y, int width, int height);
00796
00811 int guac_protocol_send_required(guac_socket* socket, const char** required);
00812
00823 int guac_protocol_send_reset(guac_socket* socket, const guac_layer* layer);
00824
00837 int guac_protocol_send_start(guac_socket* socket, const guac_layer* layer,
00838 int x, int y);
00839
00860 int guac_protocol_send_transfer(guac_socket* socket,
00861 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00862 guac_transfer_function fn, const guac_layer* dstl, int dstx, int dsty);
00863
00880 int guac_protocol_send_transform(guac_socket* socket,
00881 const guac_layer* layer,
00882 double a, double b, double c,
00883 double d, double e, double f);
00884
00885
00886
00897 int guac_protocol_send_dispose(guac_socket* socket, const guac_layer* layer);
00898
00915 int guac_protocol_send_distort(guac_socket* socket,
00916 const guac_layer* layer,
00917 double a, double b, double c,
00918 double d, double e, double f);
00919
00935 int guac_protocol_send_move(guac_socket* socket, const guac_layer* layer,
00936 const guac_layer* parent, int x, int y, int z);
00937
00949 int guac_protocol_send_shade(guac_socket* socket, const guac_layer* layer,
00950 int a);
00951
00964 int guac_protocol_send_size(guac_socket* socket, const guac_layer* layer,
00965 int w, int h);
00966
00967
00968
00991 int guac_protocol_send_argv(guac_socket* socket, guac_stream* stream,
00992 const char* mimetype, const char* name);
00993
01005 int guac_protocol_send_clipboard(guac_socket* socket, const guac_stream* stream,
01006 const char* mimetype);
01007
01015 int guac_protocol_send_name(guac_socket* socket, const char* name);
01016
01024 int guac_protocol_decode_base64(char* base64);
01025
01038 guac_protocol_version guac_protocol_string_to_version(const char* version_string);
01039
01051 const char* guac_protocol_version_to_string(guac_protocol_version version);
01052
01053 #endif
01054