X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=src%2Fproject.h;h=17e51ce9c95ebdbd3d997c5e007bc2921c338d92;hb=712f52070112388ddfcdc059b54a76af3dbdf726;hp=c63c94dcb4a7b00212be06a7200fadc64bde270b;hpb=2da19eb8eff90f6c9a7cb46ff891643e89d50a55;p=privoxy.git diff --git a/src/project.h b/src/project.h index c63c94dc..17e51ce9 100644 --- a/src/project.h +++ b/src/project.h @@ -1,10 +1,10 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.72 2002/05/14 21:35:49 oes Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 2.4 2002/12/28 03:58:19 david__schmidt Exp $" /********************************************************************* * - * File : $Source: /cvsroot/ijbswa/current/project.h,v $ + * File : $Source: /cvsroot/ijbswa/current/src/project.h,v $ * * Purpose : Defines data structures which are widely used in the * project. Does not define any variables or functions @@ -37,6 +37,30 @@ * * Revisions : * $Log: project.h,v $ + * Revision 2.4 2002/12/28 03:58:19 david__schmidt + * Initial drop of dashboard instrumentation - enabled with + * --enable-activity-console + * + * Revision 2.3 2002/09/05 08:00:23 oes + * Synced with the stable branch: + * Revision 1.72.2.1 2002/08/10 11:25:18 oes + * - Include config.h for access to config data + * - Include depending on where they are + * + * Revision 2.2 2002/07/12 04:26:17 agotneja + * Re-factored 'chat()' to become understandable and maintainable as + * a first step in adding Transparent Proxy functionality. + * + * Added several new static functions in jcc.c, and moved some data + * parameters up into project.h to allow them to be passed between + * the new functions. + * + * Revision 2.1 2002/06/04 16:35:56 jongfoster + * Moving three variable declarations to jcc.c from project.h + * + * Revision 2.0 2002/06/04 14:34:21 jongfoster + * Moving source files to src/ + * * Revision 1.72 2002/05/14 21:35:49 oes * Split HELP_LINK_PREFIX into ACTIONS_HELP_PREFIX and CONFIG_HELP_PREFIX * because of split in user-manual @@ -452,6 +476,8 @@ /* Need time_t for file_list */ #include +/* Needed for pcre choice */ +#include "config.h" /* * Include appropriate regular expression libraries. @@ -462,7 +488,11 @@ #ifdef STATIC_PCRE # include "pcre.h" #else -# include +# ifdef PCRE_H_IN_SUBDIR +# include +# else +# include +# endif #endif #ifdef STATIC_PCRS @@ -474,7 +504,11 @@ #ifdef STATIC_PCRE # include "pcreposix.h" #else -# include +# ifdef PCRE_H_IN_SUBDIR +# include +# else +# include +# endif #endif #ifdef AMIGA @@ -528,6 +562,7 @@ typedef int jb_socket; */ typedef int jb_err; +#define JB_ERR_GENERIC -1 /* General error return value */ #define JB_ERR_OK 0 /**< Success, no error */ #define JB_ERR_MEMORY 1 /**< Out of memory */ #define JB_ERR_CGI_PARAMS 2 /**< Missing or corrupt CGI parameters */ @@ -535,7 +570,7 @@ typedef int jb_err; #define JB_ERR_PARSE 4 /**< Error parsing file */ #define JB_ERR_MODIFIED 5 /**< File has been modified outside of the CGI actions editor. */ - +#define JB_ERR_INTERCEPT 6 /* This page should be intercepted */ /** * This macro is used to free a pointer that may be NULL. @@ -697,6 +732,9 @@ struct http_request char *dbuffer; /**< Buffer with '\0'-delimited domain name. */ char **dvec; /**< List of pointers to the strings in dbuffer. */ int dcount; /**< How many parts to this domain? (length of dvec) */ + + const struct forward_spec *fwd ; + }; @@ -1046,6 +1084,10 @@ struct client_state /** Next thread in linked list. Only read or modify from the main thread! */ struct client_state *next; + + char *(*content_filter)() ; + int all_headers_read ; + }; @@ -1321,6 +1363,31 @@ struct configuration_spec /** Size limit for IOB */ size_t buffer_limit; +#ifdef FEATURE_ACTIVITY_CONSOLE + + /** + * Default IP address to send statistics to, as a string. + * Set to "127.0.0.1". + */ + #define ACTIVTY_ADDR_DEFAULT "127.0.0.1" + + /** + * Default port to listen on, as a number. + * Set to 8119. + */ + #define ACTIVTY_ADDR_PORT 8119 + + /** IP address to talk to for activity/statistics reporting. */ + const char *activity_address; + + /** Port to bind to. Defaults to ACTIVTY_ADDR_PORT == 8119. */ + int activity_port; + + /** Frequency, in seconds, of how often to update the stats console. */ + int activity_freq; + +#endif /* def FEATURE_ACTIVITY_CONSOLE */ + #ifdef FEATURE_TRUST /** The file name of the trust file. */ @@ -1355,6 +1422,15 @@ struct configuration_spec /** Nonzero if we need to bind() to the new port. */ int need_bind; + + /** The raw blocker custom bitmap data */ + char *image_blocker_data; + + /** The length of the blocker custom image data */ + size_t image_blocker_length; + + /** The mimetype of the blocker custom image data */ + char *image_blocker_format; }; /** Calculates the number of elements in an array, using sizeof. */ @@ -1365,11 +1441,15 @@ struct configuration_spec #define FORCE_PREFIX "/PRIVOXY-FORCE" #endif /* def FEATURE_FORCE_LOAD */ +#define IMAGE_MIMETYPE_PNG "image/png" +#define IMAGE_MIMETYPE_GIF "image/gif" +#define IMAGE_MIMETYPE_JPG "image/jpg" + #ifdef FEATURE_NO_GIFS -/** The MIME type for images ("image/png" or "image/gif"). */ -#define BUILTIN_IMAGE_MIMETYPE "image/png" +/** The MIME type for built-in images ("image/png" or "image/gif"). */ +#define BUILTIN_IMAGE_MIMETYPE IMAGE_MIMETYPE_PNG #else -#define BUILTIN_IMAGE_MIMETYPE "image/gif" +#define BUILTIN_IMAGE_MIMETYPE IMAGE_MIMETYPE_GIF #endif /* def FEATURE_NO_GIFS */ @@ -1409,21 +1489,6 @@ struct configuration_spec #define CGI_PREFIX "http://" CGI_SITE_2_HOST CGI_SITE_2_PATH "/" -/* HTTP snipplets. - * - * FIXME: This is very inefficient. There could be one copy of these strings - * for each .c file!! They should be "extern", not "static". - */ -static const char CSUCCEED[] = - "HTTP/1.0 200 Connection established\n" - "Proxy-Agent: Privoxy/" VERSION "\r\n\r\n"; - -static const char CHEADER[] = - "HTTP/1.0 400 Invalid header received from browser\r\n\r\n"; - -static const char CFORBIDDEN[] = - "HTTP/1.0 403 Connection not allowable\r\nX-Hint: If you read this message interactively, then you know why this happens ,-)\r\n\r\n"; - #ifdef __cplusplus } /* extern "C" */ #endif