guacamole/plugin.h File Reference

Provides functions and structures required for handling a client plugin. More...

Go to the source code of this file.

Data Structures

struct  guac_client_plugin
 A handle to a client plugin, containing enough information about the plugin to complete the initial protocol handshake and instantiate a new client supporting the protocol provided by the client plugin. More...

Defines

#define GUAC_PROTOCOL_LIBRARY_PREFIX   "libguac-client-"
 String prefix which begins the library filename of all client plugins.
#define GUAC_PROTOCOL_LIBRARY_SUFFIX   ".so"
 String suffix which ends the library filename of all client plugins.
#define GUAC_PROTOCOL_NAME_LIMIT   256
 The maximum number of characters (COUNTING NULL TERMINATOR) to allow for protocol names within the library filename of client plugins.
#define GUAC_PROTOCOL_LIBRARY_LIMIT
 The maximum number of characters (INCLUDING NULL TERMINATOR) that a character array containing the concatenation of the library prefix, protocol name, and suffix can contain, assuming the protocol name is limited to GUAC_PROTOCOL_NAME_LIMIT characters.

Functions

guac_client_pluginguac_client_plugin_open (const char *protocol)
 Open the plugin which provides support for the given protocol, if it exists.
int guac_client_plugin_close (guac_client_plugin *plugin)
 Close the given plugin, releasing all associated resources.
int guac_client_plugin_init_client (guac_client_plugin *plugin, guac_client *client, int argc, char **argv)
 Initializes the given guac_client using the initialization routine provided by the given guac_client_plugin.

Detailed Description

Provides functions and structures required for handling a client plugin.


Define Documentation

#define GUAC_PROTOCOL_LIBRARY_LIMIT
Value:
(                                  \
                                                                       \
      sizeof(GUAC_PROTOCOL_LIBRARY_PREFIX) - 1 /* "libguac-client-" */ \
    +        GUAC_PROTOCOL_NAME_LIMIT      - 1 /* [up to 256 chars] */ \
    + sizeof(GUAC_PROTOCOL_LIBRARY_SUFFIX) - 1 /* ".so"             */ \
    + 1                                        /* NULL terminator   */ \
                                                                       \
)

The maximum number of characters (INCLUDING NULL TERMINATOR) that a character array containing the concatenation of the library prefix, protocol name, and suffix can contain, assuming the protocol name is limited to GUAC_PROTOCOL_NAME_LIMIT characters.


Function Documentation

int guac_client_plugin_close ( guac_client_plugin plugin  ) 

Close the given plugin, releasing all associated resources.

This function must be called after use of a client plugin is finished.

Parameters:
plugin The client plugin to close.
Returns:
Zero on success, non-zero if an error occurred while releasing the resources associated with the plugin.
int guac_client_plugin_init_client ( guac_client_plugin plugin,
guac_client client,
int  argc,
char **  argv 
)

Initializes the given guac_client using the initialization routine provided by the given guac_client_plugin.

Parameters:
plugin The client plugin to use to initialize the new client.
client The guac_client to initialize.
argc The number of arguments being passed to the client.
argv All arguments to be passed to the client.
Returns:
Zero if initialization was successful, non-zero otherwise.
guac_client_plugin* guac_client_plugin_open ( const char *  protocol  ) 

Open the plugin which provides support for the given protocol, if it exists.

Parameters:
protocol The name of the protocol to retrieve the client plugin for.
Returns:
The client plugin supporting the given protocol, or NULL if an error occurs or no such plugin exists.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 26 May 2014 for libguac by  doxygen 1.6.1