From c95931e687456b5b5218b3dd812349d98fd8a283 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 6 Sep 2012 20:30:03 -0700 Subject: [PATCH] Add accept/reject instruction handler stubs. --- libguac/include/client-handlers.h | 14 ++++++++++++++ libguac/src/client-handlers.c | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/libguac/include/client-handlers.h b/libguac/include/client-handlers.h index 7db42e6f..c48f12b8 100644 --- a/libguac/include/client-handlers.h +++ b/libguac/include/client-handlers.h @@ -106,6 +106,20 @@ int __guac_handle_clipboard(guac_client* client, guac_instruction* instruction); */ int __guac_handle_disconnect(guac_client* client, guac_instruction* instruction); +/** + * Internal initial handler for the accept instruction. When an accept instruction + * is received, this handler will be called. The accept handler of the corresponding + * resource will be called if the resource is valid and the handler is defined. + */ +int __guac_handle_accept(guac_client* client, guac_instruction* instruction); + +/** + * Internal initial handler for the reject instruction. When a reject instruction + * is received, this handler will be called. The reject handler of the corresponding + * resource will be called if the resource is valid and the handler is defined. + */ +int __guac_handle_reject(guac_client* client, guac_instruction* instruction); + /** * Instruction handler mapping table. This is a NULL-terminated array of * __guac_instruction_handler_mapping structures, each mapping an opcode diff --git a/libguac/src/client-handlers.c b/libguac/src/client-handlers.c index a6a144f3..f7397041 100644 --- a/libguac/src/client-handlers.c +++ b/libguac/src/client-handlers.c @@ -50,6 +50,8 @@ __guac_instruction_handler_mapping __guac_instruction_handler_map[] = { {"key", __guac_handle_key}, {"clipboard", __guac_handle_clipboard}, {"disconnect", __guac_handle_disconnect}, + {"accept", __guac_handle_accept}, + {"reject", __guac_handle_reject}, {NULL, NULL} }; @@ -120,3 +122,13 @@ int __guac_handle_disconnect(guac_client* client, guac_instruction* instruction) return -1; } +int __guac_handle_accept(guac_client* client, guac_instruction* instruction) { + /* STUB */ + return -1; +} + +int __guac_handle_reject(guac_client* client, guac_instruction* instruction) { + /* STUB */ + return -1; +} +