libguac  0.9.8
Data Structures | Functions
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...
 

Functions

guac_client_pluginguac_client_plugin_open (const char *protocol)
 Open the plugin which provides support for the given protocol, if it exists. More...
 
int guac_client_plugin_close (guac_client_plugin *plugin)
 Close the given plugin, releasing all associated resources. More...
 
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. More...
 

Detailed Description

Provides functions and structures required for handling a client plugin.

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
pluginThe 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
pluginThe client plugin to use to initialize the new client.
clientThe guac_client to initialize.
argcThe number of arguments being passed to the client.
argvAll 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
protocolThe 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.