More documentation.
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Sat, 25 Sep 2010 04:10:01 +0000 (21:10 -0700)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Sat, 25 Sep 2010 04:10:01 +0000 (21:10 -0700)
libguac/include/client.h
libguac/include/protocol.h

index 9f4090c..a7df27c 100644 (file)
 
 typedef struct guac_client guac_client;
 
+/**
+ * Handler for server messages (where "server" refers to the server that
+ * the proxy client is connected to).
+ */
 typedef int guac_client_handle_messages(guac_client* client);
+
+/**
+ * Handler for Guacamole mouse events.
+ */
 typedef int guac_client_mouse_handler(guac_client* client, int x, int y, int button_mask);
+
+/**
+ * Handler for Guacamole key events.
+ */
 typedef int guac_client_key_handler(guac_client* client, int keysym, int pressed);
+
+/**
+ * Handler for Guacamole clipboard events.
+ */
 typedef int guac_client_clipboard_handler(guac_client* client, char* copied);
+
+/**
+ * Handler for freeing up any extra data allocated by the client
+ * implementation.
+ */
 typedef int guac_client_free_handler(void* client);
 
 /**
@@ -165,6 +186,9 @@ struct guac_client {
 
 };
 
+/**
+ * Handler which should initialize the given guac_client.
+ */
 typedef int guac_client_init_handler(guac_client* client, int argc, char** argv);
 
 /**
index a4bf139..47f3ba3 100644 (file)
@@ -163,7 +163,28 @@ void guac_send_png(GUACIO* io, int x, int y, png_byte** png_rows, int w, int h);
  */
 void guac_send_cursor(GUACIO* io, int x, int y, png_byte** png_rows, int w, int h);
 
+/**
+ * Returns whether new instruction data is available on the given GUACIO
+ * connection for parsing.
+ *
+ * @param io The GUACIO connection to use.
+ * @return A positive value if data is available, negative on error, or
+ *         zero if no data is currently available.
+ */
 int guac_instructions_waiting(GUACIO* io);
+
+/**
+ * Reads a single instruction from the given GUACIO connection.
+ *
+ * @param io The GUACIO connection to use.
+ * @param parsed_instruction A pointer to a guac_instruction structure which
+ *                           will be populated with data read from the given
+ *                           GUACIO connection.
+ * @return A positive value if data was successfully read, negative on
+ *         error, or zero if the instrucion could not be read completely,
+ *         in which case, subsequent calls to guac_read_instruction() will
+ *         return the parsed instruction once enough data is available.
+ */
 int guac_read_instruction(GUACIO* io, guac_instruction* parsed_instruction);
 
 #endif