tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/connectors/include wa_main.h
Date Thu, 10 May 2001 06:26:02 GMT
pier        01/05/09 23:26:01

  Modified:    connectors/include wa_main.h
  Log:
  Moved configuration functions to wa_config.h
  
  Revision  Changes    Path
  1.2       +40 -73    jakarta-tomcat-4.0/connectors/include/wa_main.h
  
  Index: wa_main.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa_main.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_main.h	2001/04/25 17:04:17	1.1
  +++ wa_main.h	2001/05/10 06:25:58	1.2
  @@ -58,48 +58,21 @@
   /**
    * @package Main
    * @author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
  - * @version $Id: wa_main.h,v 1.1 2001/04/25 17:04:17 pier Exp $
  + * @version $Id: wa_main.h,v 1.2 2001/05/10 06:25:58 pier Exp $
    */
   #ifndef _WA_MAIN_H_
   #define _WA_MAIN_H_
   
   /**
  - * The WebApp Library connection structure.
  - * <br>
  - * This structure holds all required data required by a connection provider
  - * to connect to a web-application container and to handle HTTP requests.
  + * A simple chain structure holding lists of pointers.
    */
  -struct wa_connection {
  -	/** The APR memory pool where this connections is allocated. */
  -	apr_pool_t *pool;
  -	/** The connection provider. */
  -	void *prov;
  -	/** The provider-specific configuration member for this connection. */
  -	void *conf;
  -};
  -
  -/**
  - * The WebApp Library application structure.
  - * <br>
  - * This structure holds all informations associated with an application.
  - * Applications are not grouped in virtual hosts inside the library as in
  - * specific cases (like when load balancing is in use), multiple applications
  - * can share the same root URL path, or (like when applications are shared),
  - * a single web application can be shared across multiple virtual host.
  - */
  -struct wa_application {
  -	/** The APR memory pool where this application is allocated. */
  -	apr_pool_t *pool;
  -	/** The application connection. */
  -	wa_connection *conn;
  -	/** The provider-specific configuration member for this application. */
  -	void *conf;
  -	/** The application name. */
  -	char *name;
  -	/** The application root URL path. */
  -	char *rpth;
  -	/** The local expanded application path (if any). */
  -	char *lpth;
  +struct wa_chain {
  +    /** The pointer to the current element in the chain. */
  +    void *curr;
  +    /**
  +     * The pointer to the next chain structure containing the next element
  +     * or <b>NULL</b> if this is the last element in the chain. */
  +    wa_chain *next;
   };
   
   /**
  @@ -109,10 +82,9 @@
    * function is called before this function has been invoked will result in
    * impredictable results.
    *
  - * @param w The Web Server structure used for callbacks.
    * @return <b>NULL</b> on success or an error message on faliure.
    */
  -const char *WA_Init(wa_webserver *w);
  +const char *wa_init(void);
   
   /**
    * Clean up the WebApp Library.
  @@ -122,56 +94,51 @@
    * will result in impredictable results.
    *
    * @return <b>NULL</b> on success or an error message on faliure.
  - */
  -const char *WA_Destroy(void);
  -
  -/**
  - * Allocate and set up a <code>wa_connection</code> member.
  - *
  - * @param c Where the pointer to where the <code>wa_connection</code> member
  - *          must be stored.
  - * @param p The connection provider name.
  - * @param a The connection argument from a configuration file.
  - * @return <b>NULL</b> on success or an error message on faliure.
    */
  -const char *WA_Connect(wa_connection **c, const char *p, const char *a);
  +const char *wa_destroy(void);
   
   /**
  - * Allocate, set up and deploy a <code>wa_application</code> member.
  + * Deploy a web-application.
    *
  - * @param a Where the pointer to where the <code>wa_application</code> member
  - *          must be stored.
  - * @param c The <code>wa_connection</code> where the application is deployed.
  - * @param n The application name. This parameter will be passed to the
  - *          application container as its unique selection key within its
  - *          array of deployable applications (for example the .war file name).
  - * @param p The root URL path of the web application to deploy.
  + * @param a The <code>wa_application</code> member of the web-application to
  + *          deploy.
  + * @param h The <code>wa_virtualhost</code> member of the host under which
the
  + *          web-application has to be deployed.
  + * @param c The <code>wa_connection</code> member of the connection used to
  + *          reach the application.
    * @return <b>NULL</b> on success or an error message on faliure.
    */
  -const char *WA_Deploy(wa_application **a, wa_connection *c, const char *n,
  -                      const char *p);
  +const char *wa_deploy(wa_application *a,
  +                      wa_virtualhost *h,
  +                      wa_connection *c);
   
   /**
  - * Attempt to match an URL against a web application.
  - * This function will return <b>TRUE</b> only if the root URL path of the
  - * application matches the beginning of the specified URL.
  + * Dump some debugging information.
    *
  - * @param u The request URL to be matched against the web application.
  - * @param a The application against which the URL must be matched.
  - * @return <b>TRUE</b> if the URL can be handled by the web application without
  - *         raising a &quot;404 Not Found&quot; error, <b>FALSE</b>
otherwise.
  + * @param f The file where this function was called.
  + * @param l The line number where this function was called.
  + * @param fmt The format string of the debug message (printf style).
  + * @param others The parameters to the format string.
    */
  -boolean WA_Match(const char *u, wa_application *a);
  +void wa_debug(const char *f, const int l, const char *fmt, ...);
   
   /**
  - * The <code>wa_webserver</code> structure used for all callbacks while
  - * processing an HTTP request.
  + * The WebApp library memory pool.
    */
  -extern wa_webserver *WA_WebServer;
  +extern apr_pool_t *wa_pool;
   
   /**
  - * The APR memory pool used by the WebApp Library.
  + * The configuration member of the library.
  + * <br>
  + * This list of <code>wa_chain</code> structure contain the configuration of
  + * the WebApp Library in the form of all deployed <code>wa_application</code>,
  + * <code>wa_virtualhost</code> and <code>wa_connection</code> structures.
  + * <br>
  + * The <code>curr</code> member in the <code>wa_chain</code> structure
contains
  + * always a <code>wa_virtualhost</code> structure, from which all configured
  + * <code>wa_application</code> members and relative <code>wa_connection</code>
  + * members can be retrieved.
    */
  -extern apr_pool_t *WA_Pool;
  +extern wa_chain *wa_configuration;
   
   #endif /* ifndef _WA_MAIN_H_ */
  
  
  

Mime
View raw message