mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
More function docs
This commit is contained in:
@@ -160,10 +160,52 @@ struct guac_client {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef void guac_client_init_handler(guac_client* client, const char* hostname, int port);
|
typedef void guac_client_init_handler(guac_client* client, const char* hostname, int port);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize and return a new guac_client using the specified client init handler (guac_client_init_handler).
|
||||||
|
* This will normally be the guac_client_init function as provided by any of the pluggable proxy clients.
|
||||||
|
*
|
||||||
|
* @param client_fd The file descriptor associated with the socket associated with the connection to the
|
||||||
|
* web-client tunnel.
|
||||||
|
* @param client_init Function pointer to the client init handler which will initialize the new guac_client
|
||||||
|
* when called. The given hostname and port will be passed to this handler.
|
||||||
|
* @param hostname The hostname of the host that the proxy client should connect to.
|
||||||
|
* @param port The port of the host that the proxy client should connect to.
|
||||||
|
* @return A pointer to the newly initialized client.
|
||||||
|
*/
|
||||||
guac_client* guac_get_client(int client_fd, guac_client_init_handler* client_init, const char* hostname, int port);
|
guac_client* guac_get_client(int client_fd, guac_client_init_handler* client_init, const char* hostname, int port);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter the main network message handling loop for the given client.
|
||||||
|
*
|
||||||
|
* @param client The proxy client to start handling messages of/for.
|
||||||
|
*/
|
||||||
void guac_start_client(guac_client* client);
|
void guac_start_client(guac_client* client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free all resources associated with the given client.
|
||||||
|
*
|
||||||
|
* @param client The proxy client to free all reasources of.
|
||||||
|
*/
|
||||||
void guac_free_client(guac_client* client);
|
void guac_free_client(guac_client* client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allocate a libpng-compatible buffer to hold raw image data.
|
||||||
|
*
|
||||||
|
* @param w The width of the buffer to allocate, in pixels.
|
||||||
|
* @param h The height of the buffer to allocate, in pixels.
|
||||||
|
* @param bpp The number of bytes per pixel (3 for RGB images, 4 for RGBA).
|
||||||
|
* @return A pointer to the newly allocated buffer.
|
||||||
|
*/
|
||||||
png_byte** guac_alloc_png_buffer(int w, int h, int bpp);
|
png_byte** guac_alloc_png_buffer(int w, int h, int bpp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free all memory associated with the given libpng-compatible buffer
|
||||||
|
* as allocated by guac_alloc_png_buffer.
|
||||||
|
*
|
||||||
|
* @param png_buffer The buffer to free.
|
||||||
|
* @param h The height of the buffer to free.
|
||||||
|
*/
|
||||||
void guac_free_png_buffer(png_byte** png_buffer, int h);
|
void guac_free_png_buffer(png_byte** png_buffer, int h);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user