Added resource handlers to guac_resource.

This commit is contained in:
Michael Jumper 2012-09-05 18:11:48 -07:00
parent dc1be17935
commit 9493dc10f3

View File

@ -56,6 +56,16 @@
* @file resource.h * @file resource.h
*/ */
/**
* Handler which begins resource transfer when the client accepts an exposed resource.
*/
typedef int guac_resource_accept_handler(guac_resource* resource, const char* mimetype);
/**
* Handler which cancels resource transfer when the client rejects an exposed resource.
*/
typedef int guac_resource_reject_handler(guac_resource* resource);
/** /**
* Represents a single resource which can be requested or exposed via * Represents a single resource which can be requested or exposed via
* the Guacamole protocol. * the Guacamole protocol.
@ -67,6 +77,16 @@ typedef struct guac_resource {
*/ */
int index; int index;
/**
* Handler which will be called when this resource is accepted by the client.
*/
guac_resource_accept_handler* accept_handler;
/**
* Handler which will be called when this resource is rejected by the client.
*/
guac_resource_reject_handler* reject_handler;
/** /**
* Arbitrary data associated with this resource. * Arbitrary data associated with this resource.
*/ */
@ -74,16 +94,4 @@ typedef struct guac_resource {
} guac_resource; } guac_resource;
/**
* Handler which will be called whenever a resource has been accepted by the
* client.
*/
typedef int guac_resource_accept_handler(guac_resource* resource, const char* mimetype);
/**
* Handler which will be called whenever a resource has been rejected by the
* client.
*/
typedef int guac_resource_reject_handler(guac_resource* resource);
#endif #endif