WebApp Library Main package

Classes
struct wa_chain
void *curr
wa_chain *next
struct wa_provider
char *(*applinfo)(wa_application *appl, apr_pool_t *pool)
char *(*conninfo)(wa_connection *conn, apr_pool_t *pool)
const const char *(*connect)(wa_connection *conn, const char *param)
const const char *(*deploy)(wa_application *appl)
const const char *(*init)(void)
int (*handle)(wa_request *req, wa_application *appl)
const char *name
void (*shutdown)(void)
void (*startup)(void)

Global Functions
void wa_debug(const char *f, const int l, const char *fmt, ...)
const char *wa_deploy(wa_application *a, wa_virtualhost *h, wa_connection *c)
const char *wa_init(void)
void wa_log(const char *f, const int l, const char *fmt, ...)
void wa_shutdown(void)
void wa_startup(void)

Global Variables
extern wa_chain *wa_configuration
extern apr_pool_t *wa_pool
extern wa_provider *wa_providers[]

Class "wa_chain" Detail:
wa_chain
struct wa_chain {
void *curr;
wa_chain *next;
};

A simple chain structure holding lists of pointers.

Class "wa_chain" Variables:
curr
void *curr;
The pointer to the current element in the chain.

next
wa_chain *next;
The pointer to the next chain structure containing the next element or NULL if this is the last element in the chain.

Class "wa_provider" Detail:
wa_provider
struct wa_provider {
char *(*applinfo)(wa_application *appl, apr_pool_t *pool);
char *(*conninfo)(wa_connection *conn, apr_pool_t *pool);
const const char *(*connect)(wa_connection *conn, const char *param);
const const char *(*deploy)(wa_application *appl);
const const char *(*init)(void);
int (*handle)(wa_request *req, wa_application *appl);
const char *name;
void (*shutdown)(void);
void (*startup)(void);
};

The WebApp Library connection provider structure.
This structure contains all data and function pointers to be implemented by a connection provider.

Class "wa_provider" Functions:
char *(*applinfo)
char *(*applinfo)(wa_application *appl, apr_pool_t *pool);
Describe the configuration member found in a web application.
Parameters
appl - The application for wich a description must be produced.
pool - The memory pool where the returned string must be allocated.
Return Value
The description for an application configuration or NULL.

char *(*conninfo)
char *(*conninfo)(wa_connection *conn, apr_pool_t *pool);
Describe the configuration member found in a connection.
Parameters
conn - The connection for wich a description must be produced.
pool - The memory pool where the returned string must be allocated.
Return Value
The description for a connection configuration or NULL.

const char *(*connect)
const const char *(*connect)(wa_connection *conn, const char *param);
Configure a connection with the parameter from the web server configuration file.
Parameters
conn - The connection to configure.
param - The extra parameter from web server configuration.
Return Value
An error message or NULL.

const char *(*deploy)
const const char *(*deploy)(wa_application *appl);
Receive notification of the deployment of an application.
Parameters
appl - The application being deployed.
Return Value
An error message or NULL.

const char *(*init)
const const char *(*init)(void);
Initialize a provider.
This function is called when the WebApp Library is initialized, before any web application is deployed.
Return Value
An error message or NULL.

int (*handle)
int (*handle)(wa_request *req, wa_application *appl);
Handle a connection from the web server.
Parameters
req - The request data.
appl - The application associated with the request.
return - The HTTP status code of the response.

void (*shutdown)
void (*shutdown)(void);
Cleans up all resources allocated by the provider.
The provider is notified that no further requests will be handled, and the WebApp library is being shut down.

void (*startup)
void (*startup)(void);
Notify the provider of its imminent startup.
After all configurations are generated, this function is called to notify the provider to expect requests to be handled.

Class "wa_provider" Variables:
name
const char *name;
The name of this provider.

Global Functions Detail:
wa_debug
void wa_debug(const char *f, const int l, const char *fmt, ...);
Dump some debugging information.
Parameters
f - The file where this function was called.
l - The line number where this function was called.
fmt - The format string of the debug message (printf style).
others - The parameters to the format string.

wa_deploy
const char *wa_deploy(wa_application *a, wa_virtualhost *h, wa_connection *c);
Deploy a web-application.
Parameters
a - The wa_application member of the web-application to deploy.
h - The wa_virtualhost member of the host under which the web-application has to be deployed.
c - The wa_connection member of the connection used to reach the application.
Return Value
NULL on success or an error message on faliure.

wa_init
const char *wa_init(void);
Initialize the WebApp Library. This function must be called before any other calls to any other function to set up the APR and WebApp Library internals. If any other function is called before this function has been invoked will result in impredictable results.
Return Value
NULL on success or an error message on faliure.

wa_log
void wa_log(const char *f, const int l, const char *fmt, ...);
Report an error to the web-server log file.
NOTE: This function is _NOT_ defined in the WebApp library. It _MUST_ be defined and implemented within the web-server module.
Parameters
f - The file where this function was called.
l - The line number where this function was called.
fmt - The format string of the debug message (printf style).
others - The parameters to the format string.

wa_shutdown
void wa_shutdown(void);
Clean up the WebApp Library. This function releases all memory and resouces used by the WebApp library and must be called before the underlying web server process exits. Any call to any other WebApp Library function after this function has been invoked will result in impredictable results.

wa_startup
void wa_startup(void);
Clean up the WebApp Library. This function releases all memory and resouces used by the WebApp library and must be called before the underlying web server process exits. Any call to any other WebApp Library function after this function has been invoked will result in impredictable results.

Global Variables Detail:
wa_configuration
extern wa_chain *wa_configuration;
The configuration member of the library.
This list of wa_chain structure contain the configuration of the WebApp Library in the form of all deployed wa_application, wa_virtualhost and wa_connection structures.
The curr member in the wa_chain structure contains always a wa_virtualhost structure, from which all configured wa_application members and relative wa_connection members can be retrieved.

wa_pool
extern apr_pool_t *wa_pool;
The WebApp library memory pool.

wa_providers
extern wa_provider *wa_providers[];
A NULL-terminated array of all compiled-in wa_provider members.

Copyright © 2001, The Apache Software Foundation.
All Rights Reserved.
Generated with
ScanDoc 0.14 on Fri Sep 21 17:47:55 2001