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

countm.h File Reference

Include file for mod_countm and countm utility. More...

Go to the source code of this file.

Defines

#define DB_COUNTER   "DB_COUNTER"
 The internal name of the counter database. key is the linkname. data is struct db_count_record. no duplicate keys are allowed.
#define DB_ACCESS   "DB_ACCESS"
 The internal name of the access database. key is linkname. data is zero terminated ascii hostname, or if hostname not known, ip address string. Duplicate keys are allowed.
#define COUNTM_CONFIG_ICASE   0
 Compare environments and filenames case. 0 = case is significant. 1 = ignore case.
#define DEFAULT_FONT_POINT_SIZE   20
 The default font point size.
#define COUNTM_ATIME_LENGTH   11
 the length of the atime field in struct db_count_record This includes the trailing NULL. When stored into MySQL Database, will be one less.
#define COUNTM_STR_SEPARATOR   "/"
 The string version of the directory separator. OS dependent.
#define COUNTM_CHR_SEPARATOR   '/'
 The character version of the directory separator. OS dependent.
#define COUNTM_BDB_ENV_LOCK   "env.lock"
 The name of the BDB environment lock file created in DB_HOME. This lock file is created at startup, and removed at shutdown. The value inside is the number of additional process that are using the envoronment.
#define COUNTM_EXTENSIONS_SUBS   3
 The number of subexpression in COUNTM_EXTENSIONS_* REs. Really the pmatch value. Only change if COUNTM_EXTENSIONS_* are altered.
#define COUNTM_EXTENSIONS_USESUB   1
 The sub expression to use as the base filename. Only change if COUNTM_EXTENSIONS_* are altered.
#define COUNTM_EXTENSIONS_TTF   "^(.+)(\\.ttf|\\.pfa|\\.pfb|\\.dfont)$"
 A PCRE of valid TTF file extensions. This is dependent on the version of GD using. Default is "?correct?" for 2.0.21.
#define COUNTM_EXTENSIONS_JPEG   "^(.+)(\\.jpeg|\\.jpg)$"
 A PCRE of valid JPEG file extensions.
#define COUNTM_EXTENSIONS_PNG   "^(.+)(\\.png)$"
 A PCRE of valid PNG file extensions.
#define COUNTM_UTILITY_LOCKOBJECT   "COUNTM_UTILITY_LOCKOBJECT"
 The countm utility master lock object.
#define COUNTM_PARAMETER_LINK   "link"
 The link paramter string. Also used as MySQL DB_COUNTER table primary key and MySQL DB_ACCESS composite primary key.
#define COUNTM_PARAMETER_FONT   "font"
 The font paramter string.
#define COUNTM_PARAMETER_IGNORE   "ignore"
 The ignore paramter string.
#define COUNTM_PARAMETER_WIDTH   "width"
 The width paramter string.
#define COUNTM_PARAMETER_POINT   "point"
 The point paramter string.
#define COUNTM_PARAMETER_BGCOLOR   "bgcolor"
 The bgcolor paramter string.
#define COUNTM_PARAMETER_BGFILE_TYPE   "bgfile_type"
 The bgfile_type paramter string. Only used for Mysql DB_COUNTER table.
#define COUNTM_PARAMETER_TEXT   "text"
 The text paramter string.
#define COUNTM_PARAMETER_IMAGE   "image"
 The image paramter string.
#define COUNTM_PARAMETER_CNT   "cnt"
 The count paramter string. Only used for Mysql DB_COUNTER table.
#define COUNTM_PARAMETER_RANDOM   "random"
 The random paramter string.
#define COUNTM_PARAMETER_INSERT   "insert"
 The random paramter string.
#define COUNTM_PARAMETER_COUNT   "count"
 The count paramter string.
#define COUNTM_PARAMETER_ATIME   "atime"
 The last access time. Only used for Mysql DB_COUNTER table.
#define COUNTM_PARAMETER_HOST   "host"
 The host parameter string. Only used for Mysql composite primary key DB_ACCESS table.
#define COUNTM_PARAMETER_CNT   "cnt"
 The count paramter string. Only used for Mysql DB_COUNTER table.
#define COUNTM_MYSQL_QUERY_BUFF_SIZE   2048
 The size, in bytes, of a MySQL query buffer. If CM_OVERFLOW errors happen, increase this to a larger number.
#define COUNTM_STR_NOTDEF   "notdef"
 A "not defined" entry in the text file.
#define MAX_WIDTH_CHAR_DISPLAY   9
 The maximum number of characters/digits to return in image. Must be set to 9 or less.
#define INITIALIZE_STATUS_RECORD
#define INITIALIZE_DBCOUNTER_DATA

Typedefs

typedef value_status status_t
typedef value_statusp_status_t
typedef unsigned long cntval_t
 The type for the counter value.
typedef rgb rgb_t
typedef rgbp_rgb_t
typedef dbcounter_record dbcounter_record_t
typedef dbcounter_recordp_dbcounter_record_t
typedef dbcounter_data dbcounter_data_t
typedef dbcounter_datap_dbcounter_data_t

Enumerations

enum  imagetype { img_notdef = -1, img_jpeg = 0, img_png = 1 }
 The image type enumeration. More...
enum  randomtype { random_notdef = -1, random_true = 0, random_false = 1 }
 The random type enumeration. More...
enum  resettype {
  reset_notdef, reset_value, reset_delete, reset_init,
  reset_access
}
 The reset type enumeration. More...
enum  counttype {
  count_notdef, count_inc, count_dec, count_norm_inc,
  count_norm_dec, count_inc_nopub, count_dec_nopub
}
 The mode type enumeration. More...
enum  countm_state { countm_state_notdef = -1, countm_state_off = 0, countm_state_on = 1 }
 The state of FLAG directive or other object. More...

Functions

static void countm_print_enum_imagetype (enum imagetype it, char **r_str)
static void countm_print_enum_randomtype (enum randomtype rt, char **r_str)
static void countm_print_enum_counttype (enum counttype ct, char **r_str)
static void countm_print_struct_rgb (p_rgb_t p_rgb, char *buf)
static int countm_enum_counttype (const char *buf, enum counttype *p_ct)
static int countm_enum_imagetype (const char *buf, enum imagetype *p_it)
static int countm_enum_randomtype (const char *buf, enum randomtype *p_rt)
static void countm_rgb_color (const char *hexnum, p_rgb_t rgb)

Variables

const char *const version
 The release version.


Detailed Description

Include file for mod_countm and countm utility.

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

report to bkyoung@users.sourceforge.net


Define Documentation

#define INITIALIZE_DBCOUNTER_DATA
 

Value:

{\
  .cnt=0,\
  .image=img_notdef,\
  .count=count_notdef,\
  .random=random_notdef,\
  .bgfile_type=img_notdef,\
  .status=INITIALIZE_STATUS_RECORD,\
  .width_val=0,\
  .point_val=0,\
  .bgcolor_val={0,0,0},\
  .text_val={255,255,255},\
  .font=NULL,\
  .bgfile=NULL\
}

#define INITIALIZE_STATUS_RECORD
 

Value:

{\
 .status_width_val=0,\
 .status_point_val=0,\
 .status_bgcolor_val=0,\
 .status_text_val=0,\
 .status_font=0,\
 .status_bgfile=0\
}


Enumeration Type Documentation

enum countm_state
 

The state of FLAG directive or other object.

Enumeration values:
countm_state_notdef  State was not defined, use default.
countm_state_off  State is OFF.
countm_state_on  State is ON.

enum counttype
 

The mode type enumeration.

Enumeration values:
count_notdef  mode type not defined
count_inc  count type specified as increment
count_dec  count type specified as decrement
count_norm_inc  count type sepecifed as normal increment
count_norm_dec  count type specified as normal decrement
count_inc_nopub  count type specified as increment, but not RFC1918
count_dec_nopub  count type specified as decrement, but not RFC1918

enum imagetype
 

The image type enumeration.

Enumeration values:
img_notdef  image type not defined
img_jpeg  image type specified as jpeg
img_png  image type specified as png

enum randomtype
 

The random type enumeration.

Enumeration values:
random_notdef  random type not defined
random_true  return a random value, remote host is not inserted into DB_ACCESS
random_false  not a random value specifically indicated

enum resettype
 

The reset type enumeration.

Enumeration values:
reset_notdef  reset type not defined
reset_value  reset type defined as a value
reset_delete  reset type specified as delete
reset_init  reset type specified as init
reset_access  reset type specified as access


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