Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

urlmatch.h

Go to the documentation of this file.
00001 #ifndef URLMATCH_H_INCLUDED
00002 #define URLMATCH_H_INCLUDED
00003 #define URLMATCH_H_VERSION "$Id: urlmatch.h,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"
00004 /* ******************************************************************
00005  * $Source: /cvsroot/ijbswa/current/src/urlmatch.h,v $
00006  * ******************************************************************
00007  *
00008  * Written by and Copyright (C) 2001 the SourceForge
00009  * Privoxy team. http://www.privoxy.org/
00010  * 
00011  * Based on the Internet Junkbuster originally written
00012  * by and Copyright (C) 1997 Anonymous Coders and
00013  * Junkbusters Corporation.  http://www.junkbusters.com
00014  * 
00015  * This program is free software; you can redistribute it
00016  * and/or modify it under the terms of the GNU General
00017  * Public License as published by the Free Software
00018  * Foundation; either version 2 of the License, or (at
00019  * your option) any later version.
00020  * 
00021  * This program is distributed in the hope that it will
00022  * be useful, but WITHOUT ANY WARRANTY; without even the
00023  * implied warranty of MERCHANTABILITY or FITNESS FOR A
00024  * PARTICULAR PURPOSE.  See the GNU General Public
00025  * License for more details.
00026  * 
00027  * The GNU General Public License should be included with
00028  * this file.  If not, you can view it at
00029  * http://www.gnu.org/copyleft/gpl.html
00030  * or write to the Free Software Foundation, Inc., 59
00031  * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00032  * 
00033  * *****************************************************************/
00034 /**
00035  * @file
00036  *
00037  * Declares functions to match URLs against URL
00038  * patterns.
00039  * 
00040  *
00041  * $Log: urlmatch.h,v $
00042  * Revision 2.0  2002/06/04 14:34:21  jongfoster
00043  * Moving source files to src/
00044  * 
00045  * Revision 1.3  2002/03/26 22:29:55  swa
00046  * we have a new homepage!
00047  * 
00048  * Revision 1.2  2002/03/24 13:25:43  swa
00049  * name change related issues
00050  * 
00051  * Revision 1.1  2002/01/17 20:53:46  jongfoster
00052  * Moving all our URL and URL pattern parsing code to the same file - it
00053  * was scattered around in filters.c, loaders.c and parsers.c.
00054  * 
00055  * Providing a single, simple url_match(pattern,url) function - rather than
00056  * the 3-line match routine which was repeated all over the place.
00057  * 
00058  * Renaming free_url to free_url_spec, since it frees a struct url_spec.
00059  * 
00060  * Providing parse_http_url() so that URLs can be parsed without faking a
00061  * HTTP request line for parse_http_request() or repeating the parsing
00062  * code (both of which were techniques that were actually in use).
00063  * 
00064  * Standardizing that struct http_request is used to represent a URL, and
00065  * struct url_spec is used to represent a URL pattern.  (Before, URLs were
00066  * represented as seperate variables and a partially-filled-in url_spec).
00067  * 
00068  * 
00069  */
00070 /* *****************************************************************/
00071 
00072 
00073 #include "project.h"
00074 
00075 #ifdef __cplusplus
00076 extern "C" {
00077 #endif
00078 
00079 extern void free_http_request(struct http_request *http);
00080 extern jb_err parse_http_request(const char *req,
00081                                  struct http_request *http,
00082                                  struct client_state *csp);
00083 extern jb_err parse_http_url(const char * url,
00084                              struct http_request *http,
00085                              struct client_state *csp);
00086 
00087 extern int url_match(const struct url_spec *pattern,
00088                      const struct http_request *url);
00089 
00090 extern jb_err create_url_spec(struct url_spec * url, const char * buf);
00091 extern void free_url_spec(struct url_spec *url);
00092 
00093 
00094 /* Revision control strings from this header and associated .c file */
00095 
00096 /** Version information about urlmatch.c. */
00097 extern const char urlmatch_rcs[];
00098 
00099 /** Version information about urlmatch.h. */
00100 extern const char urlmatch_h_rcs[];
00101 
00102 #ifdef __cplusplus
00103 } /* extern "C" */
00104 #endif
00105 
00106 #endif /* ndef URLMATCH_H_INCLUDED */
00107 
00108 /*
00109   Local Variables:
00110   tab-width: 3
00111   end:
00112 */

Generated on Tue Jun 4 18:54:48 2002 for Privoxy 3.1.1 by doxygen1.2.15