Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

countm_mod.h File Reference

Include file specific to mod_countm. More...

Go to the source code of this file.

Defines

#define COUNTM_BDB_MAX_ENV   32
 The maximum number of Berkeley Database Environments that may be opened. Due to configuration issues, an environment may be opened/created, but not used.
#define COUNTM_BDB_MAX_DB   32
 The maximum number of Berkeley Databases the may be opened. This number is the number of unique databases. Unique defined as both the database name AND environment different.
#define MODULE_URI_PATH_STRING   "/countm"
 The match string for the URI path. Must begin with a /, and be a valid path name. Only alter if absolutely necessary. Matches the directory specified in the httpd Location directive.
#define MODULE_URI_PATH_FONTS_STRING   MODULE_URI_PATH_STRING "/fonts"
 The match string for the URI fonts query. Matches the directory specified in the httpd Location directive.
#define MODULE_HANDLER_ID_STRING   "mod-countm"
 The AddHandler string in the config file Matches the handler string to the module. Only alter if absolutely necessary.
#define INSERT_BUFFER_SIZE   1024
 The size, in bytes, of the insert buffer. As the commands are parsed off the uri, all insert= values are added into the buffer. The buffer is terminated with a double null. If adding the insert=value would overflow the buffer, the insert=value is not added, and is discarded.
#define DEFAULT_IMAGE_TYPE   img_jpeg
 The default image type. one of img_jpeg, img_png.
#define MAX_QSTRING   1024
 The maximum of a query string in parse commandline.
#define STRING_EYES_X(x)   #x
#define STRING_EYES(x)   STRING_EYES_X(x)
#define DISPLAY_STR_DB   "Edb"
#define DISPLAY_STR_NOLINK   "ENoLnk"
#define DISPLAY_STR_LINK   "ELink"
#define DISPLAY_STR_CDELETE   "CDel"
#define DISPLAY_STR_ADELETE   "ADel"
#define DISPLAY_STR_CADD   "Cadd"
#define DISPLAY_STR_STRING   "Estr"
#define DISPLAY_STR_OVERFLOW   "Eovr"
#define DISPLAY_STR_PARAM   "EParm"
#define DISPLAY_STR_FILE   "EFile"
#define ERROR_API   2
#define ERROR_LIBGD   3
#define ERROR_IMAGE_SIZE   5
#define RETURN_IMAGE_PADDING   10
 The number of pixels added to the boarder of the text. The created text occupies a rectangle (x,y). For images returning a background color only, RETURN_IMAGE_PADDING pixels are added to the rectangles width and height. For best results, use an even integer.
#define COUNTM_FORCE_HOSTNAMELOOKUPS   0
 If directive HostNameLookups OFF, force the use of IP addresses when referring to the remote host. The ap_get_remote_host function will return a hostname if r->connection->remote_host is defined, probably from a previous REMOTE_DOUBLE_REV from a previous module, eventhough HostNameLookups is OFF. To force ap_get_remote_host to return an IP address if HostNameLookups is OFF, the stored hostname values already returned must be removed. As long as HostNameLookups OFF, then no problem. If HostNameLookups ON, then this forces an additional reverse lookup. If HostNameLookups DOUBLE, then this forces an additional double reverse lookup. If you set HostNameLookups OFF, and will always use HostNameLookups OFF, then set COUNTM_FORCE_HOSTNAMELOOKUPS 1. If you set HostNameLookups to ON or DOUBLE, keep COUNTM_FORCE_HOSTNAMELOOKUPS 0. Also, COUNTM_FORCE_HOSTNAMELOOKUPS 1 will force a failed double reverse lookup to return an error.
#define COUNTM_FORCE_LIBGD_THREADSAFE   1
 If 1, then forces libgd to be threadsafe. See "Whats new in version 2.0.16" in the libgd manual for more info. For threaded Multi-Processing Modules, this must be 1. A value of 1 means you must be linking with libgd >= 2.0.16.
#define MAX_POST_QUERY_STRING   1024
 The maximum length of a post request query string that does not set Content-type in the request header.
#define COUNTM_FOLLOW_LINKS   APR_FINFO_LINK
 Should listdirs follow links? 0=no APR_FINFO_LINK=yes. broken....
#define COUNTM_PARAMETER_RESET   "reset"
 The reset paramter string.
#define COUNTM_PARAMETER_INIT   "init"
 The init paramter string.
#define COUNTM_MYSQL_CONFIG_PARAMS   8
 The number of countm_mysql_config parameters.
#define COUNTM_STATS_BDB_JOIN   0
 The joined bit number.
#define COUNTM_STATS_BDB_CLOSE   1
 The close bit number.
#define COUNTM_STATS_BDB_RECOVER   2
 The recover bit number.
#define COUNTM_STATS_BDB_DELETE   3
 The delete bit number.
#define COUNTM_STATS_BDB_CREATE   4
 The create bit number.
#define INITIALIZE_COUNTM_DIR_CONFIG

Typedefs

typedef countm_cleanup_data countm_cleanup_data_t
typedef countm_cleanup_datap_countm_cleanup_data_t
typedef countm_dir_config countm_dir_config_t
typedef countm_dir_configp_countm_dir_config_t
typedef countm_config countm_config_t
typedef countm_configp_countm_config_t
typedef countent countent_t
typedef countentp_countent_t
typedef countm_listdirs_data countm_listdirs_data_t
typedef countm_listdirs_datap_countm_listdirs_data_t

Functions

static void * countm_per_server_config (apr_pool_t *p, server_rec *s)
static void * countm_merge_per_server_config (apr_pool_t *p, void *base, void *virt)
static void * countm_per_dir_config (apr_pool_t *p, char *dir)
static void * countm_merge_per_dir_config (apr_pool_t *p, void *basev, void *newv)
static int countm_hook_post_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static apr_status_t countm_pool_post_config_cleanup (void *data)
static void countm_process_init ()
static void countm_hook_child_init (apr_pool_t *p, server_rec *s)
static apr_status_t countm_pool_child_init_cleanup (void *parm)
static void countm_process_cleanup (apr_pool_t *p, int bSS)
static void countm_register_hooks (apr_pool_t *p)
static int countm_method_handler (request_rec *r)
static const char * countm_set_fontdir (cmd_parms *parms, void *dummy, const char *arg)
static const char * countm_set_font (cmd_parms *parms, void *dummy, const char *arg)
static const char * countm_set_db_lockfile (cmd_parms *parms, void *dummy, const char *arg)
static const char * countm_set_bgfile_dir (cmd_parms *parms, void *dummy, const char *arg)
static const char * countm_set_activate (cmd_parms *parms, void *dummy, int bool)
static const char * countm_set_allow_fonts_query (cmd_parms *parms, void *dummy, const int arg)
static const char * countm_set_allow_reset (cmd_parms *parms, void *dummy, const int arg)
static const char * countm_set_db_priority (cmd_parms *parms, void *dummy, const int arg)
static int countm_strcmp (const char *s1, const char *s2)
static apr_status_t countm_listfonts (p_countent_t p_ce)
static apr_status_t countm_listdirs (request_rec *r, char *dir, char *rel_dir, p_countm_listdirs_data_t p_ldd)
char * countm_next_fontdir (apr_pool_t *p, const char *fontdirs, unsigned int *pos)
 Returns the next directory in list of directories.
static int countm_get_querystring (p_countent_t p_ce)
static int countm_parse_cmdline (p_countent_t p_ce)
static int countm_verify_bgfile (p_countent_t p_ce, char *fn, enum imagetype *img)
static apr_status_t countm_unescape_url (apr_pool_t *p, char *s, apr_status_t *sNorm, apr_status_t *sKeep2f)
static int countm_mergeinfo_cmdpriority (p_countent_t p_ce)
static int countm_mergeinfo_dbpriority (p_countent_t p_ce)
static apr_status_t countm_process_command (p_countent_t p_ce, int *bDisplay)
static apr_status_t countm_reset_value (p_countent_t p_ce, int *bDisplay)
static int countm_reset_delete (p_countent_t p_ce, int *bDisplay)
static int countm_reset_access (p_countent_t p_ce, int *bDisplay)
static int countm_reset_init (p_countent_t p_ce, int *bDisplay)
static int countm_update_counter (p_countent_t p_ce, int *bDisplay)
static apr_status_t countm_dbcounter_get (p_countent_t p_ce, int *bDisplay)
static apr_status_t countm_dbcounter_put (p_countent_t p_ce, int *bDisplay)
static apr_status_t countm_dbcounter_del (p_countent_t p_ce, int *bDisplay)
static apr_status_t countm_dbaccess_put (p_countent_t p_ce, const char *p_value, int *bPresent)
static int countm_dbaccess_del (p_countent_t p_ce, int *bDisplay)
static int countm_setdefaults (p_countent_t p_ce)
static void countm_rgb_color (const char *hexnum, p_rgb_t rgb)
static int countm_display_string (p_countent_t p_ce)
static int countm_match_extension (request_rec *r, const char *fname, const char *pattern)
static int countm_misc_dza_strcat (char *const buf, char const *const szstr, const int bsize)
static void countm_adjust_string_width (p_countent_t p_ce)
static apr_status_t countm_filter_flush (apr_bucket_brigade *bb, void *ctx)
static int countm_version_check (apr_pool_t *p)
static int countm_set_atime (p_dbcounter_data_t p_dbcr, request_rec *r)
static int countm_absolute_path (const char *path)
static int countm_check_filename (const char *file)
void countm_initialize_config (p_countm_config_t p)
 Intialized the countm_config_t structure.

Variables

static apr_global_mutex_t * global_lock


Detailed Description

Include file specific to mod_countm.

Author:
Byron Young
Version:
5.4
Bug:
report to spamiccling@yahoo.com

report to bkyoung@users.sourceforge.net


Define Documentation

#define INITIALIZE_COUNTM_DIR_CONFIG
 

Value:

{\
  .dir =  NULL,\
  .bAllowFontsQuery = countm_state_notdef,\
  .bAllowReset = countm_state_notdef,\
  .bDBPriority = countm_state_notdef\
}


Function Documentation

void countm_initialize_config p_countm_config_t  p  ) 
 

Intialized the countm_config_t structure.

Parameters:
p The structure to initialize
Returns:
The initialized structure.

char* countm_next_fontdir apr_pool_t *  p,
const char *  fontdirs,
unsigned int *  pos
 

Returns the next directory in list of directories.

(apr_pool_t * p, const char * fontdirs, unsigned int * pos)

Parameters:
p The memory pool.
fontdirs The list of directories.
pos IN:the starting position in fontdirs. OUT:the first char after separator.
Returns:
NULL no more directories in list. the next directory. Example: ":abc::" Returns abc on first call, and NULL on next call.


Variable Documentation

apr_global_mutex_t* global_lock [static]
 

Globals For forking MPMs, they will be copied and then passed to the new child They may be overridden in child_init. All threads of a particular child may use/share them. For non forking MPMs, they will be be valid for any server (thread or parent process) The database is opened for each process and/or child. Each server (virtual or global, uses the child database information.


Generated on Sat Jan 7 15:48:40 2006 for mod_countm by  doxygen 1.4.2